Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Unified Diff: include/core/SkCanvas.h

Issue 595043002: Add doc on SkCanvas::drawImage*() methods (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkCanvas.h
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 5828466d62e52202fa9185ccb7e596c9857413de..5998ee5a30280264f792b26caa5a670f81d166f2 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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698