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

Unified Diff: app/gfx/color_utils.h

Issue 198008: Merge 25340 - Add functions to alphablend two colors and pick the more readab... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: Created 11 years, 3 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 | app/gfx/color_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/gfx/color_utils.h
===================================================================
--- app/gfx/color_utils.h (revision 25341)
+++ app/gfx/color_utils.h (working copy)
@@ -52,9 +52,16 @@
// this image.
void BuildLumaHistogram(SkBitmap* bitmap, int histogram[256]);
-// Create a color from a base color and a specific alpha value.
-SkColor SetColorAlpha(SkColor c, SkAlpha alpha);
+// Returns a blend of the supplied colors, ranging from |background| (for
+// |alpha| == 0) to |foreground| (for |alpha| == 255).
+SkColor AlphaBlend(SkColor foreground, SkColor background, SkAlpha alpha);
+// Given two possible foreground colors, return the one that is more readable
+// over |background|.
+SkColor PickMoreReadableColor(SkColor foreground1,
+ SkColor foreground2,
+ SkColor background);
+
// Gets a Windows system color as a SkColor
SkColor GetSysSkColor(int which);
Property changes on: app\gfx\color_utils.h
___________________________________________________________________
Added: svn:mergeinfo
Merged /trunk/src/app/gfx/color_utils.h:r25340
Merged /branches/chrome_webkit_merge_branch/app/gfx/color_utils.h:r69-2775
« no previous file with comments | « no previous file | app/gfx/color_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698