|
|
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 <memory>#include <optional>#include <vector>#include "donner/editor/SelectionTransformHandles.h"Classes | |
| struct | donner::editor::RotateCursorImage |
| RGBA pixels for one custom editor cursor image. More... | |
| struct | donner::editor::CursorHotspot |
| Pointer hotspot for a cursor, in 32x32 cursor-image pixels. More... | |
| class | donner::editor::RotateCursorSet |
| RAII owner for the editor's custom cursors. 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::PanCursorKind { OpenHand , ClosedHand } |
| Visual state for the pan-mode cursor. More... | |
| enum class | donner::editor::PenCursorHint { Base , Add , Remove , Close } |
| Contextual pen-tool cursor variant, matching the pen tool's hover states. More... | |
| enum class | donner::editor::EditorCursor : std::uint8_t { Select , Pen , PenAdd , PenRemove , PenClose , Rotate , Scale , PathModify , PanOpen , PanClosed } |
| Every custom editor cursor, so the cursor set and its completeness / snapshot tests share one enumeration. Rotate and Scale are oriented per selection corner (see CursorUsesCorner); the rest ignore the corner. | |
Functions | |
| CursorHotspot | donner::editor::HotspotForCursor (EditorCursor cursor) |
Hotspot (pointer origin) for cursor, in cursor-image pixels. See donner/editor/art/STYLE.md for the conventions. | |
| bool | donner::editor::CursorUsesCorner (EditorCursor cursor) |
Whether cursor's art is oriented per selection corner (rotate, scale). | |
| std::optional< RotateCursorImage > | donner::editor::RenderEditorCursorImage (EditorCursor cursor, SelectionTransformCorner corner, std::shared_ptr< geode::GeodeDevice > geodeDevice) |
Render any editor cursor to straight-alpha RGBA pixels. corner is only consulted for corner-oriented cursors (CursorUsesCorner); pass any value otherwise. This is the one render path the completeness / snapshot tests exercise, matching the pipeline the live cursors use. | |
| std::optional< RotateCursorImage > | donner::editor::RenderRotateCursorImage (SelectionTransformCorner corner, std::shared_ptr< geode::GeodeDevice > geodeDevice) |
| Render one oriented rotate-cursor SVG to straight-alpha RGBA pixels. | |
| std::optional< RotateCursorImage > | donner::editor::RenderScaleCursorImage (SelectionTransformCorner corner, std::shared_ptr< geode::GeodeDevice > geodeDevice) |
| Render one oriented scale-cursor SVG to straight-alpha RGBA pixels. | |
| std::optional< RotateCursorImage > | donner::editor::RenderSelectCursorImage (std::shared_ptr< geode::GeodeDevice > geodeDevice) |
| Render the select (arrow) cursor SVG to straight-alpha RGBA pixels. | |
| std::optional< RotateCursorImage > | donner::editor::RenderPathModifyCursorImage (std::shared_ptr< geode::GeodeDevice > geodeDevice) |
| Render the path-modify (anchor-point) cursor SVG to straight-alpha RGBA pixels. | |
| std::optional< RotateCursorImage > | donner::editor::RenderPanCursorImage (PanCursorKind kind, std::shared_ptr< geode::GeodeDevice > geodeDevice) |
Render the pan-mode cursor SVG for kind to straight-alpha RGBA pixels. | |
| std::optional< RotateCursorImage > | donner::editor::RenderPenCursorImage (std::shared_ptr< geode::GeodeDevice > geodeDevice) |
| Render the base pen-tool cursor SVG to straight-alpha RGBA pixels. | |
| std::optional< RotateCursorImage > | donner::editor::RenderPenCursorImage (PenCursorHint hint, std::shared_ptr< geode::GeodeDevice > geodeDevice) |
Render a contextual pen-tool cursor SVG for hint to straight-alpha RGBA pixels. | |
Variables | |
| constexpr std::array< EditorCursor, 10 > | donner::editor::kEditorCursors |
| Every editor cursor, in a stable order. Single source of truth for the cursor-set completeness test. | |
|
strong |
|
strong |
Contextual pen-tool cursor variant, matching the pen tool's hover states.
|
nodiscard |
Render the pan-mode cursor SVG for kind to straight-alpha RGBA pixels.
| kind | Pan cursor visual state to render. |
| geodeDevice | Shared Geode device for Geode editor builds. |
|
nodiscard |
Render the base pen-tool cursor SVG to straight-alpha RGBA pixels.
| geodeDevice | Shared Geode device for Geode editor builds. |
|
inlineconstexpr |
Every editor cursor, in a stable order. Single source of truth for the cursor-set completeness test.