From 08d5ad047adccb2eac806f7f82575779c9f77130 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 27 Mar 2011 11:54:07 +0200 Subject: Renamed cBitmap::Scale() to Scaled() --- HISTORY | 2 ++ dvbsubtitle.c | 4 ++-- osd.c | 4 ++-- osd.h | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/HISTORY b/HISTORY index 00422aab..3991e862 100644 --- a/HISTORY +++ b/HISTORY @@ -6575,3 +6575,5 @@ Video Disk Recorder Revision History - Fixed the Language header of the Serbian translation file (thanks to Ville Skyttä). - Added anti-aliasing when upscaling bitmaps (improves the display of SD subtitles when replayed on an HD OSD). +- Renamed cBitmap::Scale() to Scaled(), because it doesn't modify the bitmap itself, + but rather returns a scaled copy. diff --git a/dvbsubtitle.c b/dvbsubtitle.c index dbfb3e19..cd296bb9 100644 --- a/dvbsubtitle.c +++ b/dvbsubtitle.c @@ -7,7 +7,7 @@ * Original author: Marco Schlüßler * With some input from the "subtitle plugin" by Pekka Virtanen * - * $Id: dvbsubtitle.c 2.13 2011/03/20 15:10:30 kls Exp $ + * $Id: dvbsubtitle.c 2.14 2011/03/27 11:52:42 kls Exp $ */ #include "dvbsubtitle.h" @@ -656,7 +656,7 @@ void cDvbSubtitleBitmaps::Draw(cOsd *Osd) for (int i = 0; i < bitmaps.Size(); i++) { cBitmap *b = bitmaps[i]; if (!(DoubleEqual(osdFactorX, 1.0) && DoubleEqual(osdFactorY, 1.0))) - b = b->Scale(osdFactorX, osdFactorY); + b = b->Scaled(osdFactorX, osdFactorY); Osd->DrawBitmap(int(round(b->X0() * osdFactorX)), int(round(b->Y0() * osdFactorY)), *b); if (b != bitmaps[i]) delete b; diff --git a/osd.c b/osd.c index 7e9bacc4..083bdf41 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 2.19 2011/03/27 11:48:39 kls Exp $ + * $Id: osd.c 2.20 2011/03/27 11:52:12 kls Exp $ */ #include "osd.h" @@ -806,7 +806,7 @@ void cBitmap::ShrinkBpp(int NewBpp) } } -cBitmap *cBitmap::Scale(double FactorX, double FactorY) +cBitmap *cBitmap::Scaled(double FactorX, double FactorY) { // Fixed point scaling code based on www.inversereality.org/files/bitmapscaling.pdf // by deltener@mindtremors.com diff --git a/osd.h b/osd.h index ebd27979..5196e2cf 100644 --- a/osd.h +++ b/osd.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: osd.h 2.11 2011/03/12 16:06:48 kls Exp $ + * $Id: osd.h 2.12 2011/03/27 11:51:48 kls Exp $ */ #ifndef __OSD_H @@ -273,7 +273,7 @@ public: ///< the 2^NewBpp most frequently used colors as defined in the current palette. ///< If NewBpp is not smaller than the bitmap's current color depth, ///< or if it is not one of 4bpp or 2bpp, nothing happens. - cBitmap *Scale(double FactorX, double FactorY); + cBitmap *Scaled(double FactorX, double FactorY); ///< Creates a copy of this bitmap, scaled by the given factors. ///< The caller must delete the returned bitmap once it is no longer used. }; -- cgit v1.2.3