OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |