#include <abstractvideographicspainter.h>
This class provides a well defined interface to video graphics painter implementations.
A video graphics painter is a class that draws onto an arbitrary target rectangle within a QGraphicsScene by whatever means it has (e.g. OpenGL ARB, GLSL or simply QPainter).
- Author
- Harald Sitter sitte.nosp@m.r@kd.nosp@m.e.org
virtual Phonon::AbstractVideoGraphicsPainter::~AbstractVideoGraphicsPainter |
( |
) | |
|
|
inlinevirtual |
virtual void Phonon::AbstractVideoGraphicsPainter::init |
( |
) | |
|
|
pure virtual |
Implementations of init can prepare the painter for painting. For example an OpenGL painter may setup the GLContext and prepare the textures. Mind that init will usually be irreversible, so once a painter was initialized for a specific frame only the data of this frame may change.
- See Also
- setFrame
Implemented in Phonon::GlslPainter, and Phonon::QPainterPainter.
virtual void Phonon::AbstractVideoGraphicsPainter::paint |
( |
QPainter * |
painter, |
|
|
QRectF |
target |
|
) |
| |
|
pure virtual |
The actual paint logic is implemented in this function.
- Parameters
-
painter | the QPainter obtained from the paint call on a QGraphicsItem. |
target | the rectangle to draw in, this will usually be the rectangle calculated for a given aspect ratio. |
Implemented in Phonon::GlslPainter, and Phonon::QPainterPainter.
void Phonon::AbstractVideoGraphicsPainter::setFrame |
( |
const VideoFrame * |
frame) | |
|
|
inline |
Set a new frame on the painter. This function should be called before any other function is used. The frame can either stay valid throughout the life time of the object (in which case you only need to call it once) or you need to set the most current frame each paint cycle. At any rate there must be a valid frame set before calling anything.
Mind that you will need to drop the painter and reinitialize a new one once the frame changed in format, size, and the like.
- Parameters
-
frame | is the video frame that the painter is supposed to paint later on. |
const VideoFrame* Phonon::AbstractVideoGraphicsPainter::m_frame |
|
protected |
The frame an implementatin is supposed to work with.
bool Phonon::AbstractVideoGraphicsPainter::m_inited |
|
protected |
Whether or not the painter was inited
The documentation for this class was generated from the following file: