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

Unified Diff: include/effects/SkAlphaThresholdFilter.h

Issue 115633002: Add AlphaThreshold filter. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use proper coordinates Created 7 years 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
Index: include/effects/SkAlphaThresholdFilter.h
diff --git a/include/effects/SkAlphaThresholdFilter.h b/include/effects/SkAlphaThresholdFilter.h
new file mode 100644
index 0000000000000000000000000000000000000000..566e87575b641b0fa22e58e17c641e0dbf8cc31d
--- /dev/null
+++ b/include/effects/SkAlphaThresholdFilter.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2013 The Android Open Source Project
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
bsalomon 2013/12/18 14:38:12 New files use this copyright notice: /* * Copyri
Zachary Kuznia 2013/12/19 01:28:40 Done.
+
+
+#ifndef SkAlphaThresholdFilter_DEFINED
+#define SkAlphaThresholdFilter_DEFINED
+
+#include "SkRegion.h"
+#include "SkImageFilter.h"
+
+class SK_API SkAlphaThresholdFilter {
+public:
+ /**
+ * 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.
bsalomon 2013/12/18 14:38:12 ...corresponds to the upper left corner of the src
Zachary Kuznia 2013/12/19 01:28:40 Done.
+ */
+ static SkImageFilter* Create(const SkRegion& region, SkScalar innerThreshold, SkScalar outerThreshold);
+};
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698