Rodin::Plot::Artist::Figure class

Represents a figure plot.

Base classes

class BaseFigure
Base class for figures.

Constructors, destructors, conversion operators

Figure(Plot& pltRef)
Figure(Plot& pltRef, int width, int height)
Figure(Plot& pltRef, int width, int height, const std::string& title)

Public functions

template<class AxesT = Axes::Axes2D, class ... Args>
auto addAxes(Args && ... args) -> AxesT&
template<class AxesT = Axes::Axes2D>
auto addAxes() -> AxesT&
void drawContent() override
void clear()
auto getPlot() const -> const Plot&
auto getObject2D() -> Backend::Renderer::Object2D& override
auto redraw() const -> bool

Function documentation

Rodin::Plot::Artist::Figure::Figure(Plot& pltRef)

Parameters
pltRef Plot reference

Constructs a Figure object with a window size of 800x600 pixels.

Rodin::Plot::Artist::Figure::Figure(Plot& pltRef, int width, int height)

Parameters
pltRef Plot reference
width Width in pixels of the window
height

Constructs a Figure object.

Rodin::Plot::Artist::Figure::Figure(Plot& pltRef, int width, int height, const std::string& title)

Parameters
pltRef Plot reference.
width Width in pixels of the window.
height
title Title of the window.

Constructs a Figure object.

template<class AxesT = Axes::Axes2D, class ... Args>
AxesT& Rodin::Plot::Artist::Figure::addAxes(Args && ... args)

Template parameters
AxesT Type of the Axes which will be added. Default is Rodin::Plot::Axes2D.
Args Arguments to forward to the AxesT constructor.
Returns A reference to the added Axes.

Add an axes to the figure.

template<class AxesT = Axes::Axes2D>
AxesT& Rodin::Plot::Artist::Figure::addAxes()

Template parameters
AxesT Type of the Axes which will be added. Default is Rodin::Plot::Axes2D.

Add an axes to the figure.

void Rodin::Plot::Artist::Figure::drawContent() override

Draws the figure's axes to its frame buffer.

void Rodin::Plot::Artist::Figure::clear()

Clears the figure's frame buffer.

const Plot& Rodin::Plot::Artist::Figure::getPlot() const

Returns the owning Plot reference.

Backend::Renderer::Object2D& Rodin::Plot::Artist::Figure::getObject2D() override

Returns the 2D object handle.

bool Rodin::Plot::Artist::Figure::redraw() const

Returns
true If requires redrawing
false If does not require redraw

Indicates if the figure's contents require re-drawing.