Lines Matching defs:length
257 /** Adds offset (dx, dy) to each SkPoint in points array of length count.
288 SkScalar length() const { return SkPoint::Length(fX, fY); }
298 SkScalar distanceToOrigin() const { return this->length(); }
300 /** Scales (fX, fY) so that length() returns one, while preserving ratio of fX to fY,
301 if possible. If prior length is nearly zero, sets vector to (0, 0) and returns
304 @return true if former length is not zero or nearly zero
310 /** Sets vector to (x, y) scaled so length() returns one, and so that
311 (fX, fY) is proportional to (x, y). If (x, y) length is nearly zero,
316 @return true if (x, y) length is not zero or nearly zero
322 /** Scales vector so that distanceToOrigin() returns length, if possible. If former
323 length is nearly zero, sets vector to (0, 0) and return false; otherwise returns
326 @param length straight-line distance to origin
327 @return true if former length is not zero or nearly zero
331 bool setLength(SkScalar length);
333 /** Sets vector to (x, y) scaled to length, if possible. If former
334 length is nearly zero, sets vector to (0, 0) and return false; otherwise returns
339 @param length straight-line distance to origin
340 @return true if (x, y) length is not zero or nearly zero
344 bool setLength(SkScalar x, SkScalar y, SkScalar length);
494 @param x component of length
495 @param y component of length
502 /** Scales (vec->fX, vec->fY) so that length() returns one, while preserving ratio of vec->fX
503 to vec->fY, if possible. If original length is nearly zero, sets vec to (0, 0) and returns
504 zero; otherwise, returns length of vec before vec is scaled.
506 Returned prior length may be SK_ScalarInfinity if it can not be represented by SkScalar.
508 Note that normalize() is faster if prior length is not required.
510 @param vec normalized to unit length
511 @return original vec length