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

Unified Diff: include/effects/SkAlphaThresholdFilter.h

Issue 340613005: Add scale param to SkAlphaThresholdFilter. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Change |scale| to |transform| Created 6 years, 5 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/SkAlphaThresholdFilter.cpp » ('j') | src/effects/SkAlphaThresholdFilter.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/effects/SkAlphaThresholdFilter.h
diff --git a/include/effects/SkAlphaThresholdFilter.h b/include/effects/SkAlphaThresholdFilter.h
index 23af56fc549aea172698b58096ebb4a35f3cb590..860829508bac25f990fcb767b7de521012060acc 100644
--- a/include/effects/SkAlphaThresholdFilter.h
+++ b/include/effects/SkAlphaThresholdFilter.h
@@ -21,6 +21,19 @@ public:
* source image.
*/
static SkImageFilter* Create(const SkRegion& region, SkScalar innerThreshold, SkScalar outerThreshold);
+
+ /**
+ * Creates an image filter that samples a region. If the sample is inside the
+ * region the alpha of the image is boosted up to a threshold value. If it is
+ * outside the region then the alpha is decreased to the threshold value.
+ * The 0,0 point of the region corresponds to the upper left corner of the
+ * source image.
+ * Since the image pixels are in device units but the |region| is in device-
+ * independent units, the |transform| is applied to the |region| so that it
+ * matches the pixels.
+ */
+ static SkImageFilter* Create(const SkRegion& region, const SkMatrix& transform,
+ SkScalar innerThreshold, SkScalar outerThreshold);
};
#endif
« no previous file with comments | « no previous file | src/effects/SkAlphaThresholdFilter.cpp » ('j') | src/effects/SkAlphaThresholdFilter.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698