diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2015-01-04 15:53:47 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2015-01-04 15:53:47 +0100 |
commit | fc0094231d3f803869b8a03f449092b9464b2c21 (patch) | |
tree | 3c9acf86af44d5fcb2cb4eb515344b1d3e8d6363 /osd.c | |
parent | aacdeba5d9591a8afc5f2e0e008a3b3b9dfc3bba (diff) | |
download | vdr-fc0094231d3f803869b8a03f449092b9464b2c21.tar.gz vdr-fc0094231d3f803869b8a03f449092b9464b2c21.tar.bz2 |
Added cOsd::DrawScaledBitmap()
Diffstat (limited to 'osd.c')
-rw-r--r-- | osd.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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) |