summaryrefslogtreecommitdiff
path: root/osd.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2012-06-02 10:44:24 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2012-06-02 10:44:24 +0200
commit41b1160f01b3435cd2c93de8874c5937c366d14f (patch)
treee2e51bbd959d4324e68f3618b0e9020d9a0ef109 /osd.h
parent5ee947a492cae5d917d95043a57a52261e45e0c1 (diff)
downloadvdr-41b1160f01b3435cd2c93de8874c5937c366d14f.tar.gz
vdr-41b1160f01b3435cd2c93de8874c5937c366d14f.tar.bz2
The new function RgbShade() (include osd.h) can be used to generate a brighter or darker version of a given color
Diffstat (limited to 'osd.h')
-rw-r--r--osd.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/osd.h b/osd.h
index 9f951bbb..06c020aa 100644
--- a/osd.h
+++ b/osd.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: osd.h 2.16 2012/05/17 15:09:35 kls Exp $
+ * $Id: osd.h 2.17 2012/06/02 10:32:38 kls Exp $
*/
#ifndef __OSD_H
@@ -70,6 +70,14 @@ inline tColor RgbToColor(double R, double G, double B)
return RgbToColor(uint8_t(0xFF * R), uint8_t(0xFF * G), uint8_t(0xFF * B));
}
+tColor RgbShade(tColor Color, double Factor);
+ ///< Returns a brighter (Factor > 0) or darker (Factor < 0) version
+ ///< of the given Color.
+ ///< If Factor is 0.0, the return value is the unchanged Color,
+ ///< If Factor is 1.0, white is returned.
+ ///< If Factor is -1.0, black is returned.
+ ///< The alpha value of Color is returned unchanged.
+
tColor HsvToColor(double H, double S, double V);
///< Converts the given Hue (0..360), Saturation (0..1) and Value (0..1)
///< to an RGB tColor value. The alpha value of the result is 0x00, so