Index: include/core/SkImage.h |
diff --git a/include/core/SkImage.h b/include/core/SkImage.h |
index 4cff5db4c9192884b4b6faa1cf6014a8dccc8074..0c6dd25a2c57cceee3c34cedd92e5ed71437f928 100644 |
--- a/include/core/SkImage.h |
+++ b/include/core/SkImage.h |
@@ -8,6 +8,7 @@ |
#ifndef SkImage_DEFINED |
#define SkImage_DEFINED |
+#include "SkFilterQuality.h" |
#include "SkImageInfo.h" |
#include "SkImageEncoder.h" |
#include "SkRefCnt.h" |
@@ -128,6 +129,19 @@ public: |
*/ |
SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps* = NULL) const; |
+ /** |
+ * Return an image that is a rescale of this image (using newWidth, newHeight). |
+ * |
+ * If subset is NULL, then the entire original image is used as the src for the scaling. |
+ * If subset is not NULL, then it specifies subset of src-pixels used for scaling. If |
+ * subset extends beyond the bounds of the original image, then NULL is returned. |
+ * |
+ * Note: it is legal for the returned image to be the same instance as the src image |
+ * (if the new dimensions == the src dimensions and any subset encloses the entire src). |
scroggo
2015/01/05 16:15:33
This comment seems to conflict with the code and t
reed1
2015/01/05 21:58:14
Done.
|
+ */ |
+ SkImage* newImage(int newWidth, int newHeight, const SkIRect* subset = NULL, |
+ SkFilterQuality = kNone_SkFilterQuality) const; |
+ |
protected: |
SkImage(int width, int height) : |
fWidth(width), |