#include <OSDLOverlay.h>
The encoding is based on YUV, which stands for :
YUV can be seen as transformed RGB values such that there is low correlation between the three coordinates.
This is the colour space representation used in PAL video and television transmission.
Definition at line 61 of file OSDLOverlay.h.
Public Types | |
enum | EncodingFormat { YV12, IYUV, YUY2, UYVY, YVYU } |
Describes the encoding format used by an overlay. More... | |
Public Member Functions | |
Overlay (Length width, Length height, EncodingFormat format) throw ( OverlayException ) | |
Creates a YUV overlay of the specified width, height and format, linked with the current screen surface. | |
virtual | ~Overlay () throw () |
Virtual destructor. | |
virtual void | blit (Coordinate x, Coordinate y) const throw ( OverlayException ) |
Blits the overlay to the display, at the specified location, at its original size. | |
virtual void | blit () const throw ( OverlayException ) |
Blits the overlay to the display. | |
virtual bool | mustBeLocked () const throw () |
Tells whether this overlay has to be locked before modifying it. | |
virtual const std::string | toString (Ceylan::VerbosityLevels level=Ceylan::high) const throw () |
Returns an user-friendly description of the state of this object. | |
Protected Member Functions | |
virtual void | preUnlock () throw () |
Effective unlocking of the overlay. | |
virtual void | postLock () throw () |
Effective locking of the overlay. | |
Protected Attributes | |
SDL_Overlay * | _overlay |
The inner back-end overlay, if any. | |
Length | _width |
The original width of the overlay. | |
Length | _height |
The original height of the overlay. | |
Private Member Functions | |
Overlay (const Overlay &source) throw () | |
Copy constructor made private to ensure that it will never be called. | |
Overlay & | operator= (const Overlay &source) throw () |
Assignment operator made private to ensure that it will never be called. |
Describes the encoding format used by an overlay.
Planar modes :
Packed modes :
Definition at line 81 of file OSDLOverlay.h.
Overlay::Overlay | ( | Length | width, | |
Length | height, | |||
EncodingFormat | format | |||
) | throw ( OverlayException ) |
Creates a YUV overlay of the specified width, height and format, linked with the current screen surface.
width | the width of this new overlay. | |
height | the height of this new overlay. | |
format | the encoding format for the pixels of this overlay. |
OverlayException | if video module could not be retrieved or if the overlay creation failed. |
Definition at line 35 of file OSDLOverlay.cc.
References OSDL::getExistingCommonModule(), OSDL::Video::VideoModule::getScreenSurface(), OSDL::Video::Surface::getSDLSurface(), OSDL::CommonModule::getVideoModule(), OSDL::hasExistingCommonModule(), and OSDL::CommonModule::hasVideoModule().
Overlay::~Overlay | ( | ) | throw () [virtual] |
OSDL::Video::Overlay::Overlay | ( | const Overlay & | source | ) | throw () [private] |
Copy constructor made private to ensure that it will never be called.
The compiler should complain whenever this undefined constructor is called, implicitly or not.
void Overlay::blit | ( | Coordinate | x, | |
Coordinate | y | |||
) | const throw ( OverlayException ) [virtual] |
Blits the overlay to the display, at the specified location, at its original size.
x | abscissa of the destination surface where this overlay will be blitted. | |
y | ordinate of the destination surface where this overlay will be blitted. |
OverlayException | if the operation failed. |
Definition at line 71 of file OSDLOverlay.cc.
References OSDL::Utils::getBackendLastError().
void Overlay::blit | ( | ) | const throw ( OverlayException ) [virtual] |
Blits the overlay to the display.
OverlayException | if the operation failed. |
Definition at line 89 of file OSDLOverlay.cc.
bool Overlay::mustBeLocked | ( | ) | const throw () [virtual] |
Tells whether this overlay has to be locked before modifying it.
When using a overlay, in general there is no need to use this method because the lock/unlock methods take care of that.
Definition at line 97 of file OSDLOverlay.cc.
const string Overlay::toString | ( | Ceylan::VerbosityLevels | level = Ceylan::high |
) | const throw () [virtual] |
Returns an user-friendly description of the state of this object.
level | the requested verbosity level. |
Definition at line 132 of file OSDLOverlay.cc.
References OSDL::Video::Pixels::toString().
void Overlay::preUnlock | ( | ) | throw () [protected, virtual] |
Effective unlocking of the overlay.
Nevertheless only lock/unlock pair should be called by user programs.
Definition at line 106 of file OSDLOverlay.cc.
References _overlay.
void Overlay::postLock | ( | ) | throw () [protected, virtual] |
Effective locking of the overlay.
Nevertheless only lock/unlock pair should be called by user programs.
Definition at line 119 of file OSDLOverlay.cc.
References _overlay.
Assignment operator made private to ensure that it will never be called.
The compiler should complain whenever this undefined operator is called, implicitly or not.
SDL_Overlay* OSDL::Video::Overlay::_overlay [protected] |
The inner back-end overlay, if any.
Definition at line 197 of file OSDLOverlay.h.
Referenced by postLock(), preUnlock(), and ~Overlay().
Length OSDL::Video::Overlay::_width [protected] |
Length OSDL::Video::Overlay::_height [protected] |