aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils/SkPictureUtils.cpp
diff options
context:
space:
mode:
authorGravatar Florin Malita <fmalita@google.com>2014-09-26 10:33:37 -0400
committerGravatar Florin Malita <fmalita@google.com>2014-09-26 10:33:37 -0400
commitc13bc571d3e61a43b87eb97f0719abd304cafaf2 (patch)
tree819036c0fc5634ddf7784a036c0f1fe2ce914b9a /src/utils/SkPictureUtils.cpp
parent2cce421bdf836ea269ddc98ffbb688acb8dd544e (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 'src/utils/SkPictureUtils.cpp')
-rw-r--r--src/utils/SkPictureUtils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/SkPictureUtils.cpp b/src/utils/SkPictureUtils.cpp
index 4f4d2bf30a..391e5ffc79 100644
--- a/src/utils/SkPictureUtils.cpp
+++ b/src/utils/SkPictureUtils.cpp
@@ -132,8 +132,8 @@ public:
this->addBitmapFromPaint(paint);
}
virtual void drawPosText(const SkDraw&, const void* text, size_t len,
- const SkScalar pos[], SkScalar constY,
- int, const SkPaint& paint) SK_OVERRIDE {
+ const SkScalar pos[], int,
+ const SkPoint&, const SkPaint& paint) SK_OVERRIDE {
this->addBitmapFromPaint(paint);
}
virtual void drawTextOnPath(const SkDraw&, const void* text, size_t len,