A view overlay item capable of showing an image with optional blending. More...
Public Types | |
enum | Blending { NO_BLENDING, GLOBAL_ALPHA, TEXTURE_ALPHA } |
Available modes are NO_BLENDING, GLOBAL_ALPHA and TEXTURE_ALPHA. More... | |
![]() | |
enum | LayoutCorner { TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT, CENTER, TOP_CENTER, BOTTOM_CENTER } |
Enumerator for the different locations/"corners" of the view. More... | |
enum | LayoutDirection { HORIZONTAL, VERTICAL, ABSOLUTE_POSITION } |
Enumerator for horizontal or vertical orientation of layout items. Describes which direction additional items should be positioned if more than one exists in the same corner. More... | |
Public Member Functions | |
OverlayImage () | |
Constructs an empty image object. More... | |
OverlayImage (Image *image) | |
Constructs an overlay image using the image data in image. More... | |
virtual unsigned int | width () const |
Returns the image width. More... | |
virtual unsigned int | height () const |
Returns the image height. More... | |
void | setSize (unsigned int width, unsigned int height) |
Sets the size of the text box, in pixels. More... | |
virtual int | priority () const |
Returns the render priority of the item. More... | |
virtual void | setPriority (int priority) |
Sets render priority of the item. More... | |
const Image * | image () const |
Returns the image. More... | |
void | setImage (Image *image) |
Sets the image data. More... | |
void | setGlobalAlpha (float alpha) |
Sets the alpha value of the image. More... | |
float | globalAlpha () const |
Returns the global alpha value. More... | |
void | setBlendingMode (Blending mode) |
Sets blending mode. More... | |
Blending | blendingMode () const |
Returns blending mode. More... | |
![]() | |
bool | visible () const |
Returns true if the overlay item is set to be visible. More... | |
void | setVisible (bool visible) |
Sets if the overlay item should be visible or not. More... | |
int | absolutePositionX () const |
Returns the x coordinate of the absolute position to use for the OverlayItem if LayoutDirection is specified as ABSOLUTE_POSITION. More... | |
int | absolutePositionY () const |
Returns the y coordinate of the absolute position to use for the OverlayItem if LayoutDirection is specified as ABSOLUTE_POSITION. More... | |
void | setAbsolutePosition (int x, int y) |
Sets the absolute position of the bottom left corner of the OverlayItem as an offset from the LayoutCorner of the item. More... | |
![]() | |
void | addRef () const |
Increments the reference count for this object. More... | |
void | release () const |
Decrements the reference count for this object. More... | |
int | refCount () const |
Returns the reference count for this object. More... | |
void | setRefCountZero () const |
Sets the ref count to zero, but DOES NOT delete the object. More... | |
A view overlay item capable of showing an image with optional blending.
The overlay item can be added to a view using the View::overlay() and Overlay::addItem(). The view manages the layout of the overlay items, so only a desired size can be given in in this class. The position is specified when the overlay item is added to the view.
An overlay item can be shown in multiple views at the same time.
cee::vis::OverlayImage::OverlayImage | ( | ) |
Constructs an empty image object.
cee::vis::OverlayImage::OverlayImage | ( | Image * | image | ) |
Constructs an overlay image using the image data in image.
OverlayImage::Blending cee::vis::OverlayImage::blendingMode | ( | ) | const |
Returns blending mode.
Available modes are NO_BLENDING, GLOBAL_ALPHA and TEXTURE_APLHA.
float cee::vis::OverlayImage::globalAlpha | ( | ) | const |
Returns the global alpha value.
|
virtual |
Returns the image height.
Implements cee::vis::OverlayItem.
const Image * cee::vis::OverlayImage::image | ( | ) | const |
Returns the image.
|
virtual |
Returns the render priority of the item.
Implements cee::vis::OverlayItem.
void cee::vis::OverlayImage::setBlendingMode | ( | Blending | mode | ) |
Sets blending mode.
Available modes are NO_BLENDING, GLOBAL_ALPHA and TEXTURE_APLHA.
void cee::vis::OverlayImage::setGlobalAlpha | ( | float | alpha | ) |
Sets the alpha value of the image.
void cee::vis::OverlayImage::setImage | ( | Image * | image | ) |
Sets the image data.
|
virtual |
Sets render priority of the item.
The render priority determines the order in which item get rendered. Items with lower priorities get rendered first. The default priority is 15.
Implements cee::vis::OverlayItem.
|
virtual |
Sets the size of the text box, in pixels.
Implements cee::vis::OverlayItem.
|
virtual |
Returns the image width.
Implements cee::vis::OverlayItem.