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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 } | 165 } |
166 | 166 |
167 private: | 167 private: |
168 const int fWidth; | 168 const int fWidth; |
169 const int fHeight; | 169 const int fHeight; |
170 const uint32_t fUniqueID; | 170 const uint32_t fUniqueID; |
171 | 171 |
172 static uint32_t NextUniqueID(); | 172 static uint32_t NextUniqueID(); |
173 | 173 |
174 typedef SkRefCnt INHERITED; | 174 typedef SkRefCnt INHERITED; |
175 | |
176 friend class SkCanvas; | |
177 | |
178 void draw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) const; | |
179 | |
180 /** | |
181 * 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 | |
183 * filled with transparent black pixels. | |
184 * | |
185 * See SkCanvas::drawBitmapRectToRect for similar behavior. | |
186 */ | |
187 void drawRect(SkCanvas*, const SkRect* src, const SkRect& dst, const SkPaint
*) const; | |
188 }; | 175 }; |
189 | 176 |
190 #endif | 177 #endif |
OLD | NEW |