|
|
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.
|
#include <array>#include <cstdint>#include <functional>#include <optional>#include <span>#include <string>#include <string_view>#include <unordered_set>#include <utility>#include <vector>#include "donner/base/Box.h"#include "donner/base/EcsRegistry.h"#include "donner/base/Transform.h"#include "donner/base/Vector2.h"#include "donner/editor/AttributeWriteback.h"#include "donner/editor/EditorApp.h"#include "donner/editor/ImGuiIncludes.h"#include "donner/editor/ViewportState.h"#include "donner/svg/renderer/RendererInterface.h"Classes | |
| struct | donner::editor::TreeViewState |
| struct | donner::editor::DecomposedTransform |
| Scale-rotate-translate view of a transform, used by the inspector's editable transform fields. The equivalent matrix is Scale(scale) * Rotate(rotationRadians) * Translate(translation) with Donner's apply-left-to-right composition (scale first, translation last). More... | |
| struct | donner::editor::InspectorStyleDisplayValue |
| User-facing form of a computed CSS value and its provenance. More... | |
| class | donner::editor::SidebarPresenter |
| Renders the editor's tree view and inspector panes. More... | |
| struct | donner::editor::SidebarPresenter::IconTexture |
| Maps a static path-operation icon bitmap to an ImGui texture handle for display. The icon bitmaps are rendered from embedded Bootstrap SVG resources through Donner; ImGui only receives the final raster texture for the image button. More... | |
Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
Enumerations | |
| enum class | donner::editor::InspectorStyleState : std::uint8_t { Unspecified , Default , Set } |
| Provenance shown beside a computed CSS value in the Inspector. More... | |
Functions | |
| std::optional< DecomposedTransform > | donner::editor::DecomposeTransform (const Transform2d &transform) |
Decompose transform into scale, rotation, and translation. | |
| Transform2d | donner::editor::ComposeTransform (const DecomposedTransform &decomposed) |
| Compose the decomposed fields back into a matrix: scale is applied first, then rotation, then translation. Inverse of DecomposeTransform for every decomposable matrix. | |
| InspectorStyleDisplayValue | donner::editor::FormatInspectorStyleValue (std::string_view serializedValue) |
| Convert the Inspector's serialized computed-style value to user-facing CSS. | |
| struct donner::editor::SidebarPresenter::IconTexture |
Maps a static path-operation icon bitmap to an ImGui texture handle for display. The icon bitmaps are rendered from embedded Bootstrap SVG resources through Donner; ImGui only receives the final raster texture for the image button.
| stableId | Stable id of the static icon resource being uploaded. |
| bitmap | The Donner-rendered RGBA icon bitmap. |
| Class Members | ||
|---|---|---|
| ImTextureID | texture = 0 | ImGui texture handle. |
| Vector2d | uvBottomRight = Vector2d(1.0, 1.0) | Bottom-right valid payload UV. |
|
strong |
|
nodiscard |
Decompose transform into scale, rotation, and translation.
Returns std::nullopt when the matrix cannot be represented without a skew component (its basis columns are not orthogonal) or is singular (zero-length x basis). Callers should fall back to raw matrix editing in that case rather than force-fitting the fields.
|
nodiscard |
Convert the Inspector's serialized computed-style value to user-facing CSS.
Removes the snapshot's provenance suffix and internal PaintServer(...) or Color(...) wrappers while preserving the actual CSS value.
| serializedValue | Value captured by the Inspector snapshot. |