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

Unified Diff: tests/PictureTest.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 | « src/utils/debugger/SkDrawCommand.cpp ('k') | tests/SurfaceTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PictureTest.cpp
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index 33e058cc2e483fd5f185b501308f984172174990..7b9db8ecb2d9870e9b9b4570c34274dc21036d4b 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -466,6 +466,8 @@ static void test_savelayer_extraction(skiatest::Reporter* reporter) {
static void test_has_text(skiatest::Reporter* reporter) {
SkPictureRecorder recorder;
+ SkMatrix matrix;
+ SkCanvas::TextOnPathMethod method = SkCanvas::kStretch_TextOnPathMethod;
SkCanvas* canvas = recorder.beginRecording(100,100);
{
@@ -502,7 +504,8 @@ static void test_has_text(skiatest::Reporter* reporter) {
path.moveTo(0, 0);
path.lineTo(50, 50);
- canvas->drawTextOnPathHV("Q", 1, path, point.fX, point.fY, SkPaint());
+ matrix.setTranslate(point.fX, point.fY);
+ canvas->drawTextOnPath("Q", 1, path, &matrix, method, SkPaint());
}
picture.reset(recorder.endRecording());
REPORTER_ASSERT(reporter, picture->hasText());
@@ -513,7 +516,7 @@ static void test_has_text(skiatest::Reporter* reporter) {
path.moveTo(0, 0);
path.lineTo(50, 50);
- canvas->drawTextOnPath("Q", 1, path, NULL, SkPaint());
+ canvas->drawTextOnPath("Q", 1, path, NULL, method, SkPaint());
}
picture.reset(recorder.endRecording());
REPORTER_ASSERT(reporter, picture->hasText());
« no previous file with comments | « src/utils/debugger/SkDrawCommand.cpp ('k') | tests/SurfaceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698