aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-04-29 11:53:41 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-04-29 11:53:41 +0000
commit3b521d05335a1bf76be3456feb9dbfba0a51b339 (patch)
treecf19b2cfed6b605f4a60cadb666dedfb01c5e475 /include
parente9e08cc7b29f97ee9e823e68c3daf0f55c84b21a (diff)
update dox
code style git-svn-id: http://skia.googlecode.com/svn/trunk@1215 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r--include/core/SkBitmap.h48
1 files changed, 34 insertions, 14 deletions
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h
index 073b246837..91143c1dfc 100644
--- a/include/core/SkBitmap.h
+++ b/include/core/SkBitmap.h
@@ -393,6 +393,15 @@ public:
bool scrollRect(const SkIRect* subset, int dx, int dy,
SkRegion* inval = NULL) const;
+ /**
+ * Return the SkColor of the specified pixel. In most cases this will
+ * require un-premultiplying the color. Alpha only configs (A1 and A8)
+ * return black with the appropriate alpha set. The value is undefined
+ * for kNone_Config or if x or y are out of bounds, or if the bitmap
+ * does not have any pixels (or has not be locked with lockPixels()).
+ */
+ SkColor getColor(int x, int y) const;
+
/** Returns the address of the specified pixel. This performs a runtime
check to know the size of the pixels, and will return the same answer
as the corresponding size-specific method (e.g. getAddr16). Since the
@@ -404,30 +413,41 @@ public:
*/
void* getAddr(int x, int y) const;
- /** Return the SkColor of the specified pixel. In most cases this will
- require un-premultiplying the color. Alpha only configs (A1 and A8)
- return black with the appropriate alpha set. The value is undefined
- for kNone_Config or if x or y are out of bounds.
- */
- SkColor getColor(int x, int y) const;
-
/** Returns the address of the pixel specified by x,y for 32bit pixels.
- */
+ * In debug build, this asserts that the pixels are allocated and locked,
+ * and that the config is 32-bit, however none of these checks are performed
+ * in the release build.
+ */
inline uint32_t* getAddr32(int x, int y) const;
+
/** Returns the address of the pixel specified by x,y for 16bit pixels.
- */
+ * In debug build, this asserts that the pixels are allocated and locked,
+ * and that the config is 16-bit, however none of these checks are performed
+ * in the release build.
+ */
inline uint16_t* getAddr16(int x, int y) const;
+
/** Returns the address of the pixel specified by x,y for 8bit pixels.
- */
+ * In debug build, this asserts that the pixels are allocated and locked,
+ * and that the config is 8-bit, however none of these checks are performed
+ * in the release build.
+ */
inline uint8_t* getAddr8(int x, int y) const;
+
/** Returns the address of the byte containing the pixel specified by x,y
- for 1bit pixels.
- */
+ * for 1bit pixels.
+ * In debug build, this asserts that the pixels are allocated and locked,
+ * and that the config is 1-bit, however none of these checks are performed
+ * in the release build.
+ */
inline uint8_t* getAddr1(int x, int y) const;
/** Returns the color corresponding to the pixel specified by x,y for
- colortable based bitmaps.
- */
+ * colortable based bitmaps.
+ * In debug build, this asserts that the pixels are allocated and locked,
+ * that the config is kIndex8, and that the colortable is allocated,
+ * however none of these checks are performed in the release build.
+ */
inline SkPMColor getIndex8Color(int x, int y) const;
/** Set dst to be a setset of this bitmap. If possible, it will share the