Home | History | Annotate | Download | only in core

Lines Matching defs:SkPoint

187 struct SkPoint;
188 typedef SkPoint SkVector;
190 /** \struct SkPoint
192 struct SK_API SkPoint {
194 /** x-axis value used by both SkPoint and vector. May contain any value, including
199 /** y-axis value used by both SkPoint and vector. May contain any value, including
204 /** Sets fX to x, fY to y. Used both to set SkPoint and vector.
206 @param x SkScalar x-axis value of constructed SkPoint or vector
207 @param y SkScalar y-axis value of constructed SkPoint or vector
208 @return SkPoint (x, y)
210 static constexpr SkPoint Make(SkScalar x, SkScalar y) {
214 /** Returns x-axis value of SkPoint or vector.
220 /** Returns y-axis value of SkPoint or vector.
273 void setAbs(const SkPoint& pt) {
278 /** Adds offset to each SkPoint in points array with count entries.
280 @param points SkPoint array
284 static void Offset(SkPoint points[], int count, const SkVector& offset) {
288 /** Adds offset (dx, dy) to each SkPoint in points array of length count.
290 @param points SkPoint array
295 static void Offset(SkPoint points[], int count, SkScalar dx, SkScalar dy) {
301 /** Adds offset (dx, dy) to SkPoint.
319 SkScalar length() const { return SkPoint::Length(fX, fY); }
369 /** Sets dst to SkPoint times scale. dst may be SkPoint to modify SkPoint in place.
371 @param scale factor to multiply SkPoint by
372 @param dst storage for scaled SkPoint
374 void scale(SkScalar scale, SkPoint* dst) const;
376 /** Scales SkPoint in place by scale.
378 @param value factor to multiply SkPoint by
389 /** Returns SkPoint changing the signs of fX and fY.
391 @return SkPoint as (-fX, -fY)
393 SkPoint operator-() const {
397 /** Adds vector v to SkPoint. Sets SkPoint to: (fX + v.fX, fY + v.fY).
406 /** Subtracts vector v from SkPoint. Sets SkPoint to: (fX - v.fX, fY - v.fY).
415 /** Returns SkPoint multiplied by scale.
418 @return SkPoint as (fX * scale, fY * scale)
420 SkPoint operator*(SkScalar scale) const {
424 /** Multiplies SkPoint by scale. Sets SkPoint to: (fX * scale, fY * scale)
427 @return reference to SkPoint
429 SkPoint& operator*=(SkScalar scale) {
452 /** Returns true if SkPoint is equivalent to SkPoint constructed from (x, y).
456 @return true if SkPoint equals (x, y)
464 @param a SkPoint to compare
465 @param b SkPoint to compare
468 friend bool operator==(const SkPoint& a, const SkPoint& b) {
474 @param a SkPoint to compare
475 @param b SkPoint to compare
478 friend bool operator!=(const SkPoint& a, const SkPoint& b) {
484 Can also be used to subtract vector from SkPoint, returning SkPoint.
487 @param a SkPoint to subtract from
488 @param b SkPoint to subtract
491 friend SkVector operator-(const SkPoint& a, const SkPoint& b) {
495 /** Returns SkPoint resulting from SkPoint a offset by vector b, computed as: (a.fX + b.fX, a.fY + b.fY).
497 Can also be used to offset SkPoint b by vector a, returning SkPoint.
500 @param a SkPoint or vector to add to
501 @param b SkPoint or vector to add
502 @return SkPoint equal to a offset by b
504 friend SkPoint operator+(const SkPoint& a, const SkVector& b) {
539 static SkScalar Distance(const SkPoint& a, const SkPoint& b) {