Index: gm/lcdtext.cpp |
diff --git a/gm/lcdtext.cpp b/gm/lcdtext.cpp |
index a2bfa01d3827ccac3f66a267042c523a1984de45..978bfd641ee1ca6afea86337a478a001408012e0 100644 |
--- a/gm/lcdtext.cpp |
+++ b/gm/lcdtext.cpp |
@@ -23,19 +23,19 @@ public: |
const int pointSize = 36; |
textHeight = SkIntToScalar(pointSize); |
} |
- |
+ |
protected: |
- |
+ |
SkString onShortName() { |
SkString name("lcdtext"); |
name.append(sk_tool_utils::major_platform_os_name()); |
return name; |
} |
- |
+ |
SkISize onISize() { return SkISize::Make(640, 480); } |
- |
+ |
virtual void onDraw(SkCanvas* canvas) { |
- |
+ |
y = textHeight; |
drawText(canvas, SkString("TEXT: SubpixelTrue LCDRenderTrue"), |
true, true); |
@@ -46,7 +46,7 @@ protected: |
drawText(canvas, SkString("TEXT: SubpixelFalse LCDRenderFalse"), |
false, false); |
} |
- |
+ |
void drawText(SkCanvas* canvas, const SkString& string, |
bool subpixelTextEnabled, bool lcdRenderTextEnabled) { |
SkPaint paint; |
@@ -56,11 +56,11 @@ protected: |
paint.setSubpixelText(subpixelTextEnabled); |
paint.setLCDRenderText(lcdRenderTextEnabled); |
paint.setTextSize(textHeight); |
- |
+ |
canvas->drawText(string.c_str(), string.size(), 0, y, paint); |
y += textHeight; |
} |
- |
+ |
private: |
typedef skiagm::GM INHERITED; |
SkScalar y, textHeight; |
@@ -85,14 +85,14 @@ class LcdTextSizeGM : public skiagm::GM { |
public: |
LcdTextSizeGM() {} |
- |
+ |
protected: |
SkString onShortName() { |
return SkString("lcdtextsize"); |
} |
- |
+ |
SkISize onISize() { return SkISize::Make(320, 120); } |
- |
+ |
virtual void onDraw(SkCanvas* canvas) { |
const char* lcd_text = "LCD"; |
const char* gray_text = "GRAY"; |