vdr  2.4.1
Public Member Functions | Private Attributes | List of all members
cImage Class Reference

#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
 
void Clear (void)
 
void Fill (tColor Color)
 

Private Attributes

cSize size
 
tColor * data
 

Detailed Description

Definition at line 419 of file osd.h.

Constructor & Destructor Documentation

◆ cImage() [1/3]

cImage::cImage ( void  )

Definition at line 1104 of file osd.c.

References data.

◆ cImage() [2/3]

cImage::cImage ( const cImage &  Image)

Definition at line 1109 of file osd.c.

References data, Data(), cSize::Height(), MALLOC, size, Size(), and cSize::Width().

◆ cImage() [3/3]

cImage::cImage ( const cSize &  Size,
const tColor *  Data = NULL 
)

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.

Definition at line 1117 of file osd.c.

References data, Data(), cSize::Height(), MALLOC, size, Size(), and cSize::Width().

◆ ~cImage()

cImage::~cImage ( )
virtual

Definition at line 1126 of file osd.c.

References data.

Member Function Documentation

◆ Clear()

void cImage::Clear ( void  )

Clears the image data by setting all pixels to be fully transparent.

Definition at line 1131 of file osd.c.

References data, Height(), and Width().

◆ Data()

const tColor* cImage::Data ( void  ) const
inline

Definition at line 437 of file osd.h.

References data.

Referenced by cImage(), and cPixmapMemory::DrawImage().

◆ Fill()

void cImage::Fill ( tColor  Color)

Fills the image data with the given Color.

Definition at line 1136 of file osd.c.

References data, Height(), and Width().

◆ Height()

int cImage::Height ( void  ) const
inline

Definition at line 436 of file osd.h.

References cSize::Height(), and size.

Referenced by Clear(), DrawImages(), and Fill().

◆ Size()

const cSize& cImage::Size ( void  ) const
inline

Definition at line 434 of file osd.h.

References size.

Referenced by cImage(), and cPixmapMemory::DrawImage().

◆ Width()

int cImage::Width ( void  ) const
inline

Definition at line 435 of file osd.h.

References size, and cSize::Width().

Referenced by Clear(), DrawImages(), and Fill().

Member Data Documentation

◆ data

tColor* cImage::data
private

Definition at line 422 of file osd.h.

Referenced by cImage(), Clear(), Data(), Fill(), and ~cImage().

◆ size

cSize cImage::size
private

Definition at line 421 of file osd.h.

Referenced by cImage(), Height(), Size(), and Width().


The documentation for this class was generated from the following files: