Reusable stroke markers inserted into the current SVG only when chosen. More...
#include <array>#include <optional>#include <string_view>Classes | |
| struct | donner::editor::StrokeMarkerPrefabOption |
| Human-readable picker entry for one reusable marker shape. 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. | |
Enumerations | |
| enum class | donner::editor::StrokeMarkerPrefab { FilledArrow , OpenArrow , Dot , Diamond } |
| Marker shapes offered by the inspector before the document defines them. | |
Functions | |
| bool | donner::editor::ApplyStrokeMarkerPrefab (EditorApp &app, std::string_view property, StrokeMarkerPrefab prefab) |
| Attach a reusable marker to the selected shapes, creating its SVG definition on first use. | |
| std::optional< StrokeMarkerPrefab > | donner::editor::StrokeMarkerPrefabForReference (svg::SVGDocument &document, std::string_view reference) |
| Identify a tagged prefab marker referenced by url(#id) in the current SVG. | |
| std::optional< StrokeMarkerPrefab > | donner::editor::StrokeMarkerPrefabForElement (const svg::SVGElement &marker) |
| Identify a marker whose ID, resolved target, and SVG geometry match a built-in prefab. | |
Variables | |
| constexpr std::array< StrokeMarkerPrefabOption, 4 > | donner::editor::kStrokeMarkerPrefabOptions |
| Marker choices shown for both the start and end of a stroke. | |
Reusable stroke markers inserted into the current SVG only when chosen.
| bool donner::editor::ApplyStrokeMarkerPrefab | ( | EditorApp & | app, |
| std::string_view | property, | ||
| StrokeMarkerPrefab | prefab ) |
Attach a reusable marker to the selected shapes, creating its SVG definition on first use.
The marker uses context-stroke so its color follows the shape. A later use of the same preset reuses the existing tagged definition; an unrelated element with the preferred ID is preserved. Definition insertion and the style change form one source-backed undo entry.
| app | Editor containing the selected shapes and SVG document. |
| property | Either marker-start or marker-end. |
| prefab | Preset to use. |
|
inlineconstexpr |
Marker choices shown for both the start and end of a stroke.