mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Renamed cBitmap::Scale() to Scaled()
This commit is contained in:
parent
8768a9c321
commit
08d5ad047a
2
HISTORY
2
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.
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Original author: Marco Schlüßler <marco@lordzodiac.de>
|
||||
* With some input from the "subtitle plugin" by Pekka Virtanen <pekka.virtanen@sci.fi>
|
||||
*
|
||||
* $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;
|
||||
|
4
osd.c
4
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
|
||||
|
4
osd.h
4
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.
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user