diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2012-03-02 10:51:46 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2012-03-02 10:51:46 +0100 |
commit | 1e3f6d6da29572426d5fd2fd922af9cc5219b285 (patch) | |
tree | 85a89f35bb78e82ed67eb481b18c2f79acf6b94b /osd.c | |
parent | c8808a854b58a6370baba41a8a0de97f1d4f73fd (diff) | |
download | vdr-1e3f6d6da29572426d5fd2fd922af9cc5219b285.tar.gz vdr-1e3f6d6da29572426d5fd2fd922af9cc5219b285.tar.bz2 |
Replaced min(max()) calls with the new function constrain()
Diffstat (limited to 'osd.c')
-rw-r--r-- | osd.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: osd.c 2.24 2012/02/22 16:13:04 kls Exp $ + * $Id: osd.c 2.25 2012/03/02 10:48:19 kls Exp $ */ #include "osd.h" @@ -1008,7 +1008,7 @@ void cPixmap::SetLayer(int Layer) void cPixmap::SetAlpha(int Alpha) { Lock(); - Alpha = min(max(Alpha, ALPHA_TRANSPARENT), ALPHA_OPAQUE); + Alpha = constrain(Alpha, ALPHA_TRANSPARENT, ALPHA_OPAQUE); if (Alpha != alpha) { MarkViewPortDirty(viewPort); alpha = Alpha; @@ -1648,8 +1648,8 @@ void cOsd::SetOsdPosition(int Left, int Top, int Width, int Height) { osdLeft = Left; osdTop = Top; - osdWidth = min(max(Width, MINOSDWIDTH), MAXOSDWIDTH); - osdHeight = min(max(Height, MINOSDHEIGHT), MAXOSDHEIGHT); + osdWidth = constrain(Width, MINOSDWIDTH, MAXOSDWIDTH); + osdHeight = constrain(Height, MINOSDHEIGHT, MAXOSDHEIGHT); } void cOsd::SetAntiAliasGranularity(uint FixedColors, uint BlendColors) |