Index: gm/colorwheel.cpp |
diff --git a/gm/colorwheel.cpp b/gm/colorwheel.cpp |
index 93c59388d927d3295dd3e888e4115740fd658615..efc40131571831b23504428ee0f23e09373bee14 100644 |
--- a/gm/colorwheel.cpp |
+++ b/gm/colorwheel.cpp |
@@ -55,3 +55,25 @@ DEF_SIMPLE_GM(colorwheel, canvas, 256, 256) { |
draw_bitmap(canvas, "color_wheel.webp", 0, 128); // bottom left |
draw_bitmap(canvas, "color_wheel.jpg", 128, 128); // bottom right |
} |
+ |
+DEF_SIMPLE_GM(colorwheelnative, canvas, 128, 28) { |
scroggo
2014/12/02 17:45:57
Might there be a more descriptive name?
|
+ SkPaint paint; |
+ paint.setTypeface(SkTypeface::CreateFromName("Arial", SkTypeface::kBold)); |
scroggo
2014/12/02 17:45:57
Is there a particular reason you chose this font?
|
+ paint.setTextSize(18.0f); |
+ |
+ canvas->clear(SK_ColorLTGRAY); |
+ paint.setColor(SK_ColorRED); |
+ canvas->drawText("R", 1, 8.0f, 20.0f, paint); |
+ paint.setColor(SK_ColorGREEN); |
+ canvas->drawText("G", 1, 24.0f, 20.0f, paint); |
+ paint.setColor(SK_ColorBLUE); |
+ canvas->drawText("B", 1, 40.0f, 20.0f, paint); |
+ paint.setColor(SK_ColorCYAN); |
+ canvas->drawText("C", 1, 56.0f, 20.0f, paint); |
+ paint.setColor(SK_ColorMAGENTA); |
+ canvas->drawText("M", 1, 72.0f, 20.0f, paint); |
+ paint.setColor(SK_ColorYELLOW); |
+ canvas->drawText("Y", 1, 88.0f, 20.0f, paint); |
+ paint.setColor(SK_ColorBLACK); |
+ canvas->drawText("K", 1, 104.0f, 20.0f, paint); |
+} |