diff options
Diffstat (limited to 'gm/cubicpaths.cpp')
-rw-r--r-- | gm/cubicpaths.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/gm/cubicpaths.cpp b/gm/cubicpaths.cpp index 7cd3df159e..1fc13c06cf 100644 --- a/gm/cubicpaths.cpp +++ b/gm/cubicpaths.cpp @@ -19,9 +19,9 @@ protected: SkString onShortName() { return SkString("cubicpath"); } - + SkISize onISize() { return make_isize(1240, 390); } - + void drawPath(SkPath& path,SkCanvas* canvas,SkColor color, const SkRect& clip,SkPaint::Cap cap, SkPaint::Join join, SkPaint::Style style, SkPath::FillType fill, @@ -38,7 +38,7 @@ protected: canvas->drawPath(path, paint); canvas->restore(); } - + virtual void onDraw(SkCanvas* canvas) { struct FillAndName { SkPath::FillType fFill; @@ -111,19 +111,19 @@ protected: if (0 < style) { canvas->translate(rect.width() + 40 * SK_Scalar1, 0); } - + SkColor color = 0xff007000; this->drawPath(path.fPath, canvas, color, rect, gCaps[cap].fCap, gCaps[cap].fJoin, gStyles[style].fStyle, gFills[fill].fFill, SK_Scalar1*10); - + SkPaint rectPaint; rectPaint.setColor(SK_ColorBLACK); rectPaint.setStyle(SkPaint::kStroke_Style); rectPaint.setStrokeWidth(-1); rectPaint.setAntiAlias(true); canvas->drawRect(rect, rectPaint); - + SkPaint labelPaint; labelPaint.setColor(color); labelPaint.setAntiAlias(true); @@ -149,7 +149,7 @@ protected: canvas->restore(); canvas->restore(); } - + private: typedef GM INHERITED; }; @@ -162,9 +162,9 @@ protected: SkString onShortName() { return SkString("cubicclosepath"); } - + SkISize onISize() { return make_isize(1240, 390); } - + void drawPath(SkPath& path,SkCanvas* canvas,SkColor color, const SkRect& clip,SkPaint::Cap cap, SkPaint::Join join, SkPaint::Style style, SkPath::FillType fill, @@ -181,7 +181,7 @@ protected: canvas->drawPath(path, paint); canvas->restore(); } - + virtual void onDraw(SkCanvas* canvas) { struct FillAndName { SkPath::FillType fFill; @@ -255,19 +255,19 @@ protected: if (0 < style) { canvas->translate(rect.width() + 40 * SK_Scalar1, 0); } - + SkColor color = 0xff007000; this->drawPath(path.fPath, canvas, color, rect, gCaps[cap].fCap, gCaps[cap].fJoin, gStyles[style].fStyle, gFills[fill].fFill, SK_Scalar1*10); - + SkPaint rectPaint; rectPaint.setColor(SK_ColorBLACK); rectPaint.setStyle(SkPaint::kStroke_Style); rectPaint.setStrokeWidth(-1); rectPaint.setAntiAlias(true); canvas->drawRect(rect, rectPaint); - + SkPaint labelPaint; labelPaint.setColor(color); labelPaint.setAntiAlias(true); @@ -293,7 +293,7 @@ protected: canvas->restore(); canvas->restore(); } - + private: typedef GM INHERITED; }; |