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

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

Issue 16829003: Adding my Bitmap2Path sample for 1on1 meeting. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Added SkRegion mode to PathUtils and Test. Created 7 years, 5 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 | Annotate | Revision Log
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 */
10
11 #ifndef SkPathUtils_DEFINED
12 #define SKPathUtils_DEFINED
13
14 #include "SkPath.h"
15 //#include "SkPathOps.h" // this file can't be found
reed1 2013/06/26 16:54:24 Not needed anyway for a header (just the impl)
16
17 typedef void (*line2path)(SkPath*, const char*, int, int);
reed1 2013/06/26 16:54:24 These 4 lines need not be in the header
18 #define SQRT_2 1.41421356237f
19 #define ON 0xFF000000 // black pixel
20 #define OFF 0x00000000 // transparent pixel
21
22
23 class SK_API SkPathUtils {
24 public:
25 static void fillRandomBits(int chars, char* bits);
26 static int getBit(const char* buffer, int x);
27 static void line2path_pixel(SkPath* path, const char* line,
28 int lineIdx, int width);
29 static void line2path_pixelCircle(SkPath* path, const char* line,
30 int lineIdx, int width);
31 static void line2path_span(SkPath* path, const char* line,
32 int lineIdx, int width);
33 static void bitmap2path(SkPath* path, const char* bitmap,
reed1 2013/06/26 16:54:24 1. I think only these last 2 need to be in the pub
34 const line2path l2p_fn,
reed1 2013/06/26 16:54:24 Since "bitmap" is a pretty loaded word in Skia, pe
35 int h, int w, int stride);
36 static void bitmap2path_region(SkPath* path, const char* bitmap,
37 int h, int w, int stride);
38 };
39
40 #endif
OLDNEW
« no previous file with comments | « gyp/utils.gyp ('k') | samplecode/SamplePathUtils.cpp » ('j') | src/utils/SkPathUtils.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698