aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-07 16:22:47 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-07 16:22:47 +0000
commit2515242ee079af3b3555620ea0c92338f47620fd (patch)
treef30a704c6049e727d2bf6604631a5dcdf4e91aa4 /include
parentfbd370572acd43253cd29190d68137dee17db1b8 (diff)
Add SkCanvas::drawPosTextBounded.
This allows subclasses which need bounding box information to get it from the caller if it has already been computed. BUG=chromium:269080 R=reed@google.com, tomhudson@chromium.org, tomhudson@google.com Author: jbroman@chromium.org Review URL: https://chromiumcodereview.appspot.com/22585002 git-svn-id: http://skia.googlecode.com/svn/trunk@10612 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r--include/core/SkCanvas.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index b4853f7f33..c3a18ee137 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -750,6 +750,18 @@ public:
virtual void drawPosText(const void* text, size_t byteLength,
const SkPoint pos[], const SkPaint& paint);
+ /** Draw the text, with each character/glyph origin specified by the pos[]
+ array. The origin is interpreted by the Align setting in the paint.
+ @param text The text to be drawn
+ @param byteLength The number of bytes to read from the text parameter
+ @param pos Array of positions, used to position each character
+ @param bbox Precomputed bounding box of the text.
+ @param paint The paint used for the text (e.g. color, size, style)
+ */
+ virtual void drawPosTextBounded(const void* text, size_t byteLength,
+ const SkPoint pos[], const SkRect& bbox,
+ const SkPaint& paint);
+
/** Draw the text, with each character/glyph origin specified by the x
coordinate taken from the xpos[] array, and the y from the constY param.
The origin is interpreted by the Align setting in the paint.