summaryrefslogtreecommitdiff
path: root/osd.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2015-01-04 15:53:47 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2015-01-04 15:53:47 +0100
commitfc0094231d3f803869b8a03f449092b9464b2c21 (patch)
tree3c9acf86af44d5fcb2cb4eb515344b1d3e8d6363 /osd.c
parentaacdeba5d9591a8afc5f2e0e008a3b3b9dfc3bba (diff)
downloadvdr-fc0094231d3f803869b8a03f449092b9464b2c21.tar.gz
vdr-fc0094231d3f803869b8a03f449092b9464b2c21.tar.bz2
Added cOsd::DrawScaledBitmap()
Diffstat (limited to 'osd.c')
-rw-r--r--osd.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/osd.c b/osd.c
index 7e527820..0532c0a8 100644
--- a/osd.c
+++ b/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 3.2 2013/09/03 11:59:17 kls Exp $
+ * $Id: osd.c 3.3 2015/01/04 15:46:39 kls Exp $
*/
#include "osd.h"
@@ -1917,6 +1917,16 @@ void cOsd::DrawBitmap(int x, int y, const cBitmap &Bitmap, tColor ColorFg, tColo
}
}
+void cOsd::DrawScaledBitmap(int x, int y, const cBitmap &Bitmap, double FactorX, double FactorY, bool AntiAlias)
+{
+ const cBitmap *b = &Bitmap;
+ if (!DoubleEqual(FactorX, 1.0) || !DoubleEqual(FactorY, 1.0))
+ b = b->Scaled(FactorX, FactorY, AntiAlias);
+ DrawBitmap(x, y, *b);
+ if (b != &Bitmap)
+ delete b;
+}
+
void cOsd::DrawText(int x, int y, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font, int Width, int Height, int Alignment)
{
if (isTrueColor)