name | description |
---|---|
Constructors | functions that construct SkIPoint |
Member Functions | static functions and member methods |
Members | member values |
Operators | operator overloading methods |
SkIPoint holds two 32 bit integer coordinates.
name | description |
---|---|
Make | constructs from integer inputs |
name | description |
---|---|
operator!=(const SkIPoint& a, const SkIPoint& b) | returns true if IPoints are unequal |
operator+(const SkIPoint& a, const SkIVector& b) | returns IPoint offset by IVector |
operator+=(const SkIVector& v) | adds IVector to IPoint |
operator-() const | reverses sign of IPoint |
operator-(const SkIPoint& a, const SkIPoint& b) | returns IVector between IPoints |
operator-=(const SkIVector& v) | subtracts IVector from IPoint |
operator==(const SkIPoint& a, const SkIPoint& b) | returns true if IPoints are equal |
name | description |
---|---|
Make | constructs from integer inputs |
equals | returns true if members are equal |
isZero | returns true if both members equal zero |
set | sets to integer input |
x | returns fX |
y | returns fY |
name | description |
---|---|
fX | x-axis value |
fY | y-axis value |
int32_t fX
x-axis value used by IPoint.
int32_t fY
y-axis value used by IPoint.
Sets fX to x, fY to y.
IPoint (x, y)
pt1 == pt2
set SkPoint::iset()[2] SkPoint::Make SkIPoint16::Make
Returns x-axis value of IPoint.
fX
pt1.fX == pt1.x()
y SkPoint::x() SkIPoint16::x()
Returns y-axis value of IPoint.
fY
pt1.fY == pt1.y()
x SkPoint::y() SkIPoint16::y()
Returns true if fX and fY are both zero.
true if fX is zero and fY is zero
pt.isZero() == true
SkPoint::isZero
Sets fX to x and fY to y.
pt1 == pt2
Make SkIPoint16::set
Returns IPoint changing the signs of fX and fY.
IPoint 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
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)
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)
Returns true if IPoint is equivalent to IPoint constructed from (x, y).
true if IPoint 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)
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)
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
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)
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)