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

Unified Diff: Source/platform/graphics/Color.cpp

Issue 126033003: Support colors w/ alpha in SVG 'stop' elements and 'feFlood' (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase; Prebake expected colors. Created 6 years, 11 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 | « Source/platform/graphics/Color.h ('k') | Source/platform/graphics/filters/FEFlood.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/Color.cpp
diff --git a/Source/platform/graphics/Color.cpp b/Source/platform/graphics/Color.cpp
index a2885a5d4d1636f494ff545c2720f858b3bcfa84..245017671e6f83f70ac103237e22c99fa1a0288a 100644
--- a/Source/platform/graphics/Color.cpp
+++ b/Source/platform/graphics/Color.cpp
@@ -329,6 +329,11 @@ Color Color::dark() const
alpha());
}
+Color Color::combineWithAlpha(float otherAlpha) const
+{
+ return colorWithOverrideAlpha(rgb(), (alpha() / 255.f) * otherAlpha);
+}
+
static int blendComponent(int c, int a)
{
// We use white.
« no previous file with comments | « Source/platform/graphics/Color.h ('k') | Source/platform/graphics/filters/FEFlood.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698