add IRect variant of getBounds()
git-svn-id: http://skia.googlecode.com/svn/trunk@3414 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
0beaba5b34
commit
80e1459c32
@ -223,6 +223,7 @@ public:
|
||||
* Return the bitmap's bounds [0, 0, width, height] as an SkRect
|
||||
*/
|
||||
void getBounds(SkRect* bounds) const;
|
||||
void getBounds(SkIRect* bounds) const;
|
||||
|
||||
/** Set the bitmap's config and dimensions. If rowBytes is 0, then
|
||||
ComputeRowBytes() is called to compute the optimal value. This resets
|
||||
|
@ -258,6 +258,11 @@ void SkBitmap::getBounds(SkRect* bounds) const {
|
||||
SkIntToScalar(fWidth), SkIntToScalar(fHeight));
|
||||
}
|
||||
|
||||
void SkBitmap::getBounds(SkIRect* bounds) const {
|
||||
SkASSERT(bounds);
|
||||
bounds->set(0, 0, fWidth, fHeight);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void SkBitmap::setConfig(Config c, int width, int height, int rowBytes) {
|
||||
|
Loading…
Reference in New Issue
Block a user