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

Side by Side Diff: src/animator/SkTextOnPath.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 unified diff | Download patch
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkTextOnPath.h" 10 #include "SkTextOnPath.h"
(...skipping 15 matching lines...) Expand all
26 26
27 DEFINE_GET_MEMBER(SkTextOnPath); 27 DEFINE_GET_MEMBER(SkTextOnPath);
28 28
29 SkTextOnPath::SkTextOnPath() : offset(0), path(NULL), text(NULL) { 29 SkTextOnPath::SkTextOnPath() : offset(0), path(NULL), text(NULL) {
30 } 30 }
31 31
32 bool SkTextOnPath::draw(SkAnimateMaker& maker) { 32 bool SkTextOnPath::draw(SkAnimateMaker& maker) {
33 SkASSERT(text); 33 SkASSERT(text);
34 SkASSERT(path); 34 SkASSERT(path);
35 SkBoundableAuto boundable(this, maker); 35 SkBoundableAuto boundable(this, maker);
36 maker.fCanvas->drawTextOnPathHV(text->getText(), text->getSize(), 36 SkMatrix matrix;
37 path->getPath(), offset, 0, *maker.fPaint); 37 matrix.setTranslate(offset, 0);
38 maker.fCanvas->drawTextOnPath(text->getText(), text->getSize(),
39 path->getPath(), &matrix, SkCanvas::kStretch_T extOnPathMethod,
40 *maker.fPaint);
38 return false; 41 return false;
39 } 42 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698