use textonpath util for canvas::drawTextOnPath
- slight change in pixels - will allow us to remove lots of virtuals Bug: skia:7554 Change-Id: I8f95c07bf67760824d9d9bf59c28f11835971d4b Reviewed-on: https://skia-review.googlesource.com/149683 Commit-Queue: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com> Auto-Submit: Mike Reed <reed@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
This commit is contained in:
parent
9af948d468
commit
c349f18ee8
@ -1948,6 +1948,8 @@ public:
|
||||
|
||||
/** Draws text on SkPath path, using clip, SkMatrix, and SkPaint paint.
|
||||
|
||||
DEPRECATED
|
||||
|
||||
Origin of text is at distance hOffset along the path, offset by a perpendicular
|
||||
vector of length vOffset. If the path section corresponding the glyph advance is
|
||||
curved, the glyph is drawn curved to match; control points in the glyph are
|
||||
@ -1975,6 +1977,8 @@ public:
|
||||
|
||||
/** Draws text on SkPath path, using clip, SkMatrix, and SkPaint paint.
|
||||
|
||||
DEPRECATED
|
||||
|
||||
Origin of text is at beginning of path offset by matrix, if not nullptr.
|
||||
matrix transforms text before text is mapped to path. If the path section
|
||||
corresponding the glyph advance is curved, the glyph is drawn curved to match;
|
||||
|
@ -2473,15 +2473,11 @@ void SkCanvas::onDrawPosTextH(const void* text, size_t byteLength, const SkScala
|
||||
LOOPER_END
|
||||
}
|
||||
|
||||
#include "SkTextOnPath.h"
|
||||
|
||||
void SkCanvas::onDrawTextOnPath(const void* text, size_t byteLength, const SkPath& path,
|
||||
const SkMatrix* matrix, const SkPaint& paint) {
|
||||
LOOPER_BEGIN(paint, nullptr)
|
||||
|
||||
while (iter.next()) {
|
||||
iter.fDevice->drawTextOnPath(text, byteLength, path, matrix, looper.paint());
|
||||
}
|
||||
|
||||
LOOPER_END
|
||||
SkDrawTextOnPath(text, byteLength, paint, path, matrix, this);
|
||||
}
|
||||
|
||||
void SkCanvas::onDrawTextRSXform(const void* text, size_t len, const SkRSXform xform[],
|
||||
|
Loading…
Reference in New Issue
Block a user