|
|
Donner SVG 0.8.0-pre
SVG editor and embeddable C++20 engine.
|
#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/EmbeddedSvgIcon.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. | |
| std::span< const EmbeddedSvgIconRequest > | donner::editor::SidebarIconPrewarmRequests () |
| Every inspector path-operation button icon, for the shell's startup prewarm batch. These first appear when a selection makes the boolean-op row available, so batching them with the boot icons keeps that first selection from stalling on a run of GPU readbacks. | |
| std::span< const unsigned char > | donner::editor::PathOperationIconSvg (PathOperationKind operation) |
Embedded SVG source for operation's button icon. Every operation the inspector shows a button for maps to its own artwork, which the editor rasterizes through Donner rather than shipping a baked bitmap or a font glyph. | |
| std::uint64_t | donner::editor::PathOperationIconTextureKey (PathOperationKind operation) |
Presentation-texture cache key for operation's button icon. Distinct per operation so two buttons never share an uploaded texture. | |
Variables | |
| constexpr std::array< PathOperationKind, 4 > | donner::editor::kInspectorPathOperations |
| The path operations the inspector shows a button for, in button order. | |
| 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. |
|
nodiscard |
Embedded SVG source for operation's button icon. Every operation the inspector shows a button for maps to its own artwork, which the editor rasterizes through Donner rather than shipping a baked bitmap or a font glyph.
| operation | Path operation whose icon artwork is wanted. |
|
nodiscard |
Presentation-texture cache key for operation's button icon. Distinct per operation so two buttons never share an uploaded texture.
| operation | Path operation whose icon texture key is wanted. |
|
inlineconstexpr |
The path operations the inspector shows a button for, in button order.