Line-endings only change (some windows line-endings snuck in)

git-svn-id: http://skia.googlecode.com/svn/trunk@2588 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
bsalomon@google.com 2011-11-02 20:10:48 +00:00
parent 910267dde2
commit daba14b7d4
2 changed files with 33 additions and 33 deletions

View File

@ -105,35 +105,35 @@ public:
///////////////////////////////////////////////////////////////////////////
/**
* On success (returns true), copy the canvas pixels into the bitmap.
* On failure, the bitmap parameter is left unchanged and false is
* returned.
*
* If the canvas is backed by a non-raster device (e.g. PDF) then
* readPixels will fail.
*
* If the bitmap has pixels already allocated, the canvas pixels will be
* written there. If not, bitmap->allocPixels() will be called
* automatically. If the bitmap is backed by a texture readPixels will
* fail.
*
* The canvas' pixels are converted to the bitmap's config. The only
* supported config is kARGB_8888_Config, though this may be relaxed in
* future.
*
* The actual pixels written is the intersection of the canvas' bounds, and
* the rectangle formed by the bitmap's width,height and the specified x,y.
* If bitmap pixels extend outside of that intersection, they will not be
* modified.
*
* Example that reads the entire canvas into a bitmap:
* SkISize size = canvas->getDeviceSize();
* bitmap->setConfig(SkBitmap::kARGB_8888_Config, size.fWidth,
* size.fHeight);
* if (canvas->readPixels(bitmap, 0, 0)) {
* // use the pixels
* }
/**
* On success (returns true), copy the canvas pixels into the bitmap.
* On failure, the bitmap parameter is left unchanged and false is
* returned.
*
* If the canvas is backed by a non-raster device (e.g. PDF) then
* readPixels will fail.
*
* If the bitmap has pixels already allocated, the canvas pixels will be
* written there. If not, bitmap->allocPixels() will be called
* automatically. If the bitmap is backed by a texture readPixels will
* fail.
*
* The canvas' pixels are converted to the bitmap's config. The only
* supported config is kARGB_8888_Config, though this may be relaxed in
* future.
*
* The actual pixels written is the intersection of the canvas' bounds, and
* the rectangle formed by the bitmap's width,height and the specified x,y.
* If bitmap pixels extend outside of that intersection, they will not be
* modified.
*
* Example that reads the entire canvas into a bitmap:
* SkISize size = canvas->getDeviceSize();
* bitmap->setConfig(SkBitmap::kARGB_8888_Config, size.fWidth,
* size.fHeight);
* if (canvas->readPixels(bitmap, 0, 0)) {
* // use the pixels
* }
*/
bool readPixels(SkBitmap* bitmap, int x, int y);

View File

@ -560,11 +560,11 @@ bool SkCanvas::readPixels(SkBitmap* bitmap, int x, int y) {
bool SkCanvas::readPixels(const SkIRect& srcRect, SkBitmap* bitmap) {
SkDevice* device = this->getDevice();
SkIRect bounds;
SkIRect bounds;
bounds.set(0, 0, device->width(), device->height());
if (!bounds.intersect(srcRect)) {
return false;
if (!bounds.intersect(srcRect)) {
return false;
}
SkBitmap tmp;