Chromium Code Reviews| Index: include/core/SkPath.h |
| diff --git a/include/core/SkPath.h b/include/core/SkPath.h |
| index dd7a672cdd4456862fa3d2715177c18a20c35668..f3791895864444874e689ccf25bb210c2e987319 100644 |
| --- a/include/core/SkPath.h |
| +++ b/include/core/SkPath.h |
| @@ -702,25 +702,36 @@ public: |
| */ |
| void addPoly(const SkPoint pts[], int count, bool close); |
| + enum AddPathMode { |
| + /** Paths are concatenated. */ |
| + kAppend_AddPathMode, |
|
reed1
2014/02/07 17:13:06
/**
* source path contours are added as new conto
|
| + /** Path is added by extending the last contour of the destination path |
| + with the first contour of the source path.*/ |
| + kJoin_AddPathMode |
| + }; |
| + |
| /** Add a copy of src to the path, offset by (dx,dy) |
| @param src The path to add as a new contour |
| @param dx The amount to translate the path in X as it is added |
| @param dx The amount to translate the path in Y as it is added |
| */ |
| - void addPath(const SkPath& src, SkScalar dx, SkScalar dy); |
| + void addPath(const SkPath& src, SkScalar dx, SkScalar dy, |
| + AddPathMode mode = kAppend_AddPathMode); |
| /** Add a copy of src to the path |
| */ |
| - void addPath(const SkPath& src) { |
| + void addPath(const SkPath& src, AddPathMode mode = kAppend_AddPathMode) { |
| SkMatrix m; |
| m.reset(); |
| - this->addPath(src, m); |
| + this->addPath(src, m, mode); |
| } |
| /** Add a copy of src to the path, transformed by matrix |
| @param src The path to add as a new contour |
| + @param matrix Transform applied to src |
| + @param mode Determines how path is added |
| */ |
| - void addPath(const SkPath& src, const SkMatrix& matrix); |
| + void addPath(const SkPath& src, const SkMatrix& matrix, AddPathMode mode = kAppend_AddPathMode); |
| /** |
| * Same as addPath(), but reverses the src input |