aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/linepaths.cpp
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2015-07-15 06:18:47 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-15 06:18:47 -0700
commit108b5b2c23f2a44ab80b23183e6e962fc3b541e8 (patch)
treee1c027f0a9cdfcb2c320325f1b0ea4f28173c10c /gm/linepaths.cpp
parent001ceb7e1b3d7e3743f021cf9e70754488833859 (diff)
make linepaths gm portable
TBR=reed@google.com Review URL: https://codereview.chromium.org/1225303010
Diffstat (limited to 'gm/linepaths.cpp')
-rw-r--r--gm/linepaths.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/gm/linepaths.cpp b/gm/linepaths.cpp
index 4fb66414fe..2f5c69236a 100644
--- a/gm/linepaths.cpp
+++ b/gm/linepaths.cpp
@@ -82,8 +82,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[] = "Line Drawn Into Rectangle Clips With "
"Indicated Style, Fill and Linecaps, with stroke width 10";
@@ -112,7 +111,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);
@@ -127,8 +126,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),
@@ -226,8 +224,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[] = "Line Closed Drawn Into Rectangle Clips With "
"Indicated Style, Fill and Linecaps, with stroke width 10";
@@ -256,7 +253,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);
@@ -271,8 +268,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),