Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
SkIPoint16 Struct Reference

#include <SkIPoint16.h>

Public Member Functions

int16_t x () const
 
int16_t y () const
 
void set (int x, int y)
 

Static Public Member Functions

static constexpr SkIPoint16 Make (int x, int y)
 

Public Attributes

int16_t fX
 x-axis value used by SkIPoint16 More...
 
int16_t fY
 y-axis value used by SkIPoint16 More...
 

Detailed Description

SkIPoint16 holds two 16 bit integer coordinates.

Definition at line 17 of file SkIPoint16.h.

Member Function Documentation

◆ Make()

static constexpr SkIPoint16 SkIPoint16::Make ( int  x,
int  y 
)
inlinestaticconstexpr

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

Parameters
xinteger x-axis value of constructed SkIPoint
yinteger y-axis value of constructed SkIPoint
Returns
SkIPoint16 (x, y)

Definition at line 29 of file SkIPoint16.h.

29 {
30 return {SkToS16(x), SkToS16(y)};
31 }
constexpr int16_t SkToS16(S x)
Definition: SkTo.h:23
int16_t y() const
Definition: SkIPoint16.h:43
int16_t x() const
Definition: SkIPoint16.h:37

◆ set()

void SkIPoint16::set ( int  x,
int  y 
)
inline

Sets fX to x and fY to y.

Parameters
xnew value for fX
ynew value for fY

Definition at line 50 of file SkIPoint16.h.

50 {
51 fX = SkToS16(x);
52 fY = SkToS16(y);
53 }
int16_t fY
y-axis value used by SkIPoint16
Definition: SkIPoint16.h:20
int16_t fX
x-axis value used by SkIPoint16
Definition: SkIPoint16.h:18

◆ x()

int16_t SkIPoint16::x ( ) const
inline

Returns x-axis value of SkIPoint16.

Returns
fX

Definition at line 37 of file SkIPoint16.h.

37{ return fX; }

◆ y()

int16_t SkIPoint16::y ( ) const
inline

Returns y-axis value of SkIPoint.

Returns
fY

Definition at line 43 of file SkIPoint16.h.

43{ return fY; }

Member Data Documentation

◆ fX

int16_t SkIPoint16::fX

x-axis value used by SkIPoint16

Definition at line 18 of file SkIPoint16.h.

◆ fY

int16_t SkIPoint16::fY

y-axis value used by SkIPoint16

Definition at line 20 of file SkIPoint16.h.


The documentation for this struct was generated from the following file: