SkIPoint holds two 32-bit integer coordinates.
More...
#include <SkPoint.h>
SkIPoint holds two 32-bit integer coordinates.
◆ equals()
bool SkIPoint::equals |
( |
int32_t |
x, |
|
|
int32_t |
y |
|
) |
| const |
|
inline |
Returns true if SkIPoint is equivalent to SkIPoint constructed from (x, y).
- Parameters
-
x | value compared with fX |
y | value compared with fY |
- Returns
- true if SkIPoint equals (x, y)
◆ isZero()
bool SkIPoint::isZero |
( |
| ) |
const |
|
inline |
Returns true if fX and fY are both zero.
- Returns
- true if fX is zero and fY is zero
◆ Make()
static constexpr SkIPoint SkIPoint::Make |
( |
int32_t |
x, |
|
|
int32_t |
y |
|
) |
| |
|
inlinestaticconstexpr |
Sets fX to x, fY to y.
- Parameters
-
x | integer x-axis value of constructed SkIPoint |
y | integer y-axis value of constructed SkIPoint |
- Returns
- SkIPoint (x, y)
◆ operator+=()
void SkIPoint::operator+= |
( |
const SkIVector & |
v | ) |
|
|
inline |
Offsets SkIPoint by ivector v.
Sets SkIPoint to (fX + v.fX, fY + v.fY).
- Parameters
-
◆ operator-()
◆ operator-=()
void SkIPoint::operator-= |
( |
const SkIVector & |
v | ) |
|
|
inline |
Subtracts ivector v from SkIPoint.
Sets SkIPoint to: (fX - v.fX, fY - v.fY).
- Parameters
-
◆ set()
void SkIPoint::set |
( |
int32_t |
x, |
|
|
int32_t |
y |
|
) |
| |
|
inline |
Sets fX to x and fY to y.
- Parameters
-
x | new value for fX |
y | new value for fY |
◆ x()
constexpr int32_t SkIPoint::x |
( |
| ) |
const |
|
inlineconstexpr |
Returns x-axis value of SkIPoint.
- Returns
- fX
◆ y()
constexpr int32_t SkIPoint::y |
( |
| ) |
const |
|
inlineconstexpr |
Returns y-axis value of SkIPoint.
- Returns
- fY
◆ operator!=
Returns true if a is not equivalent to b.
- Parameters
-
- Returns
- true if a.fX != b.fX or a.fY != b.fY
◆ operator+
Returns SkIPoint resulting from SkIPoint a offset by ivector b, computed as: (a.fX + b.fX, a.fY + b.fY).
Can also be used to offset SkIPoint b by ivector a, returning SkIPoint. Can also be used to add ivector to ivector, returning ivector.
- Parameters
-
- Returns
- SkIPoint equal to a offset by b
◆ operator-
Returns ivector from b to a; computed as (a.fX - b.fX, a.fY - b.fY).
Can also be used to subtract ivector from ivector, returning ivector.
- Parameters
-
a | SkIPoint or ivector to subtract from |
b | ivector to subtract |
- Returns
- ivector from b to a
◆ operator==
Returns true if a is equivalent to b.
- Parameters
-
- Returns
- true if a.fX == b.fX and a.fY == b.fY
◆ fX
◆ fY
The documentation for this struct was generated from the following file: