skia2/site/user/api/SkIPoint16_Reference.md
Cary Clark 08895c4814 auto table generation
Replace manually entered summary tables with ones that are populated
and sorted by bookmaker. This introduces a slight regression for
anonymous enums but fixes a lot of bugs and omissions.

The format is

#Topic somethingTopical
#Populate
##

where somethingTopical is one of Subtopics, Constructors, Constants,
Classes_and_Structs, Members, Member_Functions, and Related_Functions.

Fix the bad formatting in SkCanvas reference. The #Error tag was
was corrupting the markdown table. Remove the tag and replace it
with #NoExample.

Next up: revise self-check to know about populated topics.

TBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=102080
Bug: skia:6898
Change-Id: Idef5d1c14c740c18a81d6a5106182788dd2a09e1
Reviewed-on: https://skia-review.googlesource.com/102080
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-02-01 15:09:17 +00:00

4.4 KiB

SkIPoint16 Reference

IPoint16

Overview

Subtopics

name description
Constructors functions that construct SkIPoint16
Member Functions static functions and member methods
Members member values

Struct SkIPoint16

SkIPoint16 holds two 16 bit integer coordinates.

Constructors

name description
Make constructs from integer inputs

Member Functions

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

Members

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

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


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

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