Class RoundedRectangle

Inheritance Relationships

Base Type

Class Documentation

class RoundedRectangle : public BlamRendering::RenderStack::StackObjectBase

Class containing data for a Rounded Rectangle object.

This class uses a separate structure for storing rounded rectangle data. The default object color is used for the border color, and a new color is used for the object fill color.

Public Functions

RoundedRectangle()

Sets the stack type and specified default fill color and radius values.

~RoundedRectangle()

Empty destructor.

void Draw()

Draws the stack object.

Specific functionality may vary depending on the type of object.

void ShowImPropertyEditor()

Shows a set of ImGUI properties associated with the object.

This will call functions to draw only the property controls for the item, and nothing else. The window/container for the properties must be handled externally.

void SetThickness(float new_thickness)

Sets the thickness of the rectangle’s border.

Parameters
  • new_thickness: - The new thickness of the border.

void PokeRoundedRectArea()

Updates the area of the rounded rectangle after area modification.

Unlike the other poking functions, this must be called any time that the area property of StackObjectBase is modified, regardless of how it was modified.

Additionally, if the size/coords are modified directly, PokeSize() and PokeTranslation() will still need to be called.

Public Members

float thickness = 1

The current border thickness.

D2D1_COLOR_F fill_color

The current fill color.

D2D1_ROUNDED_RECT rounded_rect

The data for the rounded rectangle.