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 | |
136 const char* toString(SkString*) const; | 134 const char* toString(SkString*) const; |
137 | 135 |
138 /** | 136 /** |
139 * Return an image that is a rescale of this image (using newWidth, newHeig
ht). | 137 * Return an image that is a rescale of this image (using newWidth, newHeig
ht). |
140 * | 138 * |
141 * If subset is NULL, then the entire original image is used as the src for
the scaling. | 139 * If subset is NULL, then the entire original image is used as the src for
the scaling. |
142 * If subset is not NULL, then it specifies subset of src-pixels used for s
caling. If | 140 * If subset is not NULL, then it specifies subset of src-pixels used for s
caling. If |
143 * subset extends beyond the bounds of the original image, then NULL is ret
urned. | 141 * subset extends beyond the bounds of the original image, then NULL is ret
urned. |
144 * | 142 * |
145 * Notes: | 143 * Notes: |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 * Draw the image, cropped to the src rect, to the dst rect of a canvas. | 181 * Draw the image, cropped to the src rect, to the dst rect of a canvas. |
184 * If src is larger than the bounds of the image, the rest of the image is | 182 * If src is larger than the bounds of the image, the rest of the image is |
185 * filled with transparent black pixels. | 183 * filled with transparent black pixels. |
186 * | 184 * |
187 * See SkCanvas::drawBitmapRectToRect for similar behavior. | 185 * See SkCanvas::drawBitmapRectToRect for similar behavior. |
188 */ | 186 */ |
189 void drawRect(SkCanvas*, const SkRect* src, const SkRect& dst, const SkPaint
*) const; | 187 void drawRect(SkCanvas*, const SkRect* src, const SkRect& dst, const SkPaint
*) const; |
190 }; | 188 }; |
191 | 189 |
192 #endif | 190 #endif |
OLD | NEW |