skia2/site/user/api/SkIPoint16_Reference.md
Cary Clark 78de751969 add subtopics to all methods
add self-check looking for #In markup on every method, pointing
to an existing #Subtopic to reference the method.

Docs-Preview: https://skia.org/?cl=104325
Bug: skia:6898
Change-Id: I749a25b9a43033ae68d193249b2c0b810dcf8fc8
Reviewed-on: https://skia-review.googlesource.com/104325
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-02-07 12:46:16 +00:00

5.0 KiB

SkIPoint16 Reference

IPoint16

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.

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