Skip to main content

CorePlotting::Interaction::PolygonInteractionConfig

CorePlotting::Interaction::PolygonInteractionConfig

Configuration for polygon interaction behavior.

#include <PolygonInteractionController.hpp>

Public Attributes

Name
std::size_t min_vertices
Minimum number of vertices required to complete the polygon.
float close_threshold
Distance threshold (in canvas pixels) for closing the polygon by clicking near the first vertex.
bool allow_click_to_close
If true, allow automatic polygon closure when clicking near the first vertex.
glm::vec4 fill_color
Default fill color for preview.
glm::vec4 stroke_color
Default stroke color for preview.
glm::vec4 vertex_color
Color for vertices.
float stroke_width
Stroke width in pixels.
float vertex_size
Vertex point size in pixels.
glm::vec4 closure_line_color
Color for the closure line (line from last to first vertex during construction).

Public Attributes Documentation

variable min_vertices

std::size_t min_vertices {3};

Minimum number of vertices required to complete the polygon.

variable close_threshold

float close_threshold {15.0f};

Distance threshold (in canvas pixels) for closing the polygon by clicking near the first vertex.

variable allow_click_to_close

bool allow_click_to_close {true};

If true, allow automatic polygon closure when clicking near the first vertex.

variable fill_color

glm::vec4 fill_color {0.2f, 0.6f, 1.0f, 0.3f};

Default fill color for preview.

variable stroke_color

glm::vec4 stroke_color {0.2f, 0.6f, 1.0f, 1.0f};

Default stroke color for preview.

variable vertex_color

glm::vec4 vertex_color {1.0f, 0.0f, 0.0f, 1.0f};

Color for vertices.

variable stroke_width

float stroke_width {2.0f};

Stroke width in pixels.

variable vertex_size

float vertex_size {8.0f};

Vertex point size in pixels.

variable closure_line_color

glm::vec4 closure_line_color {1.0f, 0.6f, 0.2f, 1.0f};

Color for the closure line (line from last to first vertex during construction).


Updated on 2026-11-13 at 20:25:42 +0000