cee::vis::OverlayImage

class OverlayImage : public OverlayItem

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.

See also

OverlayItem, Overlay, and View

Public Types

enum Blending

Available modes are NO_BLENDING, GLOBAL_ALPHA and TEXTURE_ALPHA.

Values:

enumerator NO_BLENDING

No blending.

enumerator GLOBAL_ALPHA

Global alpha blending.

enumerator TEXTURE_ALPHA

Texture alpha blending.

Public Functions

OverlayImage()

Constructs an empty image object.

OverlayImage(Image *image)

Constructs an overlay image using the image data in image.

virtual unsigned int width() const

Returns the image width.

virtual unsigned int height() const

Returns the image height.

virtual void setSize(unsigned int width, unsigned int height)

Sets the size of the text box, in pixels.

virtual int priority() const

Returns the render priority of the item.

virtual void setPriority(int priority)

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.

const Image *image() const

Returns the image.

void setImage(Image *image)

Sets the image data.

void setGlobalAlpha(float alpha)

Sets the alpha value of the image.

float globalAlpha() const

Returns the global alpha value.

void setBlendingMode(Blending mode)

Sets blending mode.

Available modes are NO_BLENDING, GLOBAL_ALPHA and TEXTURE_APLHA.

Blending blendingMode() const

Returns blending mode.

Available modes are NO_BLENDING, GLOBAL_ALPHA and TEXTURE_APLHA.