C
QSafeRenderer Class
class SafeRenderer::QSafeRendererThe QSafeRenderer class renders the safe layout. More...
Header: | #include <QSafeRenderer> |
Since: | QtSafeRenderer 1.0 |
Public Functions
QSafeRenderer(SafeRenderer::AbstractWindow *const window, SafeRenderer::QSafeLayout *const layout) | |
~QSafeRenderer() | |
SafeRenderer::QSafeRect | clear(const SafeRenderer::ARGB pixel) |
SafeRenderer::QSafeRect | clearBitmap(const SafeRenderer::quint32 itemId, const bool useGlobalClearColor) |
SafeRenderer::QSafeRect | clearBitmap(const SafeRenderer::qchar *const itemName, const bool useGlobalClearColor) |
SafeRenderer::QSafeRect | drawBitmap(const SafeRenderer::quint32 itemId) |
SafeRenderer::QSafeRect | drawBitmap(const SafeRenderer::qchar *const itemName) |
bool | setLayout(SafeRenderer::QSafeLayout *const layout) |
Related Non-Members
Detailed Description
The QSafeRenderer class draws and clears the bitmaps defined in the QSafeLayout class.
Member Function Documentation
QSafeRenderer::QSafeRenderer(SafeRenderer::AbstractWindow *const window, SafeRenderer::QSafeLayout *const layout)
Constructs a safe renderer object with a window and layout. window is the target window where the bitmap is drawn. layout hold the layout data position.
In case of a failure, one of the following exceptions will be thrown:
Exception | Id | Description |
---|---|---|
SafeRenderer::QSafeLayoutException | SafeRenderer::QSafeLayoutException::LayoutException::UnknownBitmapId | The bitmap could not found bitmap by given ID. |
SafeRenderer::QSafeStateException | SafeRenderer::QSafeLayoutException::LayoutException::UnknownItem | The item could not be found. |
SafeRenderer::QSafeStateException | SafeRenderer::QSafeLayoutException::LayoutException::ItemOutOfBounds | The item's position is out of the layout's boundaries. |
SafeRenderer::QSafeStateException | SafeRenderer::QSafeLayoutException::RendererException::UnsupportedSurfaceFormat | The bits per pixel value in the window is neither 16 nor 32, or the given framebuffer address is NULL, or the framebuffer is not 32-bit word aligned. |
QSafeRenderer::~QSafeRenderer()
Destroys the safe renderer.
SafeRenderer::QSafeRect QSafeRenderer::clear(const SafeRenderer::ARGB pixel)
Fills the screen with the pixel color.
SafeRenderer::QSafeRect QSafeRenderer::clearBitmap(const SafeRenderer::quint32 itemId, const bool useGlobalClearColor)
Clears the bitmap itemId from the screen.
Fills in the bitmap's rectangle with m_clearColor if useGlobalClearColor is true; otherwise use fillColor property if bitmap has it.
In case of a failure, one of the following exceptions will be thrown:
Exception | Id | Description |
---|---|---|
SafeRenderer::QSafeRendererException | SafeRenderer::QSafeRendererException::RendererException::BitmapOutOfScreen | The bitmap does not fit to the screen. |
SafeRenderer::QSafeRendererException | SafeRenderer::QSafeRendererException::RendererException::InvalidBitmapPointer | The bitmap pointer is a null pointer. |
SafeRenderer::QSafeRendererException | SafeRenderer::QSafeRendererException::RendererException::InvalidBitmapId | The bitmap ID is 0. |
SafeRenderer::QSafeRendererException | SafeRenderer::QSafeRendererException::RendererException::UnsupportedSurfaceFormat | The bits per pixel value in the window is neither 16 nor 32, or the given framebuffer address is NULL, or the framebuffer is not 32-bit word aligned. |
SafeRenderer::QSafeRect QSafeRenderer::clearBitmap(const SafeRenderer::qchar *const itemName, const bool useGlobalClearColor)
Clears the bitmap itemName from the screen.
Fills in the bitmap's rectangle with m_clearColor if useGlobalClearColor is true; otherwise use fillColor property if bitmap has it.
In case of a failure, one of the following exceptions will be thrown:
Exception | Id | Description |
---|---|---|
SafeRenderer::QSafeRendererException | SafeRenderer::QSafeRendererException::RendererException::BitmapOutOfScreen | The bitmap does not fit to the screen. |
SafeRenderer::QSafeRendererException | SafeRenderer::QSafeRendererException::RendererException::InvalidBitmapPointer | The bitmap pointer is a null pointer. |
SafeRenderer::QSafeRendererException | SafeRenderer::QSafeRendererException::RendererException::InvalidBitmapId | The bitmap ID is 0. |
SafeRenderer::QSafeRendererException | SafeRenderer::QSafeRendererException::RendererException::UnsupportedSurfaceFormat | The bits per pixel value in the window is neither 16 nor 32, or the given framebuffer address is NULL, or the framebuffer is not 32-bit word aligned. |
SafeRenderer::QSafeRect QSafeRenderer::drawBitmap(const SafeRenderer::quint32 itemId)
Draws bitmap itemId to the screen.
In case of a failure, one of the following exceptions will be thrown:
Exception | Id | Description |
---|---|---|
SafeRenderer::QSafeRendererException | SafeRenderer::QSafeRendererException::RendererException::BitmapOutOfScreen | The bitmap does not fit to the screen. |
SafeRenderer::QSafeRendererException | SafeRenderer::QSafeRendererException::RendererException::InvalidBitmapPointer | The bitmap pointer is a null pointer. |
SafeRenderer::QSafeRendererException | SafeRenderer::QSafeRendererException::RendererException::InvalidBitmapId | The bitmap ID is 0. |
SafeRenderer::QSafeRect QSafeRenderer::drawBitmap(const SafeRenderer::qchar *const itemName)
Draws the bitmap itemName to the screen.
In case of a failure, one of the following exceptions will be thrown:
Exception | Id | Description |
---|---|---|
SafeRenderer::QSafeRendererException | SafeRenderer::QSafeRendererException::RendererException::BitmapOutOfScreen | The bitmap does not fit to the screen. |
SafeRenderer::QSafeRendererException | SafeRenderer::QSafeRendererException::RendererException::InvalidBitmapPointer | The bitmap pointer is a null pointer. |
SafeRenderer::QSafeRendererException | SafeRenderer::QSafeRendererException::RendererException::InvalidBitmapId | The bitmap ID is 0. |
SafeRenderer::QSafeRendererException | SafeRenderer::QSafeRendererException::RendererException::UnsupportedSurfaceFormat | The bits per pixel value in the window is neither 16 nor 32, or the given framebuffer address is NULL, or the framebuffer is not 32-bit word aligned. |
bool QSafeRenderer::setLayout(SafeRenderer::QSafeLayout *const layout)
Sets the layout to layout.
It is possible to change renderer layout on runtime. The size of the new layout must match the current layout.
Returns true if setting the layout succeeded, otherwise false.
Related Non-Members
qchar
Qt-style synonym for 8-bit signed char
.
qint8
Qt-style synonym for 8-bit signed char
.
qint32
Qt-style synonym for 32-bit signed int
.
qint64
Qt-style synonym for 64-bit signed long long
.
qint
Qt-style synonym for 32-bit signed int
.
quchar
Qt-style synonym for 8-bit unsigned char
.
quint8
Qt-style synonym for 8-bit unsigned char
.
quint16
Qt-style synonym for 16-bit unsigned short
.
quint32
Qt-style synonym for 32-bit unsigned int
.
quint64
Qt-style synonym for 64-bit unsigned long long
.
Available under certain Qt licenses.
Find out more.