|
|
Donner
C++20 SVG rendering library
|
#include <optional>#include <tuple>#include "donner/base/Box.h"#include "donner/base/Length.h"#include "donner/svg/properties/Property.h"Classes | |
| struct | donner::svg::components::SizedElementProperties |
| Stores an offset/size for elements that are positioned with x/y/width/height attributes with respect to their parent. More... | |
| struct | donner::svg::components::SizedElementComponent |
| Stores the properties of a sized element, x, y, width, height. More... | |
| struct | donner::svg::components::ComputedSizedElementComponent |
| Stores the computed bounds of a sized element, resolving units and percentages. More... | |
| struct | donner::svg::components::ComputedShadowSizedElementComponent |
| Stores a shadow tree's computed SizedElementComponent, where a "<use>" element overrides the width or height on "<symbol>" or "<svg>" which use SizedElementComponent. 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,. | |
| struct donner::svg::components::SizedElementComponent |
Stores the properties of a sized element, x, y, width, height.
Used for "<svg>", "<image>" and xml_foreignObject by the standard, and also internally with "<use>" for Donner.
| Class Members | ||
|---|---|---|
| bool | applyTranslationForUseElement = false | Set to true for "<use>" elements, so that x/y are applied as a translation. |
| bool | canOverrideWidthHeightForSymbol = false | Set to true for "<symbol>" elements, so that width/height are inherited from the "<use>" element. |
| SizedElementProperties | properties | The properties of the sized element, x, y, width, height. |
| struct donner::svg::components::ComputedSizedElementComponent |
Stores the computed bounds of a sized element, resolving units and percentages.
Contains the computed rect and inherited viewBox of the parent element.
| Class Members | ||
|---|---|---|
| Boxd | bounds | The computed rect of this sized element. |
| Boxd | inheritedViewBox | The viewBox of the parent element, used for preserveAspectRatio transformations. |
| struct donner::svg::components::ComputedShadowSizedElementComponent |
Stores a shadow tree's computed SizedElementComponent, where a "<use>" element overrides the width or height on "<symbol>" or "<svg>" which use SizedElementComponent.
From https://www.w3.org/TR/SVG2/struct.html#UseElement:
The width and height attributes only have an effect if the referenced element defines a viewport (i.e., if it is a 'svg' or 'symbol'); if so, a value other than auto for the 'use' element overrides the value of the corresponding geometric property on that element.
| Class Members | ||
|---|---|---|
| Boxd | bounds | The computed rect of this sized element. |