cee::ug::OverlayColorLegend

class OverlayColorLegend : public OverlayItem

A color legend to show as overlay in the view.

../_images/colorlegend.png

A color legend shows the correspondence between the colors in the model and the numerical values they represent.

Each scalar result has its own color legend and multiple color legend can be shown simultaneously. A color legend does not need to be added to the view manually as for the other overlay items. Each visualized scalar result has it’s own color legend which can be controlled in its scalar settings.

Color legend attributes such as visibility, colors and range, can be modified in the corresponding scalar result’s scalar settings. See UnstructGridModel::scalarSettings().

See also

ScalarSettings and OverlayItem

Public Functions

int resultId() const

Returns the result id.

virtual unsigned int width() const

Returns the width of the color legend viewport in pixels.

virtual unsigned int height() const

Returns the height of the color legend viewport in pixels.

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

Sets the height of the color legend 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 10.