diff options
author | 2014-09-26 10:33:37 -0400 | |
---|---|---|
committer | 2014-09-26 10:33:37 -0400 | |
commit | c13bc571d3e61a43b87eb97f0719abd304cafaf2 (patch) | |
tree | 819036c0fc5634ddf7784a036c0f1fe2ce914b9a /experimental | |
parent | 2cce421bdf836ea269ddc98ffbb688acb8dd544e (diff) |
Fix SkTextBlob offset semantics.
Implement proper x/y drawTextBlob() handling by plumbing a
drawPosText() offset parameter (to act as an additional glyph pos
translation) throughout the device layer.
The new offset superceeds the existing constY, with a minor semantic
tweak: whereas previous implementations were ignoring constY in 2D
positioning mode (scalarsPerGlyph == 2), now the offset is always
observed, in all positioning modes. We can do this because existing
drawPosText() clients always pass constY == 0 for full positioning mode.
R=reed@google.com, jvanverth@google.com, robertphillips@google.com
Review URL: https://codereview.chromium.org/605533002
Diffstat (limited to 'experimental')
-rw-r--r-- | experimental/PdfViewer/SkTrackDevice.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/experimental/PdfViewer/SkTrackDevice.h b/experimental/PdfViewer/SkTrackDevice.h index ca4c6894aa..8d6a923b18 100644 --- a/experimental/PdfViewer/SkTrackDevice.h +++ b/experimental/PdfViewer/SkTrackDevice.h @@ -120,10 +120,10 @@ protected: } virtual void drawPosText(const SkDraw& dummy1, const void* text, size_t len, - const SkScalar pos[], SkScalar constY, - int scalarsPerPos, const SkPaint& paint) { + const SkScalar pos[], int scalarsPerPos, + const SkPoint& offset, const SkPaint& paint) { before(); - INHERITED::drawPosText(dummy1, text, len, pos, constY, scalarsPerPos, paint); + INHERITED::drawPosText(dummy1, text, len, pos, scalarsPerPos, offset, paint); after(); } |