vdr 2.7.5
|
#include <osd.h>
Public Member Functions | |
cImage (void) | |
cImage (const cImage &Image) | |
cImage (const cSize &Size, const tColor *Data=NULL) | |
virtual | ~cImage () |
const cSize & | Size (void) const |
int | Width (void) const |
int | Height (void) const |
const tColor * | Data (void) const |
tColor | GetPixel (const cPoint &Point) const |
void | SetPixel (const cPoint &Point, tColor Color) |
void | Clear (void) |
void | Fill (tColor Color) |
cImage * | Scaled (double FactorX, double FactorY, bool AntiAlias=false) const |
Private Attributes | |
cSize | size |
tColor * | data |
cImage::cImage | ( | void | ) |
cImage::cImage | ( | const cImage & | Image | ) |
Creates an image with the given Size and allocates the necessary memory to copy the pixels pointed to by Data, which is a sequence of (Size.Width() * Size.Height()) tColor values.
If Data is NULL, the allocated memory is not initialized. The alpha value of the Image's pixels is taken into account, so it has to be greater than 0 for the image to be visible.
void cImage::Clear | ( | void | ) |
|
inline |
void cImage::Fill | ( | tColor | Color | ) |
Returns the pixel value at the given Point.
For performance reasons there is no range check here, so the caller must make sure that the Point is within the images size.
Definition at line 438 of file osd.h.
References data, size, cPoint::X(), and cPoint::Y().
Referenced by Scaled().
|
inline |
cImage * cImage::Scaled | ( | double | FactorX, |
double | FactorY, | ||
bool | AntiAlias = false ) const |
Creates a copy of this image, scaled by the given factors.
If AntiAlias is true and either of the factors is greater than 1.0, anti-aliasing is applied. The caller must delete the returned image once it is no longer used.
Definition at line 1142 of file osd.c.
References AlphaBlend(), cImage(), GetPixel(), Height(), max(), min(), SetPixel(), and Width().
Referenced by cPixmapMemory::DrawScaledImage().
Sets the pixel at the given Point to Color.
For performance reasons there is no range check here, so the caller must make sure that the Point is within the images size.
Definition at line 442 of file osd.h.
References data, size, cPoint::X(), and cPoint::Y().
Referenced by cTrueColorDemo::Action(), DrawImages(), and Scaled().
|
inline |
|
inline |
|
private |
|
private |
Definition at line 421 of file osd.h.
Referenced by cImage(), cImage(), GetPixel(), Height(), SetPixel(), Size(), and Width().