SkIPoint16 Reference

IPoint16

Overview

Overview Subtopic

name description
Constructor functions that construct SkIPoint16
Member Function static functions and member methods
Member member values
Related Function similar methods grouped together

Struct SkIPoint16

SkIPoint16 holds two 16 bit integer coordinates.

Related Function

name description
Property member values
Set replaces all values

Member Function

name description
Make constructs from integer inputs
set sets to integer input
x returns fX
y returns fY

Member

name description
fX x-axis value
fY y-axis value

int16_t fX

x-axis value used by IPoint16

int16_t fY

y-axis value used by IPoint16

Constructor

name description
Make constructs from integer inputs

Make

static constexpr SkIPoint16 Make(int x, int y)

Sets fX to x, fY to y. If SK_DEBUG is defined, asserts if x or y does not fit in 16 bits.

Parameters

x integer x-axis value of constructed IPoint
y integer y-axis value of constructed IPoint

Return Value

IPoint16 (x, y)

Example

#### Example Output ~~~~ pt1.fX == pt2.fX pt1.fY == pt2.fY ~~~~

See Also

set SkPoint::iset()[2] SkIPoint::Make


Property

name description
x returns fX
y returns fY

x

int16_t x() const

Returns x-axis value of IPoint16.

Return Value

fX

Example

#### Example Output ~~~~ pt1.fX == pt1.x() ~~~~

See Also

y SkIPoint::x()


y

int16_t y() const

Returns y-axis value of IPoint.

Return Value

fY

Example

#### Example Output ~~~~ pt1.fY == pt1.y() ~~~~

See Also

x SkPoint::y() SkIPoint::y()


Set

name description
set sets to integer input

set

void set(int x, int y)

Sets fX to x and fY to y.

Parameters

x new value for fX
y new value for fY

Example

#### Example Output ~~~~ pt1.fX == pt2.fX pt1.fY == pt2.fY ~~~~

See Also

Make SkPoint::set