aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/gammatext.cpp
diff options
context:
space:
mode:
authorGravatar rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-23 18:14:13 +0000
committerGravatar rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-23 18:14:13 +0000
commitd6176b0dcacb124539e0cfd051e6d93a9782f020 (patch)
tree9e6f4b465e54c9b26e1ba70cd8890b55abb08464 /gm/gammatext.cpp
parentfbfcd5602128ec010c82cb733c9cdc0a3254f9f3 (diff)
Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)
This CL is part II of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6474054 git-svn-id: http://skia.googlecode.com/svn/trunk@5263 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm/gammatext.cpp')
-rw-r--r--gm/gammatext.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/gm/gammatext.cpp b/gm/gammatext.cpp
index 3e3163ca4a..99642f6e3e 100644
--- a/gm/gammatext.cpp
+++ b/gm/gammatext.cpp
@@ -50,7 +50,7 @@ static CGContextRef makeCG(const SkBitmap& bm) {
CGContextSetAllowsFontSubpixelQuantization(cg, false);
CGContextSetShouldSubpixelQuantizeFonts(cg, false);
-
+
return cg;
}
@@ -81,7 +81,7 @@ static void cgSetPaintForText(CGContextRef cg, const SkPaint& paint) {
CGContextSetAllowsFontSubpixelPositioning(cg, paint.isSubpixelText());
CGContextSetShouldSubpixelPositionFonts(cg, paint.isSubpixelText());
-
+
CGContextSetShouldAntialias(cg, paint.isAntiAlias());
CGContextSetShouldSmoothFonts(cg, paint.isLCDRenderText());
}
@@ -107,7 +107,7 @@ namespace skiagm {
Each region should show as a blue center surrounded by a 2px green
border, with no red.
*/
-
+
#define HEIGHT 480
class GammaTextGM : public GM {
@@ -133,7 +133,7 @@ protected:
#else
SkShader* s = make_heatGradient(pts);
#endif
-
+
canvas->clear(SK_ColorRED);
SkPaint paint;
paint.setShader(s)->unref();
@@ -145,7 +145,7 @@ protected:
#ifdef SK_BUILD_FOR_MAC
CGContextRef cg = makeCG(canvas->getDevice()->accessBitmap(false));
#endif
-
+
drawGrad(canvas);
const SkColor fg[] = {
@@ -154,7 +154,7 @@ protected:
0xFFFF0000, 0xFF00FF00, 0xFF0000FF,
0xFF000000,
};
-
+
const char* text = "Hamburgefons";
size_t len = strlen(text);
@@ -167,13 +167,13 @@ protected:
SkScalar x = SkIntToScalar(10);
for (size_t i = 0; i < SK_ARRAY_COUNT(fg); ++i) {
paint.setColor(fg[i]);
-
+
SkScalar y = SkIntToScalar(40);
SkScalar stopy = SkIntToScalar(HEIGHT);
while (y < stopy) {
if (true) {
canvas->drawText(text, len, x, y, paint);
- }
+ }
#ifdef SK_BUILD_FOR_MAC
else {
cgDrawText(cg, text, len, SkScalarToFloat(x),