| OLD | NEW |
| 1 #include "SkCanvas.h" | 1 #include "SkCanvas.h" |
| 2 #include "SkCGUtils.h" | 2 #include "SkCGUtils.h" |
| 3 #include "SkGraphics.h" | 3 #include "SkGraphics.h" |
| 4 #include "SkImageDecoder.h" | 4 #include "SkImageDecoder.h" |
| 5 #include "SkOSFile.h" | 5 #include "SkOSFile.h" |
| 6 #include "SkPaint.h" | 6 #include "SkPaint.h" |
| 7 #include "SkPicture.h" | 7 #include "SkPicture.h" |
| 8 #include "SkStream.h" | 8 #include "SkStream.h" |
| 9 #include "SkWindow.h" | 9 #include "SkWindow.h" |
| 10 | 10 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 default: | 128 default: |
| 129 SkDEBUGFAIL("bad verb"); | 129 SkDEBUGFAIL("bad verb"); |
| 130 SkASSERT(0); | 130 SkASSERT(0); |
| 131 return 0; | 131 return 0; |
| 132 } | 132 } |
| 133 } | 133 } |
| 134 return moves; | 134 return moves; |
| 135 } | 135 } |
| 136 | 136 |
| 137 class PathCanvas : public SkCanvas { | 137 class PathCanvas : public SkCanvas { |
| 138 virtual void onDrawPath(const SkPath& path, const SkPaint& paint) { | 138 virtual void drawPath(const SkPath& path, const SkPaint& paint) { |
| 139 if (nameonly) { | 139 if (nameonly) { |
| 140 SkDebugf(" %s%d,\n", filename.c_str(), ++count); | 140 SkDebugf(" %s%d,\n", filename.c_str(), ++count); |
| 141 return; | 141 return; |
| 142 } | 142 } |
| 143 SkPath::Iter iter(path, true); | 143 SkPath::Iter iter(path, true); |
| 144 SkDebugf("<div id=\"%s%d\">\n", filename.c_str(), ++count); | 144 SkDebugf("<div id=\"%s%d\">\n", filename.c_str(), ++count); |
| 145 SkASSERT(path.getFillType() < SkPath::kInverseWinding_FillType); | 145 SkASSERT(path.getFillType() < SkPath::kInverseWinding_FillType); |
| 146 SkDebugf("path.setFillType(SkPath::k%s_FillType);\n", | 146 SkDebugf("path.setFillType(SkPath::k%s_FillType);\n", |
| 147 path.getFillType() == SkPath::kWinding_FillType ? "Winding" : "EvenO
dd"); | 147 path.getFillType() == SkPath::kWinding_FillType ? "Winding" : "EvenO
dd"); |
| 148 int contours = showPathContour(iter); | 148 int contours = showPathContour(iter); |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 } | 297 } |
| 298 return self; | 298 return self; |
| 299 } | 299 } |
| 300 | 300 |
| 301 - (void)drawRect:(NSRect)dirtyRect { | 301 - (void)drawRect:(NSRect)dirtyRect { |
| 302 CGContextRef ctx = (CGContextRef)[[NSGraphicsContext currentContext] graphic
sPort]; | 302 CGContextRef ctx = (CGContextRef)[[NSGraphicsContext currentContext] graphic
sPort]; |
| 303 SkCGDrawBitmap(ctx, fWind->getBitmap(), 0, 0); | 303 SkCGDrawBitmap(ctx, fWind->getBitmap(), 0, 0); |
| 304 } | 304 } |
| 305 | 305 |
| 306 @end | 306 @end |
| OLD | NEW |