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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 121 |
122 /** | 122 /** |
123 * Return a new surface that is compatible with this image's internal repre
sentation | 123 * Return a new surface that is compatible with this image's internal repre
sentation |
124 * (e.g. raster or gpu). | 124 * (e.g. raster or gpu). |
125 * | 125 * |
126 * If no surfaceprops are specified, the image will attempt to match the pr
ops of when it | 126 * If no surfaceprops are specified, the image will attempt to match the pr
ops of when it |
127 * was created (if it came from a surface). | 127 * was created (if it came from a surface). |
128 */ | 128 */ |
129 SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps* = NULL) cons
t; | 129 SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps* = NULL) cons
t; |
130 | 130 |
| 131 const char* toString(SkString*) const; |
| 132 |
131 protected: | 133 protected: |
132 SkImage(int width, int height) : | 134 SkImage(int width, int height) : |
133 fWidth(width), | 135 fWidth(width), |
134 fHeight(height), | 136 fHeight(height), |
135 fUniqueID(NextUniqueID()) { | 137 fUniqueID(NextUniqueID()) { |
136 | 138 |
137 SkASSERT(width > 0); | 139 SkASSERT(width > 0); |
138 SkASSERT(height > 0); | 140 SkASSERT(height > 0); |
139 } | 141 } |
140 | 142 |
(...skipping 14 matching lines...) Expand all Loading... |
155 * Draw the image, cropped to the src rect, to the dst rect of a canvas. | 157 * Draw the image, cropped to the src rect, to the dst rect of a canvas. |
156 * If src is larger than the bounds of the image, the rest of the image is | 158 * If src is larger than the bounds of the image, the rest of the image is |
157 * filled with transparent black pixels. | 159 * filled with transparent black pixels. |
158 * | 160 * |
159 * See SkCanvas::drawBitmapRectToRect for similar behavior. | 161 * See SkCanvas::drawBitmapRectToRect for similar behavior. |
160 */ | 162 */ |
161 void drawRect(SkCanvas*, const SkRect* src, const SkRect& dst, const SkPaint
*) const; | 163 void drawRect(SkCanvas*, const SkRect* src, const SkRect& dst, const SkPaint
*) const; |
162 }; | 164 }; |
163 | 165 |
164 #endif | 166 #endif |
OLD | NEW |