Donner SVG Editor & Engine
SVG-native editor and embeddable SVG2 + CSS3 engine in C++20, with GPU (WebGPU) and compact CPU renderers, built for correctness, security, and performance.
Loading...
Searching...
No Matches
donner::svg::components::PolyComponent Struct Reference

Parameters for a <polygon> or <polyline> element. More...

#include "donner/svg/components/shape/PolyComponent.h"

Public Types

enum class  Type {
  Polygon ,
  Polyline
}
 Polygon type, either a closed polygon or a polyline (list of line segments). More...

Public Member Functions

 PolyComponent (Type type)
 Constructor, creates a polygon or polyline.

Public Attributes

Type type
 The type of polygon, either a closed polygon or a polyline (list of line segments).
std::vector< Vector2dpoints
 The points of the polygon.

Detailed Description

Parameters for a <polygon> or <polyline> element.

The difference between a <polygon> and a <polyline> is that a polygon is a closed shape, and draws the closing line segment to connect the first and last points. A polyline is a open shape, and does not draw the closing line segment.

Member Enumeration Documentation

◆ Type

Polygon type, either a closed polygon or a polyline (list of line segments).

Enumerator
Polygon 

<polygon> closed shape

Polyline 

<polyline> list of line segments

Constructor & Destructor Documentation

◆ PolyComponent()

donner::svg::components::PolyComponent::PolyComponent ( Type type)
inlineexplicit

Constructor, creates a polygon or polyline.

Parameters
typeThe type of polygon to create.

The documentation for this struct was generated from the following file: