class SkMatrix; class SkPath; class SkPathBuilder;
class SK_API SkPathMeasure { public:
SkPathMeasure(); /** Initialize the pathmeasure with the specified path. The parts of the path that are needed *arecopied,sotheclientisfreetomodify/deletethepathafterthiscall. * *resScalecontrolstheprecisionofthemeasure.values>1increasethe *precision(andpossiblyslowdownthecomputation).
*/
SkPathMeasure(const SkPath& path, bool forceClosed, SkScalar resScale = 1);
~SkPathMeasure();
/** Reset the pathmeasure with the specified path. The parts of the path that are needed *arecopied,sotheclientisfreetomodify/deletethepathafterthiscall..
*/ void setPath(const SkPath*, bool forceClosed);
/** Return the total length of the current contour, or 0 if no path isassociated(e.g.resetPath(null))
*/
SkScalar getLength();
/** Pins distance to 0 <= distance <= getLength(), and then computes thecorrespondingpositionandtangent. Returnsfalseifthereisnopath,orazero-lengthpathwasspecified,inwhichcase positionandtangentareunchanged.
*/
[[nodiscard]] bool getPosTan(SkScalar distance, SkPoint* position, SkVector* tangent);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.