aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar piotaixr <piotaixr@chromium.org>2014-09-25 14:39:40 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-09-25 14:39:40 -0700
commitd52893cfc8c3fb1187c04c66f6beda66e1bb0b2c (patch)
tree84d06ca126b4ed9687a25e57b4f6304b7a694430 /include
parent90a36e5feb7a3f739b768b4571595d3cb27b6b7a (diff)
Add doc on SkCanvas::drawImage*() methods
BUG=skia:2947 R=junov@chromium.org, reed@google.com Author: piotaixr@chromium.org Review URL: https://codereview.chromium.org/595043002
Diffstat (limited to 'include')
-rw-r--r--include/core/SkCanvas.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 5828466d62..5998ee5a30 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -812,9 +812,25 @@ public:
*/
virtual void drawPath(const SkPath& path, const SkPaint& paint);
+ /** Draw the specified image, with its top/left corner at (x,y), using the
+ specified paint, transformed by the current matrix.
+
+ @param image The image to be drawn
+ @param left The position of the left side of the image being drawn
+ @param top The position of the top side of the image being drawn
+ @param paint The paint used to draw the image, or NULL
+ */
virtual void drawImage(const SkImage* image, SkScalar left, SkScalar top,
const SkPaint* paint = NULL);
+ /** Draw the specified image, with the specified matrix applied (before the
+ canvas' matrix is applied).
+ @param image The image to be drawn
+ @param src Optional: specify the subset of the image to be drawn
+ @param dst The destination rectangle where the scaled/translated
+ image will be drawn
+ @param paint The paint used to draw the image, or NULL
+ */
virtual void drawImageRect(const SkImage* image, const SkRect* src,
const SkRect& dst,
const SkPaint* paint = NULL);