Index: gm/scaletext.cpp |
diff --git a/gm/fontscaler.cpp b/gm/scaletext.cpp |
old mode 100644 |
new mode 100755 |
similarity index 80% |
copy from gm/fontscaler.cpp |
copy to gm/scaletext.cpp |
index 33f6779d2c295577432e78e988385e5b94ff170a..c80399113571abf605251e097982a972e3b52c2a |
--- a/gm/fontscaler.cpp |
+++ b/gm/scaletext.cpp |
@@ -9,18 +9,18 @@ |
namespace skiagm { |
-class FontScalerGM : public GM { |
+class ScaleTextGM : public GM { |
public: |
- FontScalerGM() { |
+ ScaleTextGM() { |
this->setBGColor(0xFFFFFFFF); |
} |
- virtual ~FontScalerGM() { |
+ virtual ~ScaleTextGM() { |
} |
protected: |
virtual SkString onShortName() { |
- return SkString("fontscaler"); |
+ return SkString("scaletext"); |
} |
virtual SkISize onISize() { |
@@ -43,21 +43,21 @@ protected: |
//With freetype the default (normal hinting) can be really ugly. |
//Most distros now set slight (vertical hinting only) in any event. |
paint.setHinting(SkPaint::kSlight_Hinting); |
- SkSafeUnref(paint.setTypeface(SkTypeface::CreateFromName("Times Roman", SkTypeface::kNormal))); |
+ SkSafeUnref(paint.setTypeface(SkTypeface::CreateFromName("Times New Roman", SkTypeface::kNormal))); |
- const char* text = "Hamburgefons ooo mmm"; |
+ const char* text = "Thamburgefons ooo mmm"; |
const size_t textLen = strlen(text); |
- for (int j = 0; j < 2; ++j) { |
+ for (int j = 0; j < 1; ++j) { |
// This used to do 6 iterations but it causes the N4 to crash in the MSAA4 config. |
- for (int i = 0; i < 5; ++i) { |
+ for (int i = 0; i < 2; ++i) { |
SkScalar x = SkIntToScalar(10); |
SkScalar y = SkIntToScalar(20); |
SkAutoCanvasRestore acr(canvas, true); |
- canvas->translate(SkIntToScalar(50 + i * 230), |
+ canvas->translate(SkIntToScalar(50 + 4*i * 230), |
SkIntToScalar(20)); |
- rotate_about(canvas, SkIntToScalar(i * 5), x, y * 10); |
+ rotate_about(canvas, SkIntToScalar(4*i * 5), x, y * 10); |
{ |
SkPaint p; |
@@ -69,7 +69,7 @@ protected: |
} |
int index = 0; |
- for (int ps = 6; ps <= 22; ps++) { |
+ for (int ps = 6; ps <= 50; ps += 2) { |
paint.setTextSize(SkIntToScalar(ps)); |
canvas->drawText(text, textLen, x, y, paint); |
y += paint.getFontMetrics(NULL); |
@@ -87,7 +87,7 @@ private: |
////////////////////////////////////////////////////////////////////////////// |
-static GM* MyFactory(void*) { return new FontScalerGM; } |
+static GM* MyFactory(void*) { return new ScaleTextGM; } |
static GMRegistry reg(MyFactory); |
} |