summaryrefslogtreecommitdiffstats
path: root/ui/gfx/color_utils.h
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-27 16:56:06 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-27 16:56:06 +0000
commit4ffa789e031a7f0c8345e56a3c0813cb148176b4 (patch)
treee80237b500780d6bfb663353121655c3ec0beb2c /ui/gfx/color_utils.h
parentfc91f92efc008ec9efac09814f37b66cb580cbf5 (diff)
downloadchromium_src-4ffa789e031a7f0c8345e56a3c0813cb148176b4.zip
chromium_src-4ffa789e031a7f0c8345e56a3c0813cb148176b4.tar.gz
chromium_src-4ffa789e031a7f0c8345e56a3c0813cb148176b4.tar.bz2
Remove last dependencies on ui/base from ui/gfx
BUG=103304 R=sky@chromium.org Review URL: https://codereview.chromium.org/23498059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225722 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/color_utils.h')
-rw-r--r--ui/gfx/color_utils.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/ui/gfx/color_utils.h b/ui/gfx/color_utils.h
index 440e382..2bf3bcd 100644
--- a/ui/gfx/color_utils.h
+++ b/ui/gfx/color_utils.h
@@ -20,14 +20,14 @@ struct HSL {
double l;
};
-UI_EXPORT unsigned char GetLuminanceForColor(SkColor color);
+GFX_EXPORT unsigned char GetLuminanceForColor(SkColor color);
// Calculated according to http://www.w3.org/TR/WCAG20/#relativeluminancedef
-UI_EXPORT double RelativeLuminance(SkColor color);
+GFX_EXPORT double RelativeLuminance(SkColor color);
// Note: these transformations assume sRGB as the source color space
-UI_EXPORT void SkColorToHSL(SkColor c, HSL* hsl);
-UI_EXPORT SkColor HSLToSkColor(const HSL& hsl, SkAlpha alpha);
+GFX_EXPORT void SkColorToHSL(SkColor c, HSL* hsl);
+GFX_EXPORT SkColor HSLToSkColor(const HSL& hsl, SkAlpha alpha);
// HSL-Shift an SkColor. The shift values are in the range of 0-1, with the
// option to specify -1 for 'no change'. The shift values are defined as:
@@ -43,7 +43,7 @@ UI_EXPORT SkColor HSLToSkColor(const HSL& hsl, SkAlpha alpha);
// 0 = remove all lightness (make all pixels black).
// 0.5 = leave unchanged.
// 1 = full lightness (make all pixels white).
-UI_EXPORT SkColor HSLShift(SkColor color, const HSL& shift);
+GFX_EXPORT SkColor HSLShift(SkColor color, const HSL& shift);
// Determine if a given alpha value is nearly completely transparent.
bool IsColorCloseToTransparent(SkAlpha alpha);
@@ -53,19 +53,19 @@ bool IsColorCloseToGrey(int r, int g, int b);
// Builds a histogram based on the Y' of the Y'UV representation of
// this image.
-UI_EXPORT void BuildLumaHistogram(const SkBitmap& bitmap, int histogram[256]);
+GFX_EXPORT void BuildLumaHistogram(const SkBitmap& bitmap, int histogram[256]);
// Returns a blend of the supplied colors, ranging from |background| (for
// |alpha| == 0) to |foreground| (for |alpha| == 255). The alpha channels of
// the supplied colors are also taken into account, so the returned color may
// be partially transparent.
-UI_EXPORT SkColor AlphaBlend(SkColor foreground, SkColor background,
- SkAlpha alpha);
+GFX_EXPORT SkColor AlphaBlend(SkColor foreground, SkColor background,
+ SkAlpha alpha);
// Makes a dark color lighter or a light color darker by blending |color| with
// white or black depending on its current luminance. |alpha| controls the
// amount of white or black that will be alpha-blended into |color|.
-UI_EXPORT SkColor BlendTowardOppositeLuminance(SkColor color, SkAlpha alpha);
+GFX_EXPORT SkColor BlendTowardOppositeLuminance(SkColor color, SkAlpha alpha);
// Given an opaque foreground and background color, try to return a foreground
// color that is "readable" over the background color by luma-inverting the
@@ -76,13 +76,13 @@ UI_EXPORT SkColor BlendTowardOppositeLuminance(SkColor color, SkAlpha alpha);
//
// NOTE: This won't do anything but waste time if the supplied foreground color
// has a luma value close to the midpoint (0.5 in the HSL representation).
-UI_EXPORT SkColor GetReadableColor(SkColor foreground, SkColor background);
+GFX_EXPORT SkColor GetReadableColor(SkColor foreground, SkColor background);
// Invert a color.
-UI_EXPORT SkColor InvertColor(SkColor color);
+GFX_EXPORT SkColor InvertColor(SkColor color);
// Gets a Windows system color as a SkColor
-UI_EXPORT SkColor GetSysSkColor(int which);
+GFX_EXPORT SkColor GetSysSkColor(int which);
} // namespace color_utils