diff options
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkDevice.h | 4 | ||||
-rw-r--r-- | include/core/SkImage.h | 13 |
2 files changed, 13 insertions, 4 deletions
diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h index b474687cfb..8a219d7053 100644 --- a/include/core/SkDevice.h +++ b/include/core/SkDevice.h @@ -209,10 +209,6 @@ protected: const SkPaint& paint, SkCanvas::DrawBitmapRectFlags flags) = 0; - virtual void drawImage(const SkDraw&, const SkImage*, SkScalar x, SkScalar y, const SkPaint&); - virtual void drawImageRect(const SkDraw&, const SkImage*, const SkRect* src, const SkRect& dst, - const SkPaint&); - /** * Does not handle text decoration. * Decorations (underline and stike-thru) will be handled by SkCanvas. diff --git a/include/core/SkImage.h b/include/core/SkImage.h index ebc9a29394..ec85516619 100644 --- a/include/core/SkImage.h +++ b/include/core/SkImage.h @@ -172,6 +172,19 @@ private: static uint32_t NextUniqueID(); typedef SkRefCnt INHERITED; + + friend class SkCanvas; + + void draw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) const; + + /** + * Draw the image, cropped to the src rect, to the dst rect of a canvas. + * If src is larger than the bounds of the image, the rest of the image is + * filled with transparent black pixels. + * + * See SkCanvas::drawBitmapRectToRect for similar behavior. + */ + void drawRect(SkCanvas*, const SkRect* src, const SkRect& dst, const SkPaint*) const; }; #endif |