Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: gm/shadertext2.cpp

Issue 933483002: add Method param to drawTextOnPath, supporting SVG spec Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add guard for android Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gm/shadertext2.cpp
diff --git a/gm/shadertext2.cpp b/gm/shadertext2.cpp
index 31d1e8986957d7e4f7b648736babe08ccff34058..cb95cd471914278558fc48af53ecbe9cd8d10a5a 100644
--- a/gm/shadertext2.cpp
+++ b/gm/shadertext2.cpp
@@ -41,8 +41,10 @@ struct LabeledMatrix {
};
class ShaderText2GM : public GM {
+ SkCanvas::TextOnPathMethod fMethod;
+
public:
- ShaderText2GM() {
+ ShaderText2GM() : fMethod(SkCanvas::kStretch_TextOnPathMethod) {
this->setBGColor(0xFFDDDDDD);
}
@@ -174,8 +176,8 @@ protected:
canvas->save();
canvas->concat(matrices[m].fMatrix);
- canvas->drawTextOnPath(kText, kTextLen, path, NULL, paint);
- canvas->drawTextOnPath(kText, kTextLen, path, NULL, outlinePaint);
+ canvas->drawTextOnPath(kText, kTextLen, path, NULL, fMethod, paint);
+ canvas->drawTextOnPath(kText, kTextLen, path, NULL, fMethod, outlinePaint);
canvas->restore();
SkPaint stroke;
stroke.setStyle(SkPaint::kStroke_Style);

Powered by Google App Engine
This is Rietveld 408576698