Donner
C++20 SVG rendering library
Loading...
Searching...
No Matches
LineComponent.h File Reference
Include dependency graph for LineComponent.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  donner::svg::components::LineComponent
 Parameters for a "<line>" element. More...
 

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.
 
namespace  donner::svg
 Donner SVG library, which can load, manipulate and render SVG files.
 
namespace  donner::svg::components
 Contains the implementation of the Donner ECS,.
 

Class Documentation

◆ donner::svg::components::LineComponent

struct donner::svg::components::LineComponent

Parameters for a "<line>" element.

Note that unlike other elements, the x1, y1, x2, and y2 properties are not presentation attributes, so they must be specified on the element and not through CSS. This means that we don't need a ComputedLineComponent counterpart of this struct.

From https://www.w3.org/TR/SVG2/shapes.html#LineElement

‍A future specification may convert the ‘x1’, ‘y1’, ‘x2’, and ‘y2’ attributes to geometric properties. Currently, they can only be specified via element attributes, and not CSS.

Collaboration diagram for donner::svg::components::LineComponent:
[legend]
Class Members
Lengthd x1 The x-coordinate of the start of the line.
Lengthd x2 The x-coordinate of the end of the line.
Lengthd y1 The y-coordinate of the start of the line.
Lengthd y2 The y-coordinate of the end of the line.