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:
Mike Reed 2018-08-27 15:00:15 -04:00 committed by Skia Commit-Bot
parent 9af948d468
commit c349f18ee8
2 changed files with 7 additions and 7 deletions

View File

@ -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;

View File

@ -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[],