| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkImage_DEFINED | 8 #ifndef SkImage_DEFINED |
| 9 #define SkImage_DEFINED | 9 #define SkImage_DEFINED |
| 10 | 10 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 | 124 |
| 125 /** | 125 /** |
| 126 * Return a new surface that is compatible with this image's internal repre
sentation | 126 * Return a new surface that is compatible with this image's internal repre
sentation |
| 127 * (e.g. raster or gpu). | 127 * (e.g. raster or gpu). |
| 128 * | 128 * |
| 129 * If no surfaceprops are specified, the image will attempt to match the pr
ops of when it | 129 * If no surfaceprops are specified, the image will attempt to match the pr
ops of when it |
| 130 * was created (if it came from a surface). | 130 * was created (if it came from a surface). |
| 131 */ | 131 */ |
| 132 SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps* = NULL) cons
t; | 132 SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps* = NULL) cons
t; |
| 133 | 133 |
| 134 void preroll() const; |
| 135 |
| 134 const char* toString(SkString*) const; | 136 const char* toString(SkString*) const; |
| 135 | 137 |
| 136 /** | 138 /** |
| 137 * Return an image that is a rescale of this image (using newWidth, newHeig
ht). | 139 * Return an image that is a rescale of this image (using newWidth, newHeig
ht). |
| 138 * | 140 * |
| 139 * If subset is NULL, then the entire original image is used as the src for
the scaling. | 141 * If subset is NULL, then the entire original image is used as the src for
the scaling. |
| 140 * If subset is not NULL, then it specifies subset of src-pixels used for s
caling. If | 142 * If subset is not NULL, then it specifies subset of src-pixels used for s
caling. If |
| 141 * subset extends beyond the bounds of the original image, then NULL is ret
urned. | 143 * subset extends beyond the bounds of the original image, then NULL is ret
urned. |
| 142 * | 144 * |
| 143 * Notes: | 145 * Notes: |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 * Draw the image, cropped to the src rect, to the dst rect of a canvas. | 183 * Draw the image, cropped to the src rect, to the dst rect of a canvas. |
| 182 * If src is larger than the bounds of the image, the rest of the image is | 184 * If src is larger than the bounds of the image, the rest of the image is |
| 183 * filled with transparent black pixels. | 185 * filled with transparent black pixels. |
| 184 * | 186 * |
| 185 * See SkCanvas::drawBitmapRectToRect for similar behavior. | 187 * See SkCanvas::drawBitmapRectToRect for similar behavior. |
| 186 */ | 188 */ |
| 187 void drawRect(SkCanvas*, const SkRect* src, const SkRect& dst, const SkPaint
*) const; | 189 void drawRect(SkCanvas*, const SkRect* src, const SkRect& dst, const SkPaint
*) const; |
| 188 }; | 190 }; |
| 189 | 191 |
| 190 #endif | 192 #endif |
| OLD | NEW |