Lumiera
0.pre.03
»edit your freedom«
|
#include "stage/output/displayer.hpp"
A Displayer is a class which is responsible for rendering an image in some way (ie: Xvideo, GDK, OpenGL etc).
By default, all images will be delivered to the put method in a resolution of IMG_WIDTH * IMG_HEIGHT. If another size is required, then the rewrite the methods:
If the widget being written to doesn't need a fixed size, then rewrite the two other put methods as required.
Definition at line 74 of file displayer.hpp.
Public Member Functions | |
virtual DisplayerInput | format () |
Indicates the format required by the abstract put method. More... | |
virtual int | preferredHeight () |
Expected height of input to put. More... | |
virtual int | preferredWidth () |
Expected width of input to put. More... | |
virtual void | put (void *const)=0 |
Put an image of a given width and height with the expected input format (as indicated by the format method). | |
virtual bool | usable () |
Indicates if this object can be used to render images on the running system. More... | |
Static Protected Member Functions | |
static void | calculateVideoLayout (int widget_width, int widget_height, int image_width, int image_height, int &video_x, int &video_y, int &video_width, int &video_height) |
Calculates the coordinates for placing a video image inside a widget. More... | |
Protected Attributes | |
int | imageHeight |
int | imageWidth |
|
virtual |
Indicates if this object can be used to render images on the running system.
Reimplemented in XvDisplayer, and GdkDisplayer.
Definition at line 47 of file displayer.cpp.
|
virtual |
Indicates the format required by the abstract put method.
Definition at line 53 of file displayer.cpp.
|
virtual |
Expected width of input to put.
Definition at line 59 of file displayer.cpp.
Referenced by GdkDisplayer::put().
|
virtual |
Expected height of input to put.
Definition at line 65 of file displayer.cpp.
Referenced by GdkDisplayer::put().
|
staticprotected |
Calculates the coordinates for placing a video image inside a widget.
[in] | widget_width | The width of the display widget. |
[in] | widget_height | The height of the display widget. |
[in] | image_width | The width of the video image. |
[in] | image_height | The height of the video image. |
[out] | video_x | The x-coordinate of the top left corner of the scaled video image. |
[out] | video_y | The y-coordinate of the top left corner of the scaled video image. |
[out] | video_width | The width of the scale video image. |
[out] | video_height | The height of the scale video image. |
Definition at line 71 of file displayer.cpp.
Referenced by GdkDisplayer::put().