aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-02-07 22:44:43 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-02-07 22:44:43 +0000
commit3dd42b3c87299ad17b4df93fe251f6f9362495dc (patch)
tree754d21aacca6feb34444a51ad60ca7b1d3395bfe /include/core
parent88daf2803aaba985c6ed950d1baa98a32e190f4c (diff)
update dox for readPixels()
git-svn-id: http://skia.googlecode.com/svn/trunk@772 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkCanvas.h2
-rw-r--r--include/core/SkDevice.h12
2 files changed, 9 insertions, 5 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index c6f435bb1f..a95a5993e9 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -126,6 +126,8 @@ public:
/**
* Copy the pixels from the device into bitmap. Returns true on success.
* If false is returned, then the bitmap parameter is left unchanged.
+ * The bitmap parameter is treated as output-only, and will be completely
+ * overwritten (if the method returns true).
*/
bool readPixels(const SkIRect& srcRect, SkBitmap* bitmap);
bool readPixels(SkBitmap* bitmap);
diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h
index b9a96d9aae..a1e6a64392 100644
--- a/include/core/SkDevice.h
+++ b/include/core/SkDevice.h
@@ -55,10 +55,10 @@ public:
the bitmap. If transferPixelOwnership is true, and the bitmap claims to own its
own pixels (getOwnsPixels() == true), then transfer this responsibility to the
device, and call setOwnsPixels(false) on the bitmap.
-
+
Subclasses may override the destructor, which is virtual, even though this class
doesn't have one. SkRefCnt does.
-
+
@param bitmap A copy of this bitmap is made and stored in the device
*/
SkDevice(SkCanvas*, const SkBitmap& bitmap, bool forOffscreen);
@@ -87,11 +87,11 @@ public:
implicitly opaque.
*/
bool isOpaque() const { return fBitmap.isOpaque(); }
-
+
/** Return the bounds of the device
*/
void getBounds(SkIRect* bounds) const;
-
+
/** Return true if the specified rectangle intersects the bounds of the
device. If sect is not NULL and there is an intersection, sect returns
the intersection.
@@ -132,7 +132,7 @@ public:
for drawing).
*/
virtual void gainFocus(SkCanvas*, const SkMatrix&, const SkRegion&) {}
-
+
/** Causes any deferred drawing to the device to be completed.
*/
virtual void flush() {}
@@ -140,6 +140,8 @@ public:
/**
* Copy the pixels from the device into bitmap. Returns true on success.
* If false is returned, then the bitmap parameter is left unchanged.
+ * The bitmap parameter is treated as output-only, and will be completely
+ * overwritten (if the method returns true).
*/
virtual bool readPixels(const SkIRect& srcRect, SkBitmap* bitmap);