update dox for pathmeasure

Of note, the client need not keep the path around after creating/resetting the measure
object. The parts that are needed are copied, so the client is free to modify/delete
the path afterwards.

Bug: skia:
Change-Id: I9b9a0fd8e3cd6fd6c60de0017bcaee1fbc2fb893
Reviewed-on: https://skia-review.googlesource.com/c/190679
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
This commit is contained in:
Mike Reed 2019-02-08 16:56:12 -05:00 committed by Skia Commit-Bot
parent be39f713e5
commit 8d4594175c
2 changed files with 19 additions and 13 deletions

View File

@ -92,9 +92,19 @@ private:
class SK_API SkContourMeasureIter : SkNoncopyable {
public:
SkContourMeasureIter();
/**
* Initialize the Iter with a path.
* The parts of the path that are needed are copied, so the client is free to modify/delete
* the path after this call.
*/
SkContourMeasureIter(const SkPath& path, bool forceClosed, SkScalar resScale = 1);
~SkContourMeasureIter();
/**
* Reset the Iter with a path.
* The parts of the path that are needed are copied, so the client is free to modify/delete
* the path after this call.
*/
void reset(const SkPath& path, bool forceClosed, SkScalar resScale = 1);
/**

View File

@ -16,22 +16,18 @@
class SK_API SkPathMeasure : SkNoncopyable {
public:
SkPathMeasure();
/** Initialize the pathmeasure with the specified path. The path must remain valid
for the lifetime of the measure object, or until setPath() is called with
a different path (or null), since the measure object keeps a pointer to the
path object (does not copy its data).
resScale controls the precision of the measure. values > 1 increase the
precision (and possible slow down the computation).
*/
/** Initialize the pathmeasure with the specified path. The parts of the path that are needed
* are copied, so the client is free to modify/delete the path after this call.
*
* resScale controls the precision of the measure. values > 1 increase the
* precision (and possible slow down the computation).
*/
SkPathMeasure(const SkPath& path, bool forceClosed, SkScalar resScale = 1);
~SkPathMeasure();
/** Reset the pathmeasure with the specified path. The path must remain valid
for the lifetime of the measure object, or until setPath() is called with
a different path (or null), since the measure object keeps a pointer to the
path object (does not copy its data).
*/
/** Reset the pathmeasure with the specified path. The parts of the path that are needed
* are copied, so the client is free to modify/delete the path after this call..
*/
void setPath(const SkPath*, bool forceClosed);
/** Return the total length of the current contour, or 0 if no path