mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Replaced min(max()) calls with the new function constrain()
This commit is contained in:
8
osd.c
8
osd.c
@@ -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)
|
||||
|
Reference in New Issue
Block a user