skia2/site/user/api/SkIPoint16_Reference.md
Cary Clark 7cfcbca716 limit bookmaker status output
streamline 'working as intended' output
notify when output changed
fix bug which appended output incorrectly to SkBitmap.h
fix bug that hid bad SkSurface.h from detection

Docs-Preview: https://skia.org/?cl=90162
Bug: skia:6898
Change-Id: I067cfe5bbad706345fb5cd540cdc3835ce22d822
Reviewed-on: https://skia-review.googlesource.com/90162
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-01-04 21:41:09 +00:00

4.2 KiB

SkIPoint16 Reference

IPoint16

Struct SkIPoint16

SkIPoint holds two 16 bit integer coordinates

Overview

Subtopics

topics description

Member Functions

description function
Make Constructs from integer inputs.
set Sets to integer input.
x Returns fX.
y Returns fY.

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() 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