diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2011-04-17 14:40:58 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2011-04-17 14:40:58 +0200 |
commit | 914b04c1d23fe94c22de79cc34c62b7a26bac22c (patch) | |
tree | 207c8609c71d1a1deef26227bcbf997aeecdbbde /osd.c | |
parent | c670c0645f6445eb3b8c65abc601a83c35228411 (diff) | |
download | vdr-914b04c1d23fe94c22de79cc34c62b7a26bac22c.tar.gz vdr-914b04c1d23fe94c22de79cc34c62b7a26bac22c.tar.bz2 |
Fixed handling the bitmap color depth for scaled subtitles1.7.18
Diffstat (limited to 'osd.c')
-rw-r--r-- | osd.c | 6 |
1 files changed, 3 insertions, 3 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.20 2011/03/27 11:52:12 kls Exp $ + * $Id: osd.c 2.21 2011/04/17 14:25:07 kls Exp $ */ #include "osd.h" @@ -806,7 +806,7 @@ void cBitmap::ShrinkBpp(int NewBpp) } } -cBitmap *cBitmap::Scaled(double FactorX, double FactorY) +cBitmap *cBitmap::Scaled(double FactorX, double FactorY, bool AntiAlias) { // Fixed point scaling code based on www.inversereality.org/files/bitmapscaling.pdf // by deltener@mindtremors.com @@ -814,7 +814,7 @@ cBitmap *cBitmap::Scaled(double FactorX, double FactorY) b->Replace(*this); // copy palette int RatioX = (Width() << 16) / b->Width(); int RatioY = (Height() << 16) / b->Height(); - if (FactorX <= 1.0 && FactorY <= 1.0) { + if (!AntiAlias || FactorX <= 1.0 && FactorY <= 1.0) { // Downscaling - no anti-aliasing: tIndex *DestRow = b->bitmap; int SourceY = 0; |