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

Unified Diff: samplecode/SampleShaderText.cpp

Issue 933483002: add Method param to drawTextOnPath, supporting SVG spec Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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
« no previous file with comments | « samplecode/SampleAll.cpp ('k') | samplecode/SampleSlides.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleShaderText.cpp
diff --git a/samplecode/SampleShaderText.cpp b/samplecode/SampleShaderText.cpp
index 89abfc234549d0b355f64e2e3b346e823a07a8ab..e9f7a405e8ca675553b35f858b6075e537c89afc 100644
--- a/samplecode/SampleShaderText.cpp
+++ b/samplecode/SampleShaderText.cpp
@@ -168,6 +168,7 @@ protected:
static const int testsPerCol = 8;
static const int rowHeight = 60;
static const int colWidth = 300;
+ SkCanvas::TextOnPathMethod method = SkCanvas::kStretch_TextOnPathMethod;
canvas->save();
for (size_t s = 0; s < SK_ARRAY_COUNT(shaders); s++) {
canvas->save();
@@ -181,7 +182,7 @@ protected:
++i;
canvas->translate(SkIntToScalar((i / testsPerCol) * colWidth),
SkIntToScalar((i % testsPerCol) * rowHeight));
- canvas->drawTextOnPath(text, textLen, path, NULL, paint);
+ canvas->drawTextOnPath(text, textLen, path, NULL, method, paint);
canvas->restore();
}
canvas->restore();
« no previous file with comments | « samplecode/SampleAll.cpp ('k') | samplecode/SampleSlides.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698