struct <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a> { int32_t <a href='#SkIPoint_fX'>fX</a>; int32_t <a href='#SkIPoint_fY'>fY</a>; static constexpr <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a> <a href='#SkIPoint_Make'>Make</a>(int32_t x, int32_t y); int32_t <a href='#SkIPoint_x'>x()</a> const; int32_t <a href='#SkIPoint_y'>y()</a> const; bool <a href='#SkIPoint_isZero'>isZero</a>() const; void <a href='#SkIPoint_set'>set</a>(int32_t x, int32_t y); <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a> operator-() const; void <a href='#SkIPoint_addto_operator'>operator+=</a>(const <a href='SkIPoint_Reference#SkIVector'>SkIVector</a>& v); void <a href='#SkIPoint_subtractfrom_operator'>operator-=</a>(const <a href='SkIPoint_Reference#SkIVector'>SkIVector</a>& v); bool <a href='#SkIPoint_equals'>equals</a>(int32_t x, int32_t y) const; friend bool <a href='#SkIPoint_equal_operator'>operator==</a>(const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& a, const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& b); friend bool <a href='#SkIPoint_notequal_operator'>operator!=</a>(const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& a, const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& b); friend <a href='SkIPoint_Reference#SkIVector'>SkIVector</a> <a href='#SkIPoint_subtract_operator'>operator-</a>(const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& a, const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& b); friend <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a> <a href='#SkIPoint_add_operator'>operator+</a>(const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& a, const <a href='SkIPoint_Reference#SkIVector'>SkIVector</a>& b); };
SkIPoint holds two 32-bit integer coordinates.
static constexpr <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a> <a href='#SkIPoint_Make'>Make</a>(int32_t x, int32_t y)
Sets fX to x, fY to y.
SkIPoint (x, y)
pt1 == pt2
set() SkPoint::iset() SkPoint::Make
int32_t <a href='#SkIPoint_x'>x()</a>const
Returns x-axis value of SkIPoint.
fX
pt1.fX == pt1.x()
y() SkPoint::x()
int32_t <a href='#SkIPoint_y'>y()</a>const
Returns y-axis value of SkIPoint.
fY
pt1.fY == pt1.y()
x() SkPoint::y()
bool <a href='#SkIPoint_isZero'>isZero</a>()const
Returns true if fX and fY are both zero.
true if fX is zero and fY is zero
pt.isZero() == true
SkPoint::isZero
void set(int32_t x, int32_t y)
Sets fX to x and fY to y.
pt1 == pt2
Make
<a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a> operator-()const
Returns SkIPoint changing the signs of fX and fY.
SkIPoint as (-fX, -fY)
pt: 0, 0 negate: 0, 0 pt: -1, -2 negate: 1, 2 pt: 2147483647, -2147483647 negate: -2147483647, 2147483647 pt: -2147483648, -2147483648 negate: -2147483648, -2147483648
operator-(const SkIPoint& a, const SkIPoint& b) operator-=(const SkIVector& v) SkPoint::operator-() const
void <a href='#SkIPoint_addto_operator'>operator+=</a>(const <a href='SkIPoint_Reference#SkIVector'>SkIVector</a>& v)
Offsets IPoint by IVector v. Sets IPoint to (fX + v.fX, fY + v.fY).
operator+(const SkIPoint& a, const SkIVector& b) SkPoint::operator+=(const SkVector& v)
void <a href='#SkIPoint_subtractfrom_operator'>operator-=</a>(const <a href='SkIPoint_Reference#SkIVector'>SkIVector</a>& v)
Subtracts IVector v from IPoint. Sets IPoint to: (fX - v.fX, fY - v.fY).
operator-(const SkIPoint& a, const SkIPoint& b) SkPoint::operator-=(const SkVector& v)
bool equals(int32_t x, int32_t y)const
Returns true if SkIPoint is equivalent to SkIPoint constructed from (x, y).
true if SkIPoint equals (x, y)
pt: 0, 0 == pt pt: -1, -2 == pt pt: 2147483647, -1 == pt pt: -2147483648, -1 == pt
operator==(const SkIPoint& a, const SkIPoint& b)
bool <a href='#SkIPoint_equal_operator'>operator==</a>(const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& a, const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& b)
Returns true if a is equivalent to b.
true if a.fX == b.fX and a.fY == b.fY
pt: 0, 0 == pt pt: -1, -2 == pt pt: 2147483647, -1 == pt pt: -2147483648, -1 == pt
equals() operator!=(const SkIPoint& a, const SkIPoint& b)
bool <a href='#SkIPoint_notequal_operator'>operator!=</a>(const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& a, const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& b)
Returns true if a is not equivalent to b.
true if a.fX != b.fX or a.fY != b.fY
pt: 0, 0 == pt pt: -1, -2 == pt pt: 2147483647, -1 == pt pt: -2147483648, -1 == pt
operator==(const SkIPoint& a, const SkIPoint& b) equals()
<a href='SkIPoint_Reference#SkIVector'>SkIVector</a> <a href='#SkIPoint_subtract_operator'>operator-</a>(const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& a, const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& b)
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.
IVector from b to a
operator-=(const SkIVector& v)
<a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a> <a href='#SkIPoint_add_operator'>operator+</a>(const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& a, const <a href='SkIPoint_Reference#SkIVector'>SkIVector</a>& b)
Returns IPoint resulting from IPoint a offset by IVector b, computed as: (a.fX + b.fX, a.fY + b.fY).
Can also be used to offset IPoint b by IVector a, returning IPoint. Can also be used to add IVector to IVector, returning IVector.
IPoint equal to a offset by b
operator+=(const SkIVector& v)
typedef <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a> <a href='SkIPoint_Reference#SkIVector'>SkIVector</a>;
SkIVector provides an alternative name for SkIPoint. SkIVector and SkIPoint can be used interchangeably for all purposes.