|
|
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.
|
Shared tree-disclosure chevron used by both the inspector tree and the LayersPanel so the two trees present one consistent disclosure style. More...
#include <optional>#include "donner/base/Vector2.h"#include "donner/editor/ImGuiIncludes.h"#include "donner/svg/renderer/RendererInterface.h"Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
Functions | |
| const std::optional< svg::RendererBitmap > & | donner::editor::CachedDisclosureChevronBitmap (bool expanded) |
| Cached white-mask bitmap for the disclosure chevron in the given state (right-pointing when collapsed, down-pointing when expanded), or std::nullopt if rendering failed. Rendered lazily on first use. | |
| int | donner::editor::DisclosureChevronTextureVariant (bool expanded) |
| Stable texture-cache key suffix (0 collapsed, 1 expanded) so callers upload and reuse the two chevron masks as distinct textures. | |
| void | donner::editor::DrawDisclosureChevron (ImDrawList *drawList, ImTextureID texture, const Vector2d &uvBottomRight, const ImVec2 ¢er, float sizePx, ImU32 tint) |
Blit an already-uploaded chevron texture centered at center within a sizePx square, tinted tint. The texture's valid payload UV range is [0, uvBottomRight]. | |
Variables | |
| constexpr int | donner::editor::kDisclosureChevronRasterSizePx = 32 |
| Raster size (device px) for the shared chevron masks. Rendered once each and scaled down at draw time. | |
Shared tree-disclosure chevron used by both the inspector tree and the LayersPanel so the two trees present one consistent disclosure style.
The chevron art is editor-authored SVG (donner/editor/icons/chevron.svg and chevron-down.svg), Donner-rendered to a tintable white mask via RenderEmbeddedSvgIcon. Two axis-aligned assets (right for collapsed, down for expanded) are used so the mask can be blitted with the sanctioned AddImage path rather than a rotated quad.