aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-07-07 10:22:31 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-07 10:22:31 -0700
commita8db72864a43ad1fbba3c2892cf5cd88060a43ef (patch)
tree21845a4d0d502dba3ee439320099c94406bdf53f /include
parent31dc1b2db0f04e68e540ebc339c8bde0978e5b97 (diff)
add matrix options to drawDrawable
Diffstat (limited to 'include')
-rw-r--r--include/core/SkCanvas.h5
-rw-r--r--include/core/SkDrawable.h3
2 files changed, 5 insertions, 3 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index a8e2c7f19d..9a46801a98 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -1073,7 +1073,8 @@ public:
* If the intent is to force the contents of the drawable into this canvas immediately,
* then drawable->draw(canvas) may be called.
*/
- void drawDrawable(SkDrawable* drawable);
+ void drawDrawable(SkDrawable* drawable, const SkMatrix* = NULL);
+ void drawDrawable(SkDrawable*, SkScalar x, SkScalar y);
//////////////////////////////////////////////////////////////////////////
@@ -1229,7 +1230,7 @@ protected:
virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4],
const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint);
- virtual void onDrawDrawable(SkDrawable*);
+ virtual void onDrawDrawable(SkDrawable*, const SkMatrix*);
virtual void onDrawPaint(const SkPaint&);
virtual void onDrawRect(const SkRect&, const SkPaint&);
diff --git a/include/core/SkDrawable.h b/include/core/SkDrawable.h
index 15bb0bbe0f..2f0a62d8b5 100644
--- a/include/core/SkDrawable.h
+++ b/include/core/SkDrawable.h
@@ -30,7 +30,8 @@ public:
* (i.e. the saveLevel() on the canvas will match what it was when draw() was called,
* and the current matrix and clip settings will not be changed.
*/
- void draw(SkCanvas*);
+ void draw(SkCanvas*, const SkMatrix* = NULL);
+ void draw(SkCanvas*, SkScalar x, SkScalar y);
SkPicture* newPictureSnapshot();