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

Unified Diff: include/effects/SkRectShaderImageFilter.h

Issue 26220004: SkRectShaderImageFilter: add a new factory method which takes a CropRect. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: More docs Created 7 years, 2 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 | src/effects/SkRectShaderImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/effects/SkRectShaderImageFilter.h
diff --git a/include/effects/SkRectShaderImageFilter.h b/include/effects/SkRectShaderImageFilter.h
index 5ad11c104c72b837a877014ccbca183a432b7159..9a2913c03bdfa4fbd433a3032ddd47d5e685b98b 100644
--- a/include/effects/SkRectShaderImageFilter.h
+++ b/include/effects/SkRectShaderImageFilter.h
@@ -15,12 +15,18 @@ class SkShader;
class SK_API SkRectShaderImageFilter : public SkImageFilter {
public:
- /**
- * The SkShader object will have its refcnt increased as it becomes a member of the
- * SkRectShaderImageFilter object returned by this function. It cannot be NULL.
- * The region parameter is used to specify on which region the shader is applied.
+ /** Create a new image filter which fills the given rectangle with pixels
+ * produced by the given SkShader. If no rectangle is specified, an output
+ * is produced with the same bounds as the input primitive (even though
+ * the input primitive's pixels are not used for processing).
+ * @param s Shader to call for processing. Cannot be NULL. Will be
+ * ref'ed by the new image filter.
+ * @param rect Rectangle of output pixels in which to apply the shader.
+ * If NULL or a given crop edge is not specified, the source
+ * primitive's bounds are used instead.
*/
- static SkRectShaderImageFilter* Create(SkShader* s, const SkRect& rect);
+ /* DEPRECATED */ static SkRectShaderImageFilter* Create(SkShader* s, const SkRect& rect);
+ static SkRectShaderImageFilter* Create(SkShader* s, const CropRect* rect = NULL);
virtual ~SkRectShaderImageFilter();
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkRectShaderImageFilter)
« no previous file with comments | « no previous file | src/effects/SkRectShaderImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698