aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-11-01 14:24:23 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-11-01 14:24:23 +0000
commit210ce003a5ec039dda80de0569fb47ca4efc4dc7 (patch)
treef5c7f7265ef0d48711e350dc7542d9ebe225e320 /include/core
parentf2fc5a5708124af00b499b57bda06220fd14650b (diff)
add getDeviceSize() so callers won't need to call getDevice() so much
... we hope to make devices private in the future git-svn-id: http://skia.googlecode.com/svn/trunk@2577 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkCanvas.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 160b8fb769..b2bdafe738 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -61,6 +61,13 @@ public:
///////////////////////////////////////////////////////////////////////////
+ /**
+ * Return the width/height of the underlying device. The current drawable
+ * area may be small (due to clipping or saveLayer). For a canvas with
+ * no device, 0,0 will be returned.
+ */
+ SkISize getDeviceSize() const;
+
/** Return the canvas' device object, which may be null. The device holds
the bitmap of the pixels that the canvas draws into. The reference count
of the returned device is not changed by this call.