Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Side by Side Diff: include/utils/SkPathUtils.h

Issue 1060703003: Revert of remove unused (by clients) SkPathUtils (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gyp/utils.gypi ('k') | samplecode/SamplePathUtils.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * CAUTION: EXPERIMENTAL CODE
3 *
4 * This code is not to be used and will not be supported
5 * if it fails on you. DO NOT USE!
6 *
7 */
8
9 #ifndef SkPathUtils_DEFINED
10 #define SkPathUtils_DEFINED
11
12 #include "SkPath.h"
13
14 /*
15 * The following methods return the boundary path given a 1-bit bitmap, specifie d
16 * by width/height and stride. The bits are interpreted as 1 being "in" the path ,
17 * and 0 being "out". The bits are interpreted as MSB on the left, and LSB on th e right.
18 */
19
20 class SK_API SkPathUtils {
21 public:
22 /**
23 This variation iterates the binary data sequentially (as in scanline fash ion)
24 and will add each run of 1's to the path as a rectangular path. Upon pars ing
25 all binary data the path is simplified using the PathOps::Simplify() meth od.
26 */
27 static void BitsToPath_Path(SkPath* path, const char* bitmap,
28 int w, int h, int rowBytes);
29
30 /**
31 This variation utilizes the SkRegion class to generate paths, adding
32 each run of 1's to the SkRegion as an SkIRect. Upon parsing the entirety
33 of the binary the SkRegion is converted to a Path via getBoundaryPath().
34 */
35 static void BitsToPath_Region(SkPath* path, const char* bitmap,
36 int w, int h, int rowBytes);
37
38 };
39
40 #endif
OLDNEW
« no previous file with comments | « gyp/utils.gypi ('k') | samplecode/SamplePathUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698