aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/quadpaths.cpp
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2015-07-15 11:57:00 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-15 11:57:00 -0700
commit5df0575f04393bd8aa29269930524148532ce4c3 (patch)
treec1526fab9d5008fbc90303cdbc586897f288814d /gm/quadpaths.cpp
parent91e51cbd64541c18fbf806b7bc347c0bc7faf322 (diff)
make gradtext quadpaths gm portable
TBR=reed@google.com Review URL: https://codereview.chromium.org/1234233003
Diffstat (limited to 'gm/quadpaths.cpp')
-rw-r--r--gm/quadpaths.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/gm/quadpaths.cpp b/gm/quadpaths.cpp
index d5eb646313..5e4b7a43a7 100644
--- a/gm/quadpaths.cpp
+++ b/gm/quadpaths.cpp
@@ -83,8 +83,7 @@ protected:
SkPaint titlePaint;
titlePaint.setColor(SK_ColorBLACK);
titlePaint.setAntiAlias(true);
- sk_tool_utils::set_portable_typeface(&titlePaint);
- titlePaint.setLCDRenderText(true);
+ sk_tool_utils::set_portable_typeface_always(&titlePaint);
titlePaint.setTextSize(15 * SK_Scalar1);
const char title[] = "Quad Drawn Into Rectangle Clips With "
"Indicated Style, Fill and Linecaps, with stroke width 10";
@@ -113,7 +112,7 @@ protected:
canvas->translate(rect.width() + 40 * SK_Scalar1, 0);
}
- SkColor color = 0xff007000;
+ SkColor color = sk_tool_utils::color_to_565(0xff007000);
this->drawPath(path.fPath, canvas, color, rect,
gCaps[cap].fCap, gCaps[cap].fJoin, gStyles[style].fStyle,
gFills[fill].fFill, SK_Scalar1*10);
@@ -128,8 +127,7 @@ protected:
SkPaint labelPaint;
labelPaint.setColor(color);
labelPaint.setAntiAlias(true);
- sk_tool_utils::set_portable_typeface(&labelPaint);
- labelPaint.setLCDRenderText(true);
+ sk_tool_utils::set_portable_typeface_always(&labelPaint);
labelPaint.setTextSize(10 * SK_Scalar1);
canvas->drawText(gStyles[style].fName,
strlen(gStyles[style].fName),
@@ -229,8 +227,7 @@ protected:
SkPaint titlePaint;
titlePaint.setColor(SK_ColorBLACK);
titlePaint.setAntiAlias(true);
- sk_tool_utils::set_portable_typeface(&titlePaint);
- titlePaint.setLCDRenderText(true);
+ sk_tool_utils::set_portable_typeface_always(&titlePaint);
titlePaint.setTextSize(15 * SK_Scalar1);
const char title[] = "Quad Closed Drawn Into Rectangle Clips With "
"Indicated Style, Fill and Linecaps, with stroke width 10";
@@ -259,7 +256,7 @@ protected:
canvas->translate(rect.width() + 40 * SK_Scalar1, 0);
}
- SkColor color = 0xff007000;
+ SkColor color = sk_tool_utils::color_to_565(0xff007000);
this->drawPath(path.fPath, canvas, color, rect,
gCaps[cap].fCap, gCaps[cap].fJoin, gStyles[style].fStyle,
gFills[fill].fFill, SK_Scalar1*10);
@@ -274,8 +271,7 @@ protected:
SkPaint labelPaint;
labelPaint.setColor(color);
labelPaint.setAntiAlias(true);
- sk_tool_utils::set_portable_typeface(&labelPaint);
- labelPaint.setLCDRenderText(true);
+ sk_tool_utils::set_portable_typeface_always(&labelPaint);
labelPaint.setTextSize(10 * SK_Scalar1);
canvas->drawText(gStyles[style].fName,
strlen(gStyles[style].fName),