Donner SVG library, which can load, manipulate and render SVG files. More...
Namespaces | |
| namespace | parser |
| Parsers for the SVG XML format, SVGParser, as well as individual parsers for SVG components, such as PathParser and TransformParser. | |
| namespace | components |
| Contains the implementation of the Donner ECS,. | |
Classes | |
| struct | FilterEffect |
| Filter effect container, which can contain a reference to another filter effect, or a CSS filter function (such as blur(), grayscale(), etc). More... | |
| class | CssTransform |
| Compared to an SVG transform, CSS transforms have additional features, such as the ability to add units to the translate() function, such as translate(1em 30px). More... | |
| struct | CursorImage |
| One authored cursor image candidate and its optional hotspot. More... | |
| struct | Cursor |
| Cascaded CSS cursor value with authored URL candidates and a required keyword fallback. More... | |
| struct | Event |
| A DOM event object, carrying information about a user interaction. More... | |
| struct | ListenerHandle |
| Handle for removing an event listener. Returned by addEventListener. More... | |
| struct | GradientStop |
| Values for a gradient stop, https://www.w3.org/TR/SVG2/pservers.html#StopElement. More... | |
| struct | MarkerOrient |
| Represents the orientation of a marker. More... | |
| struct | PaintOrder |
| CSS paint-order property value: the order in which the fill, stroke, and markers of a shape/text are painted. More... | |
| class | PreserveAspectRatio |
| Handles SVG's preserveAspectRatio attribute. More... | |
| class | StrokeDasharray |
| The parsed result of the 'stroke-dasharray' property, see: https://www.w3.org/TR/SVG2/painting.html#StrokeDasharrayProperty. More... | |
| struct | TextDecorationThickness |
| CSS thickness of decoration lines originating on an element. More... | |
| struct | TransformOrigin |
| Represents the transform-origin property value. More... | |
| class | DocumentAccessLock |
| Lightweight reader/writer gate for document access. More... | |
| struct | DetachedNodeDiagnostics |
| Summary of detached-node collection state. More... | |
| struct | DocumentAccessDiagnostics |
| Summary of document access and lock state. More... | |
| struct | DocumentMutationRecord |
| One committed document mutation revision. More... | |
| struct | DocumentMutationLogSnapshot |
| Snapshot of mutation-log records after a caller-owned sequence number. More... | |
| struct | DetachedNodeState |
| Document-local detached-node collection state. More... | |
| class | DocumentState |
| Shared mutable state behind SVGDocument and SVGElement facades. More... | |
| class | DocumentReadAccess |
| Scoped read access to a DocumentState. More... | |
| class | DocumentWriteAccess |
| Scoped write access to a DocumentState. More... | |
| class | DetachedNodeCollectionDeferral |
| Scoped deferral for detached-node collection during snapshot or observer epochs. More... | |
| class | DocumentMutationBatch |
| Scoped write access that coalesces nested DOM mutation revision bumps. More... | |
| class | DonnerController |
| Provides hit-testing and spatial queries for an SVG document. More... | |
| struct | RecursionGuard |
| Helper to guard against recursion when evaluating references. More... | |
| struct | ResolvedReference |
| Represents a resolved reference to an SVG entity. More... | |
| struct | Reference |
| Represents a reference to an SVG entity by its href, typically created from a url(#id) string. More... | |
| struct | RadialClipPath |
| Shared reference box and center for radial CSS clipping shapes. More... | |
| struct | CircleClipPath |
| A circle used as a CSS clipping shape. More... | |
| struct | EllipseClipPath |
| An ellipse used as a CSS clipping shape, with independently resolved axis radii. More... | |
| struct | PolygonClipPath |
| A polygon used as a CSS clipping shape. More... | |
| struct | InsetClipPath |
| An inset rectangle with optional elliptical corners used as a CSS clipping shape. More... | |
| struct | PathClipPath |
| A CSS path clipping shape with parsed, owned SVG geometry. More... | |
| struct | ClipPath |
| A referenced SVG clip or a supported CSS basic shape; absence is represented by the property. More... | |
| struct | PaintServer |
| Represents a paint server, which can be a solid color, a reference to another element, or a special value like "none" or "context-fill". More... | |
| struct | Property |
| Holds a CSS property, which has a name and value, and integrates with inheritance to allow cascading values using the CSS model with specificity. More... | |
| class | PropertyRegistry |
| Holds CSS properties for a single element. More... | |
| struct | RenderingInstanceView |
| A view containing a list of components::RenderingInstanceComponent which can be iterated over. More... | |
| struct | FilterInputMargin |
| Input a filter layer's capture must include beyond each output pixel, in device pixels. More... | |
| struct | FilterInputMarginBuilder |
| Accumulates each primitive's input reach in device pixels, converting lengths with the same helpers and bounds the filter executors use. The executors round each primitive to whole pixels (offsets and morphology radii to the nearest pixel, blur kernels up), so each primitive's reach rounds up to whole pixels before the chain adds them. More... | |
| struct | FilterInputBuffer |
| Filter input raster layout around a viewport: the viewport plus input margins on each side. More... | |
| struct | FilterInputAxis |
| One axis of a FilterInputBuffer. More... | |
| struct | FilterRegionSample |
| Resolved clipping bounds and optional un-clipped animated geometry, in user coordinates. More... | |
| struct | FilterRegionContext |
| Per-invocation filter coordinates and subregion history, independent of GPU resources. More... | |
| class | GifEncoder |
| Incremental in-memory encoder for looping animated GIF89a images. More... | |
| struct | PatternTileRasterMetrics |
| Validated dimensions and scale for a rasterized pattern tile. More... | |
| struct | PreparedTextDraw |
| Immutable layout slice and full-element bounds prepared once for a text effect owner. More... | |
| struct | TextDrawGeometry |
| Mutable per-call run copy after effect ownership and visibility filtering. More... | |
| struct | GlyphOutlineAndPlacement |
| A glyph's outline split into the part that depends only on the glyph and the part that depends only on where the glyph sits in the run. More... | |
| struct | GlyphFaceScale |
| The face that draws one glyph, with its outline scale and whether it has only bitmap glyphs. More... | |
| struct | AtlasDocumentPlacement |
| Placement of one document inside a shared atlas render target. More... | |
| class | Renderer |
| Backend-agnostic renderer that resolves to the active build backend (tiny-skia by default, or Geode). More... | |
| class | RendererDriver |
| Backend-agnostic renderer driver that prepares documents for rendering and emits drawing commands through a RendererInterface implementation. More... | |
| class | RendererGeodeTextureSnapshot |
| GPU runtime texture snapshot exported by RendererGeode. More... | |
| struct | FrameTimings |
| Per-frame performance instrumentation for RendererGeode. More... | |
| struct | RendererGeodeTexturePoolStats |
| Retained-memory instrumentation for RendererGeode's transient texture pool. More... | |
| class | RendererGeode |
| Geode rendering backend - GPU-native via the Slug algorithm. More... | |
| class | RendererImageIO |
| Utility class for saving images to disk. More... | |
| struct | RenderViewport |
| Describes the viewport for a render pass. More... | |
| struct | RendererBitmap |
| CPU-readable bitmap produced by a renderer snapshot. More... | |
| struct | RendererReadbackStats |
| Aggregate diagnostics for CPU readbacks run by a renderer and any offscreen instances that share its backend device, plus the device-health outcome those readbacks observed. More... | |
| class | RendererSurfaceBudget |
| Aggregate budget for render targets, layers, masks, clips, and pattern tiles. More... | |
| class | RendererFilterPreparationBudget |
| Aggregate filter-graph preparation and source-image materialization budget for one frame. More... | |
| class | RendererDrawBudget |
| Aggregate conversion, rasterization, and upload work shared by a render frame. More... | |
| class | RendererTextMaterializationBudget |
| Aggregate text outline, bitmap, path-copy, and cache-storage budget for one renderer frame. More... | |
| struct | RendererResourceStats |
| Bounded-resource diagnostics for the most recently started render frame. More... | |
| class | RendererTextureSnapshot |
| Backend-owned GPU texture snapshot produced by a renderer. More... | |
| class | RendererImage |
| A rendered image that lives either in a backend GPU texture or in CPU pixels. More... | |
| struct | PathShape |
| A path to draw, along with its fill rule and the entity it came from. More... | |
| struct | ClipPathShape |
| One resolved clip-path shape, owned by the ResolvedClip that holds it. More... | |
| struct | PaintParams |
| Paint state derived from resolved style for the current node. More... | |
| struct | ResolvedClip |
| Clip stack entry combining rectangles, paths, and optional masks. More... | |
| struct | ImageParams |
| Parameters describing how an image should be drawn. More... | |
| struct | TextParams |
| Parameters describing how text is drawn and outlined. More... | |
| class | RendererInterface |
| Backend-agnostic rendering interface consumed by RendererDriver during document traversal. More... | |
| struct | RendererTinySkiaFrameCounters |
| Per-frame counts of the conversions RendererTinySkia caches. More... | |
| class | RendererTinySkia |
| Rendering backend using tiny-skia-cpp. More... | |
| class | RendererUtils |
| Utility functions for the renderer. More... | |
| class | RenderSnapshot |
| Immutable command stream captured from a prepared SVG document. More... | |
| class | RenderSnapshotRecorder |
| RendererInterface implementation that records commands into a RenderSnapshot. More... | |
| struct | RetainedSpanKey |
| Everything a captured blit sequence depends on, besides the shape's geometry. More... | |
| struct | RetainedSpanSlot |
| One retained fill or stroke pass of one shape. More... | |
| struct | RetainedSpansComponent |
| Retained rasterization output for one shape, attached to the entity its geometry came from. More... | |
| struct | RetainedSpanDocumentState |
| Document-wide state for retained coverage, stored in the registry context. More... | |
| struct | RetainedSpanStats |
| Counters describing what a renderer's retained coverage did, for tests and benchmarks. More... | |
| struct | StrokeParams |
| Stroke configuration used for path and primitive drawing. More... | |
| struct | TerminalCapabilities |
| Terminal detection results derived from environment probing. More... | |
| struct | TerminalSize |
| Terminal size in columns and rows. More... | |
| struct | TerminalCellSize |
| Terminal cell size in pixels. More... | |
| struct | TerminalImageViewerConfig |
| Rendering configuration for terminal output. More... | |
| struct | TerminalImageView |
| Image view describing an RGBA buffer. More... | |
| struct | QuarterBlock |
| Per-cell subpixel sampling for quarter-pixel mode. More... | |
| struct | HalfBlock |
| Per-cell subpixel sampling for half-pixel mode. More... | |
| struct | TerminalCell |
| Aggregated subpixel data for a terminal cell. More... | |
| struct | TerminalImage |
| Sampled representation of an image prepared for terminal rendering. More... | |
| class | TerminalImageViewer |
| Terminal image sampler for quarter- and half-pixel block glyphs. More... | |
| struct | CatalogFontAsset |
| Build-pinned catalog metadata. Runtime responses never add entries or choose package paths. More... | |
| class | CatalogEncodedFontStore |
| Session-owned verified encoded bytes and shared catalog decode admission. More... | |
| class | EmbeddedFontProvider |
| Curated bundled fonts, sharing one generated WOFF2 catalog on native and Wasm. More... | |
| class | FontCatalog |
| Aggregate font catalog: the single surface the editor's font picker and FontManager resolution consume. More... | |
| struct | FontFamilyInfo |
| One entry in the font catalog: a family name plus how it was discovered and classified. More... | |
| struct | FontFaceRequest |
| Which face inside a family a font-family lookup wants, taken from the element's computed CSS font properties. More... | |
| struct | FontFaceAvailability |
| Nonblocking metadata for a face. Empty contentId preserves legacy synchronous providers. More... | |
| struct | FontFaceDependency |
| Copyable dependency record suitable for handing off before a temporary document is destroyed. More... | |
| class | FontFaceLoadReservation |
| A reservation stays alive through the provider copy, decoder, and transfer into retained data. More... | |
| struct | FontFaceAdmission |
| Nonblocking admission result. Synchronous custom providers need no reservation by default. More... | |
| class | FontFamilyProvider |
| Interface implemented by each font source (embedded, system) and by the aggregate FontCatalog. More... | |
| class | ScopedFontLoadInterruption |
| Lets the calling thread abandon provider font loads that are no longer wanted. More... | |
| struct | FontDataRenderingOptions |
| Owned rendering attributes for a provider face reloaded from encoded bytes. More... | |
| struct | FontLoadingDomainIdentity |
| Non-owning identity of an installed font-loading domain. More... | |
| class | FontHandle |
| Opaque handle to a loaded font, used to reference fonts in the FontManager. More... | |
| class | FontManager |
| Manages font loading, caching, and lookup for text rendering. More... | |
| struct | FontMetadata |
| Metadata extracted from a raw OpenType/TrueType font file. More... | |
| struct | SvgImageContent |
| Contains raw SVG document bytes, returned by ImageLoader when the referenced resource is an SVG image (image/svg+xml). More... | |
| class | ImageLoader |
| Utility class for loading images from a URI. More... | |
| struct | ImageResource |
| Contains a decoded image resource in RGBA format. More... | |
| class | NullResourceLoader |
| A resource loader that does not load any resources and always returns an error. More... | |
| class | ResourceLoaderInterface |
| Interface for loading external resources, such as images. More... | |
| class | SandboxedFileResourceLoader |
| A resource loader that loads files from a sandboxed directory. More... | |
| class | SystemFontProvider |
| FontFamilyProvider backed by the host operating system's installed fonts. More... | |
| class | UrlLoader |
| Utility class for loading a URI or decoding a data URL. More... | |
| class | SVGAElement |
| DOM object for a <a> element. More... | |
| class | SVGAnimateElement |
| DOM object for a <animate> element. More... | |
| class | SVGAnimateMotionElement |
| DOM wrapper for the <animateMotion> element. More... | |
| class | SVGAnimateTransformElement |
| DOM object for a <animateTransform> element. More... | |
| class | SVGCircleElement |
| DOM object for a <circle> element. More... | |
| class | SVGClipPathElement |
| DOM object for a <clipPath> element. More... | |
| class | SVGDefsElement |
| DOM object for a <defs> element. More... | |
| class | SVGDescElement |
| DOM object for a <desc> element. More... | |
| struct | SVGAnimationEvent |
| A declarative animation boundary observed over a time interval. More... | |
| struct | SVGAnimationEventBatch |
| Bounded lifecycle query result. An incomplete query returns no partial events. More... | |
| struct | FontResourcePreflight |
| Readiness of catalog-dependent geometry or pixels for an explicit element target. More... | |
| class | SVGDocument |
| Represents a parsed SVG document containing a tree of SVGElement nodes. More... | |
| class | SVGDocumentMutation |
| Typed DOM mutation helper used by SVGDocument::withWriteAccess. More... | |
| class | ElementAnchor |
| Lifetime-aware reference to an SVG element entity. More... | |
| class | SVGElement |
| Represents a single SVG element (e.g., <rect>, <circle>, <g>, <text>, etc.) within an SVGDocument. More... | |
| class | SVGEllipseElement |
| DOM object for a <ellipse> element. More... | |
| class | SVGFEBlendElement |
| DOM object for a <feBlend> element. More... | |
| class | SVGFEColorMatrixElement |
| DOM object for a <feColorMatrix> element. More... | |
| class | SVGFEComponentTransferElement |
| DOM object for a <feComponentTransfer> element. More... | |
| class | SVGFECompositeElement |
| DOM object for a <feComposite> element. More... | |
| class | SVGFEConvolveMatrixElement |
| DOM object for a <feConvolveMatrix> element. More... | |
| class | SVGFEDiffuseLightingElement |
| DOM object for a <feDiffuseLighting> element. More... | |
| class | SVGFEDisplacementMapElement |
| DOM object for a <feDisplacementMap> element. More... | |
| class | SVGFEDistantLightElement |
| DOM object for a <feDistantLight> element. More... | |
| class | SVGFEDropShadowElement |
| DOM object for a <feDropShadow> element. More... | |
| class | SVGFEFloodElement |
| DOM object for a <feFlood> element. More... | |
| class | SVGFEFuncAElement |
| DOM object for a <feFuncA> element. More... | |
| class | SVGFEFuncBElement |
| DOM object for a <feFuncB> element. More... | |
| class | SVGFEFuncGElement |
| DOM object for a <feFuncG> element. More... | |
| class | SVGFEFuncRElement |
| DOM object for a <feFuncR> element. More... | |
| class | SVGFEGaussianBlurElement |
| DOM object for a <feGaussianBlur> element. More... | |
| class | SVGFEImageElement |
| DOM object for a <feImage> element. More... | |
| class | SVGFEMergeElement |
| DOM object for a <feMerge> element. More... | |
| class | SVGFEMergeNodeElement |
| DOM object for a <feMergeNode> element. More... | |
| class | SVGFEMorphologyElement |
| DOM object for a <feMorphology> element. More... | |
| class | SVGFEOffsetElement |
| DOM object for a <feOffset> element. More... | |
| class | SVGFEPointLightElement |
| DOM object for a <fePointLight> element. More... | |
| class | SVGFESpecularLightingElement |
| DOM object for a <feSpecularLighting> element. More... | |
| class | SVGFESpotLightElement |
| DOM object for a <feSpotLight> element. More... | |
| class | SVGFETileElement |
| DOM object for a <feTile> element. More... | |
| class | SVGFETurbulenceElement |
| DOM object for a <feTurbulence> element. More... | |
| class | SVGFilterElement |
| DOM object for a <filter> element. More... | |
| class | SVGFilterPrimitiveStandardAttributes |
| Handles standard attributes for filter primitives, which are children of the <filter> element. More... | |
| class | SVGGElement |
| DOM object for a <g> element. More... | |
| class | SVGGeometryElement |
| Base class for all Elements: Basic Shapes. More... | |
| class | SVGGradientElement |
| Base class for SVG gradient elements, such as SVGLinearGradientElement and SVGRadialGradientElement. More... | |
| class | SVGGraphicsElement |
| Base class for elements which render or impact the rendering tree, such as <path> and <g>. More... | |
| class | SVGImageElement |
| DOM object for a <image> element. More... | |
| class | SVGLinearGradientElement |
| DOM object for a <linearGradient> element. More... | |
| class | SVGLineElement |
| DOM object for a <line> element. More... | |
| class | SVGMarkerElement |
| DOM object for a <marker> element, which is used to define graphical objects that can be used repeatedly along a path, such as arrowheads or other markers on paths. More... | |
| class | SVGMaskElement |
| Represents the <mask> element in SVG, which is used to define a mask for graphical elements. More... | |
| class | SVGMetadataElement |
| DOM object for a <metadata> element. More... | |
| class | SVGMPathElement |
| DOM wrapper for the <mpath> element. More... | |
| class | SVGPathElement |
| DOM object for a <path> element. More... | |
| class | SVGPatternElement |
| DOM object for a <pattern> element. More... | |
| class | SVGPolygonElement |
| DOM object for a <polygon> element. More... | |
| class | SVGPolylineElement |
| DOM object for a <polyline> element. More... | |
| class | SVGRadialGradientElement |
| DOM object for a <radialGradient> element. More... | |
| class | SVGRectElement |
| DOM object for the <rect> element. More... | |
| class | SVGSetElement |
| DOM object for a <set> element. More... | |
| class | SVGStopElement |
| DOM object for a <stop> element. More... | |
| class | SVGStyleElement |
| DOM object for a <style> element, which contains a CSS stylesheet. More... | |
| struct | SVGMatchedStyleRule |
| Diagnostic record for one stylesheet rule that matched an element. More... | |
| struct | SVGStylesheetDeclaration |
| Parsed declaration within a stylesheet rule, with an optional document source range. More... | |
| struct | SVGStylesheetRule |
| Stylesheet rule in a document; built-in rules have no document source ranges. More... | |
| struct | SVGStyleRuleAtSourceOffset |
| Stylesheet rule found at a document source offset. More... | |
| class | SVGSVGElement |
| DOM object for a <svg> element. More... | |
| class | SVGSwitchElement |
| DOM object for a <switch> element. More... | |
| class | SVGSymbolElement |
| DOM object for a <symbol> element, which defines a graphical template that can be instantiated using a <use> element. More... | |
| struct | TextGlyphOutline |
| A single placed glyph outline paired with the element that painted it. More... | |
| class | SVGTextContentElement |
| Base class for elements that support rendering child text content. More... | |
| class | SVGTextElement |
| DOM object for a <text> element. More... | |
| class | SVGTextPathElement |
| DOM object for a <textPath> element. More... | |
| class | SVGTextPositioningElement |
| Base class for elements that support per-glyph positioning attributes (x, y, dx, dy, rotate) on top of the basic text content interface. More... | |
| class | SVGTitleElement |
| DOM object for a <title> element. More... | |
| class | SVGTSpanElement |
| DOM object for a <tspan> element. More... | |
| class | SVGUnknownElement |
| DOM object for an unknown SVG element. More... | |
| class | SVGUseElement |
| DOM object for a <use> element. More... | |
| struct | BidiResourceBudget |
| Cumulative admission for one text layout, including fast paths and all source spans. More... | |
| class | BidiParagraph |
| Owns stable Unicode scalar storage and resolved paragraphs. No library handle escapes. More... | |
| class | GraphemeBreaker |
| Streaming Unicode 17.0.0 extended grapheme boundaries (UAX #29 revision 47). State is constant size and may continue across adjacent text spans. More... | |
| class | LamAlefCandidateBreaker |
| Detect potential Unicode lam-alef groups; actual font shaping must qualify their boundaries. More... | |
| struct | FontVMetrics |
| Font vertical metrics in font design units (unscaled). More... | |
| struct | UnderlineMetrics |
| Line decoration positioning metrics in font design units. More... | |
| struct | SubSuperMetrics |
| Sub/superscript Y offsets from the OS/2 table, in font design units. More... | |
| class | TextBackend |
| Abstract font backend for text rendering operations. More... | |
| class | TextBackendFull |
| HarfBuzz + FreeType font backend. More... | |
| class | TextBackendSimple |
| stb_truetype-based font backend. More... | |
| struct | TextStyleContext |
| Internal, frame-owned mapping from authored text entities to one rendered instance's styles. Callers pass it synchronously; layout and draw results retain no reference to this map. More... | |
| class | TextEngine |
| Shared SVG text engine. More... | |
| struct | TextLayoutParams |
| Layout-only parameters consumed by TextEngine. More... | |
| class | TextPathMeasurementReservation |
| Lifetime charge for retained text-path measurement geometry. More... | |
| struct | StretchedTextPath |
| Shared path mapping used to warp glyph outlines for textPath method="stretch". More... | |
| struct | ResolvedTextFont |
| Resolved face and used font size for layout or declaring-element decoration metrics. More... | |
| struct | TextGlyph |
| A single positioned glyph in a laid-out text run. More... | |
| struct | TextRun |
| A run of positioned glyphs laid out with one primary face. More... | |
| struct | SampledImageInfo |
| Sampled image dimensions and scaling for coordinate mapping. More... | |
Typedefs | |
| using | AllSVGElements |
| A type list of all SVG element types, used by donner::svg::parser::AttributeParser and donner::svg::parser::SVGParser. | |
| using | EventCallback = std::function<void(Event&)> |
| Callback type for event listeners. | |
| template<typename T> | |
| using | GetInitialFn = std::optional<T> (*)() |
| Callback function to get the initial value of a property. | |
| using | SVGDocumentHandle = std::shared_ptr<DocumentState> |
| Shared internal document state used by SVGDocument's by-value facade. | |
Enumerations | |
| enum class | FilterUnits : std::uint8_t { UserSpaceOnUse , ObjectBoundingBox , Default = ObjectBoundingBox } |
| Values for the "filterUnits" attribute which defines the coordinate system for attributes x, y, width, height. More... | |
| enum class | PrimitiveUnits : std::uint8_t { UserSpaceOnUse , ObjectBoundingBox , Default = UserSpaceOnUse } |
| Values for the "primitiveUnits" attribute which specifies the coordinate system for the various length values within the filter primitives and for the attributes that define the filter primitive subregion. More... | |
| enum class | ClipPathUnits : uint8_t { UserSpaceOnUse , ObjectBoundingBox , Default = UserSpaceOnUse } |
| Values for the "clipPathUnits" attribute, https://drafts.fxtf.org/css-masking-1/#element-attrdef-clippath-clippathunits. More... | |
| enum class | ClipRule : uint8_t { NonZero , EvenOdd } |
| The parsed result of the clip-rule property, see: https://drafts.fxtf.org/css-masking-1/#propdef-clip-rule. More... | |
| enum class | ColorInterpolation : std::uint8_t { Auto , SRGB , LinearRGB , Default = SRGB } |
| Values of the inherited color-interpolation property. Luminance masks use this color space. More... | |
| enum class | ColorInterpolationFilters : std::uint8_t { SRGB , LinearRGB , Default = LinearRGB } |
| Values for the "color-interpolation-filters" property which specifies the color space for filter operations. More... | |
| enum class | CursorType : uint8_t { Auto , Default , None , Pointer , Crosshair , Move , Text , Wait , Help , NotAllowed , Grab , Grabbing , NResize , EResize , SResize , WResize , NEResize , NWResize , SEResize , SWResize , ColResize , RowResize , ZoomIn , ZoomOut , ContextMenu , Progress , Cell , VerticalText , Alias , Copy , NoDrop , AllScroll , EWResize , NSResize , NESWResize , NWSEResize } |
| CSS cursor types, defining which cursor the user agent should display. More... | |
| enum class | Display : uint8_t { Inline , Block , ListItem , InlineBlock , Table , InlineTable , TableRowGroup , TableHeaderGroup , TableFooterGroup , TableRow , TableColumnGroup , TableColumn , TableCell , TableCaption , None } |
| The parsed result of the CSS 'display' property, see https://www.w3.org/TR/CSS2/visuren.html#propdef-display. More... | |
| enum class | DominantBaseline : uint8_t { Auto , TextBottom , Alphabetic , Ideographic , Middle , Central , Mathematical , Hanging , TextTop , UseScript , NoChange , ResetSize } |
| The parsed result of the dominant-baseline property. More... | |
| enum class | EventType : uint8_t { Click , DblClick , MouseDown , MouseUp , MouseMove , MouseEnter , MouseLeave , MouseOver , MouseOut , Wheel } |
| Types of DOM events that can be dispatched through the SVG event system. More... | |
| enum class | FontKerning : uint8_t { Auto , Normal , None } |
| Computed CSS font-kerning policy. Auto currently enables kerning at every size. More... | |
| enum class | FontStretch : uint8_t { UltraCondensed = 1 , ExtraCondensed = 2 , Condensed = 3 , SemiCondensed = 4 , Normal = 5 , SemiExpanded = 6 , Expanded = 7 , ExtraExpanded = 8 , UltraExpanded = 9 } |
| The parsed result of the font-stretch property. More... | |
| enum class | FontStyle : uint8_t { Normal , Italic , Oblique } |
| The parsed result of the font-style property. More... | |
| enum class | FontSynthesisSmallCaps : uint8_t { Auto , None } |
| Whether the CSS font-synthesis-small-caps property permits synthetic small caps. More... | |
| enum class | FontSynthesisStyle : uint8_t { Auto , None , ObliqueOnly } |
| CSS permission to synthesize an oblique face when a matching designed face is absent. More... | |
| enum class | FontVariant : uint8_t { Normal , SmallCaps } |
| The parsed result of the font-variant shorthand property (SVG 1.1 subset). More... | |
| enum class | GradientUnits : uint8_t { UserSpaceOnUse , ObjectBoundingBox , Default = ObjectBoundingBox } |
| Values for the "gradientUnits" attribute, https://www.w3.org/TR/SVG2/pservers.html#LinearGradientElementGradientUnitsAttribute and https://www.w3.org/TR/SVG2/pservers.html#RadialGradientElementGradientUnitsAttribute. More... | |
| enum class | GradientSpreadMethod : uint8_t { Pad , Reflect , Repeat , Default = Pad } |
| Values for the gradient "spreadMethod" attribute, https://www.w3.org/TR/SVG2/pservers.html#LinearGradientElementSpreadMethodAttribute and https://www.w3.org/TR/SVG2/pservers.html#RadialGradientElementSpreadMethodAttribute. More... | |
| enum class | HitTestMode { SvgPointerEvents , EditorSelection } |
| Select whether a hit query follows SVG interaction rules or targets editable artwork. More... | |
| enum class | ImageRendering : uint8_t { Auto , OptimizeSpeed , OptimizeQuality , CrispEdges , Pixelated , Smooth , HighQuality } |
| CSS image-rendering property values. More... | |
| enum class | Isolation : uint8_t { Auto , Isolate } |
| CSS isolation property values. More... | |
| enum class | LengthAdjust : uint8_t { Spacing , SpacingAndGlyphs , Default = Spacing } |
| Values for the "lengthAdjust" attribute, https://www.w3.org/TR/SVG2/text.html#TextElementLengthAdjustAttribute. More... | |
| enum class | MarkerUnits : uint8_t { StrokeWidth , UserSpaceOnUse , Default = StrokeWidth } |
| Values for the "markerUnits" attribute, https://www.w3.org/TR/SVG2/painting.html#MarkerUnitsAttribute. More... | |
| enum class | MaskType : uint8_t { Luminance , Alpha } |
| CSS mask-type property values. More... | |
| enum class | MaskUnits : uint8_t { UserSpaceOnUse , ObjectBoundingBox , Default = ObjectBoundingBox } |
| Values for the "maskUnits" attribute, https://drafts.fxtf.org/css-masking-1/#element-attrdef-mask-maskunits. More... | |
| enum class | MaskContentUnits : uint8_t { UserSpaceOnUse , ObjectBoundingBox , Default = UserSpaceOnUse } |
| Values for the "maskContentUnits" attribute, https://drafts.fxtf.org/css-masking-1/#element-attrdef-mask-maskcontentunits. More... | |
| enum class | MixBlendMode : uint8_t { Normal , Multiply , Screen , Overlay , Darken , Lighten , ColorDodge , ColorBurn , HardLight , SoftLight , Difference , Exclusion , Hue , Saturation , Color , Luminosity } |
| CSS mix-blend-mode property values for compositing blend modes. More... | |
| enum class | NonScalingStrokeMode : uint8_t { Scaling , ScaledLocal , HostSpace } |
| How an element's stroke is realized under its current CTM. More... | |
| enum class | Overflow : uint8_t { Visible , Hidden , Scroll , Auto } |
| The parsed result of the CSS 'overflow' property, see https://www.w3.org/TR/CSS2/visufx.html#overflow and https://www.w3.org/TR/SVG2/render.html#OverflowAndClipProperties. More... | |
| enum class | OverflowWrap : uint8_t { Normal , BreakWord , Anywhere } |
| CSS emergency wrapping policy. BreakWord and Anywhere differ in intrinsic sizing. | |
| enum class | PaintComponent : uint8_t { Fill , Stroke , Markers } |
| One of the three paint operations whose draw order is controlled by the CSS paint-order property. More... | |
| enum class | PatternUnits : uint8_t { UserSpaceOnUse , ObjectBoundingBox , Default = ObjectBoundingBox } |
| PatternUnits controls the coordinate system of the x/y/width/height attributes: More... | |
| enum class | PatternContentUnits : uint8_t { UserSpaceOnUse , ObjectBoundingBox , Default = UserSpaceOnUse } |
| PatternContentUnits controls the coordinate system of the children of the pattern: More... | |
| enum class | PointerEvents : uint8_t { None , BoundingBox , VisiblePainted , VisibleFill , VisibleStroke , Visible , Painted , Fill , Stroke , All , Auto } |
| Values for the 'pointer-events' property, which defines how mouse events interact with an element. More... | |
| enum class | ProcessingMode : uint8_t { DynamicInteractive , SecureAnimated , SecureStatic } |
| SVG document processing mode, per SVG2 ยง2.7.1. More... | |
| enum class | StrokeLinecap : uint8_t { Butt , Round , Square } |
| The parsed result of the 'stroke-linecap' property, see: https://www.w3.org/TR/SVG2/painting.html#StrokeLinecapProperty. More... | |
| enum class | StrokeLinejoin : uint8_t { Miter , MiterClip , Round , Bevel , Arcs } |
| The parsed result of the 'stroke-linejoin' property, see: https://www.w3.org/TR/SVG2/painting.html#StrokeLinejoinProperty. More... | |
| enum class | TextAnchor : uint8_t { Start , Middle , End } |
| The parsed result of the text-anchor property. More... | |
| enum class | TextDecoration : uint8_t { None = 0 , Underline = 1 << 0 , Overline = 1 << 1 , LineThrough = 1 << 2 } |
| Bitmask for the text-decoration property line types. More... | |
| enum class | TextDecorationStyle : uint8_t { Solid , Double , Dotted , Dashed , Wavy } |
| The text-decoration-style property: how each decoration line is drawn. More... | |
| enum class | TextOrientation : uint8_t { Mixed , Upright , Sideways } |
| CSS text-orientation values used in vertical writing modes. | |
| enum class | TextTransform : uint8_t { None , FullWidth } |
| Supported CSS text-transform operations. Case and kana-size transforms are not implemented. | |
| enum class | VectorEffect : uint8_t { None , NonScalingStroke , NonScalingSize , NonRotation , FixedPosition } |
| Values for the vector-effect property, which modifies how an element is affected by the coordinate system transformations in effect (such as viewBox scaling and transform). More... | |
| enum class | Visibility : uint8_t { Visible , Hidden , Collapse } |
| The parsed result of the 'visibility' property, see: https://www.w3.org/TR/CSS2/visufx.html#propdef-visibility. More... | |
| enum class | WhiteSpace : uint8_t { Normal , Pre , Nowrap , PreWrap , BreakSpaces , PreLine } |
| CSS white-space keywords controlling collapsing and line breaking. | |
| enum class | WritingMode : uint8_t { HorizontalTb , VerticalRl , VerticalLr } |
| CSS writing-mode property values, controlling the direction of text flow. More... | |
| enum class | ThreadingMode { SingleThreaded , ConcurrentDom } |
| DOM threading policy for a document. More... | |
| enum class | ElementType : uint8_t { A , Animate , AnimateMotion , AnimateTransform , Circle , ClipPath , Defs , Desc , Ellipse , FeBlend , FeColorMatrix , FeComponentTransfer , FeComposite , FeConvolveMatrix , FeDiffuseLighting , FeDisplacementMap , FeDistantLight , FeDropShadow , FeFlood , FeFuncA , FeFuncB , FeFuncG , FeFuncR , FeGaussianBlur , FeImage , FeMerge , FeMergeNode , FeMorphology , FeOffset , FePointLight , FeSpecularLighting , FeSpotLight , FeTile , FeTurbulence , Filter , G , Image , Line , LinearGradient , Marker , Mask , MPath , Metadata , Path , Pattern , Polygon , Polyline , RadialGradient , Rect , Set , Stop , Style , SVG , Switch , Symbol , Text , TextPath , Title , TSpan , Unknown , Use } |
| SVG element types, corresponds to each XML element name, such as <circle>, <svg>, <rect>, etc. More... | |
| enum class | PropertyCascade { None , Inherit , PaintInherit } |
| Defines how this property cascades between the parent and child elements. More... | |
| enum class | PropertyState { NotSet = 0 , Set = 1 , Inherit = 2 , ExplicitInitial = 3 , ExplicitUnset = 4 } |
| The current property state, which can be either set, not set, or a specific CSS keyword such as "inherit", "initial", or "unset". More... | |
| enum class | PropertyInheritOptions { All , NoPaint } |
| Options to control how inheritance is performed, to either inherit everything or conditionally disable inheritance of paint servers. More... | |
| enum class | ImageSamplingKernel : std::uint8_t { Nearest , Bilinear , MitchellCubic , PixelatedSmooth } |
| Resampling kernel a backend applies when it scales a raster <image>. More... | |
| enum class | AlphaType : uint8_t { Premultiplied , Unpremultiplied } |
| Alpha channel interpretation for pixel data. More... | |
| enum class | GpuWaitTimeoutSite : uint8_t { None , ReadbackMap , QueueIdle , Present , Unknown } |
| Bounded CPU-blocks-on-GPU wait that exceeded its deadline and caused a renderer backend to declare its device lost. More... | |
| enum class | RendererTextureSnapshotBackend : uint8_t { Unknown , Geode } |
| Backend type for RendererTextureSnapshot payloads. | |
| enum class | TerminalPixelMode { kQuarterPixel , kHalfPixel } |
| Pixel granularity for terminal rendering. | |
| enum class | FontSource { Bundled , System } |
| Where a font family in the FontCatalog originates. More... | |
| enum class | FontCategory { SansSerif , Serif , Monospace , Display , Handwriting , Unknown } |
| Coarse style bucket for a font family, used to give the picker variety and (later) to inform generic-family fallback. More... | |
| enum class | FontFileFormat { Unknown , Sfnt , Woff2 } |
| Encoded file format, independently of transport and consumer decoding state. | |
| enum class | FontAssetState { Unavailable , Absent , Queued , Fetching , Ready , Failed } |
| Availability of encoded bytes. Looking this up never starts a request. | |
| enum class | FontFaceLoadState { WaitingForBytes , WaitingForAdmission , Resolving , Loaded , Failed } |
| State of one consumer's resolution, distinct from the availability of shared encoded bytes. | |
| enum class | FontFaceWaitReason { None , SharedDecodeSlot , RetainedBudget } |
| What can make a deferred face eligible again. Consumer budgets are independent of the shared catalog decode slot; releasing another consumer's slot cannot repair retained-byte pressure. | |
| enum class | FontDataTrust { Untrusted , Trusted } |
| Declares whether font bytes come from a trusted local source. More... | |
| enum class | ResourceLoaderError : uint8_t { NotFound , SandboxViolation , TooLarge } |
| Error codes for resource loading. More... | |
| enum class | UrlLoaderError : uint8_t { NotFound , UnsupportedFormat , InvalidDataUrl , DataCorrupt , ResourceTooLarge } |
| Enum of possible errors that can occur when loading an image. More... | |
| enum class | FillRule |
| The parsed result of the 'fill-rule' property, see: https://www.w3.org/TR/SVG2/painting.html#FillRuleProperty. | |
Functions | |
| std::ostream & | operator<< (std::ostream &os, const std::vector< FilterEffect > &filters) |
| Ostream output operator for a vector of filter effects. | |
| std::ostream & | operator<< (std::ostream &os, ClipPathUnits units) |
| Ostream output operator for ClipPathUnits enum, outputs the enum name with prefix, e.g. ClipPathUnits::UserSpaceOnUse. | |
| std::ostream & | operator<< (std::ostream &os, const ClipRule &clipRule) |
| Output stream operator for ClipRule enum. | |
| std::ostream & | operator<< (std::ostream &os, ColorInterpolation value) |
| Prints a color interpolation value. | |
| std::ostream & | operator<< (std::ostream &os, ColorInterpolationFilters cif) |
| Ostream output operator for ColorInterpolationFilters. | |
| std::ostream & | operator<< (std::ostream &os, const Cursor &cursor) |
| Human-readable output for diagnostics and tests. | |
| std::ostream & | operator<< (std::ostream &os, CursorType value) |
| Output stream operator for CursorType, outputs the CSS string representation. | |
| std::ostream & | operator<< (std::ostream &os, Display value) |
| Ostream output operator for Display enum, outputs the CSS value. | |
| std::ostream & | operator<< (std::ostream &os, DominantBaseline value) |
| Ostream output operator for DominantBaseline enum, outputs the CSS value. | |
| std::ostream & | operator<< (std::ostream &os, EventType type) |
| Output stream operator for EventType. | |
| bool | eventBubbles (EventType type) |
| Returns true if the event type bubbles up the DOM tree. | |
| std::ostream & | operator<< (std::ostream &os, FontKerning value) |
| Writes the CSS keyword for a kerning policy. | |
| std::ostream & | operator<< (std::ostream &os, FontStretch value) |
| Ostream output operator for FontStretch enum, outputs the CSS value. | |
| std::ostream & | operator<< (std::ostream &os, FontStyle value) |
| Ostream output operator for FontStyle enum, outputs the CSS value. | |
| std::ostream & | operator<< (std::ostream &os, FontSynthesisSmallCaps value) |
| Write the CSS keyword for the given synthesis policy. | |
| std::ostream & | operator<< (std::ostream &os, FontSynthesisStyle value) |
| Write the CSS keyword for a synthesis policy. | |
| std::ostream & | operator<< (std::ostream &os, FontVariant value) |
| Ostream output operator for FontVariant enum, outputs the CSS value. | |
| std::ostream & | operator<< (std::ostream &os, HitTestMode mode) |
| Output stream operator for HitTestMode. | |
| std::ostream & | operator<< (std::ostream &os, ImageRendering value) |
| ostream output operator for ImageRendering. | |
| std::ostream & | operator<< (std::ostream &os, Isolation value) |
| ostream output operator for Isolation. | |
| std::ostream & | operator<< (std::ostream &os, LengthAdjust units) |
| Ostream output operator for LengthAdjust enum, outputs the enum name with prefix, e.g. LengthAdjust::Spacing. | |
| std::ostream & | operator<< (std::ostream &os, MarkerUnits units) |
| Ostream output operator for MarkerUnits enum, outputs the enum name with prefix, e.g. MarkerUnits::UserSpaceOnUse. | |
| std::ostream & | operator<< (std::ostream &os, MaskType value) |
| Ostream output operator for MaskType. | |
| std::ostream & | operator<< (std::ostream &os, MaskUnits units) |
| Ostream output operator for MaskUnits enum, outputs the enum name with prefix, e.g. MaskUnits::UserSpaceOnUse. | |
| std::ostream & | operator<< (std::ostream &os, MaskContentUnits units) |
| Ostream output operator for MaskContentUnits enum, outputs the enum name with prefix, e.g. MaskContentUnits::UserSpaceOnUse. | |
| std::ostream & | operator<< (std::ostream &os, MixBlendMode value) |
| ostream output operator for MixBlendMode. | |
| bool | IsSimilarityTransform (const Transform2d &transform) |
Returns whether transform's linear part is a similarity: uniform scale combined with rotation and optionally reflection. | |
| NonScalingStrokeMode | ResolveNonScalingStrokeMode (VectorEffect vectorEffect, const Transform2d &worldFromEntity, bool geometryMustStayLocal) |
| Resolves how an element's stroke is realized. | |
| double | EffectiveStrokeWidth (double authoredWidth, NonScalingStrokeMode mode, const Transform2d &worldFromEntity) |
| Returns the stroke width the renderer expands the centerline by, in the space that centerline is stroked in: local space for NonScalingStrokeMode::Scaling and NonScalingStrokeMode::ScaledLocal, host space for NonScalingStrokeMode::HostSpace. | |
| double | StrokeCullHalfExtent (double strokeWidth, StrokeLinecap linecap, StrokeLinejoin linejoin, double miterLimit) |
Returns the furthest distance a stroke of strokeWidth can reach from its centerline. | |
| std::ostream & | operator<< (std::ostream &os, Overflow value) |
| Ostream output operator for Overflow enum, outputs the CSS value. | |
| std::ostream & | operator<< (std::ostream &os, OverflowWrap value) |
| Write the CSS keyword for the policy. | |
| std::ostream & | operator<< (std::ostream &os, PaintComponent value) |
| ostream output operator for PaintComponent. | |
| std::ostream & | operator<< (std::ostream &os, const PaintOrder &value) |
| ostream output operator for PaintOrder. | |
| std::ostream & | operator<< (std::ostream &os, PointerEvents value) |
| Output stream operator for PointerEvents, outputs the CSS string representation for this enum, e.g. "none", "bounding-box", etc. | |
| std::ostream & | operator<< (std::ostream &os, PreserveAspectRatio::Align value) |
| Outputs Align value to stream (e.g., "Align::XMidYMid"). | |
| std::ostream & | operator<< (std::ostream &os, PreserveAspectRatio::MeetOrSlice value) |
| Outputs MeetOrSlice value to stream (e.g., "MeetOrSlice::Meet"). | |
| std::ostream & | operator<< (std::ostream &os, StrokeLinecap value) |
| Ostream output operator for StrokeLinecap enum, outputs the CSS value. | |
| std::ostream & | operator<< (std::ostream &os, StrokeLinejoin value) |
| Ostream output operator for StrokeLinejoin enum, outputs the CSS value. | |
| std::ostream & | operator<< (std::ostream &os, TextAnchor value) |
| Ostream output operator for TextAnchor enum, outputs the CSS value. | |
| std::ostream & | operator<< (std::ostream &os, TextDecorationStyle style) |
| Print a CSS text-decoration-style keyword. | |
| std::ostream & | operator<< (std::ostream &os, const TextDecorationThickness &thickness) |
| Print a CSS decoration thickness value. | |
| bool | IsValidDecorationWidth (double value) |
| Return whether a resolved width can enter renderer geometry. | |
| double | ResolveDecorationThickness (const TextDecorationThickness &thickness, double automatic, double underline, double deviceScale) |
| Resolve a decoration width using the originating declaration and font metrics. | |
| constexpr TextDecoration | operator| (TextDecoration a, TextDecoration b) |
| Bitwise OR for combining TextDecoration values. | |
| constexpr TextDecoration | operator& (TextDecoration a, TextDecoration b) |
| Bitwise AND for testing TextDecoration flags. | |
| constexpr TextDecoration & | operator|= (TextDecoration &a, TextDecoration b) |
| Bitwise OR assignment. | |
| constexpr bool | hasFlag (TextDecoration value, TextDecoration flags) |
Returns true if any of the flags in flags are set in value. | |
| std::ostream & | operator<< (std::ostream &os, TextDecoration value) |
| Ostream output operator for TextDecoration bitmask, outputs CSS values. | |
| std::ostream & | operator<< (std::ostream &os, TextOrientation value) |
| Writes the CSS keyword for p value. | |
| std::ostream & | operator<< (std::ostream &os, TextTransform value) |
Writes the CSS keyword for value. | |
| std::ostream & | operator<< (std::ostream &os, const TransformOrigin &origin) |
| Ostream output operator. | |
| std::ostream & | operator<< (std::ostream &os, VectorEffect value) |
| Output stream operator for VectorEffect, outputs the CSS string representation for this enum, e.g. "none", "non-scaling-stroke", etc. | |
| std::ostream & | operator<< (std::ostream &os, Visibility value) |
| Ostream output operator for Visibility enum, outputs the CSS value. | |
| constexpr bool | PreservesSpaces (WhiteSpace value) |
| Whether spaces and tabs retain their authored widths. | |
| constexpr bool | PreservesSegmentBreaks (WhiteSpace value) |
| Whether source segment breaks force a new line. | |
| constexpr bool | AllowsSoftWrap (WhiteSpace value) |
| Whether unforced line breaking is permitted. | |
| std::ostream & | operator<< (std::ostream &os, WhiteSpace value) |
Writes the CSS keyword for value. | |
| bool | isVertical (WritingMode mode) |
| Returns true if the writing mode is vertical (VerticalRl or VerticalLr). | |
| std::ostream & | operator<< (std::ostream &os, WritingMode value) |
| ostream output operator for WritingMode, outputs the CSS3 value name. | |
| std::ostream & | operator<< (std::ostream &os, ElementType type) |
| Ostream output operator for ElementType, outputs the element name. | |
| template<typename ReturnType, typename FnT> | |
| ReturnType | ToConstexpr (ElementType type, FnT fn) |
| Converts a ElementType runtime value to a compile-time value, allowing conditional behavior for different element types with constexpr. | |
| std::ostream & | operator<< (std::ostream &os, const ClipPath &clip) |
| Print a parsed clip-path value for diagnostics. | |
| ParseResult< ClipPath > | ParseBasicShapeClipPath (std::span< const css::ComponentValue > components, bool allowUserUnits) |
| Parse a supported basic clipping shape and its optional reference box. | |
| template<typename T> | |
| std::ostream & | operator<< (std::ostream &os, const std::optional< T > &value) |
| Write an optional property's value, or none when no value is present. | |
| template<typename T, PropertyCascade kCascade> | |
| std::ostream & | operator<< (std::ostream &os, const Property< T, kCascade > &property) |
| Ostream output operator, which outputs the current property value, how it was set (e.g. | |
| std::tuple< Lengthd, double > | CalculateRadiusMaybeAuto (const Property< Lengthd > &property, const Property< Lengthd > &fallbackProperty, const Box2d &viewBox, const FontMetrics &fontMetrics, Lengthd::Extent propertyExtent, Lengthd::Extent fallbackExtent) |
| Calculates the the radius for elements with rx and ry radius, in pixels, taking into account the "auto" identifier and handling negative values. | |
| void | ApplyFilterGraphToPixmap (tiny_skia::Pixmap &pixmap, const components::FilterGraph &filterGraph, const Transform2d &deviceFromFilter, const std::optional< Box2d > &filterRegion, bool clipSourceToFilterRegion=false, const tiny_skia::Pixmap *fillPaintInput=nullptr, const tiny_skia::Pixmap *strokePaintInput=nullptr, components::FilterExecutionBudget *executionBudget=nullptr) |
| Applies a Donner filter graph to a premultiplied RGBA pixmap in place. | |
| void | ClipFilterOutputToRegion (tiny_skia::Pixmap &pixmap, const std::optional< Box2d > &filterRegion, const Transform2d &deviceFromFilter) |
| Clears pixels outside the transformed filter region. | |
| double | BoundedPositiveFilterPixels (double value) |
| Clamp a finite nonnegative radius to the filter-work bound. | |
| double | BoundedSignedFilterPixels (double value) |
| Clamp a finite offset to the filter-work bound. | |
| size_t | FilterInputSlotCount (const components::FilterNode &node) |
| The number of inputs a primitive reads through the filter attribute surface. feComposite, feBlend and feDisplacementMap each take a second input (in2); feMerge is variadic and reads exactly the list it was built with, and every other primitive reads at most one input. The cap of two is deliberate rather than a lower bound: those primitives never sample a third input, so an extra entry a caller appends must not widen the node's subregion either. | |
| components::FilterInput | FilterInputOrDefault (const components::FilterNode &node, size_t index) |
The input in slot index, or the default for a slot the graph left empty. A slot the graph never populated is an unspecified in/in2 attribute, and both resolve the same way: to the preceding primitive's result, which is SourceGraphic only when this node is the first primitive in the filter. Falling back to the node's own first input instead would silently composite, blend, or displace a buffer against itself. | |
| double | FilterDeviceScaleX (const Transform2d &transform) |
| Device scale of the filter X axis. | |
| double | FilterDeviceScaleY (const Transform2d &transform, double scaleX) |
| Device scale of the filter Y axis. | |
| double | FilterLengthInPixels (double value, double bound, double scale, bool objectBounds) |
| Resolve an effect length in device pixels. | |
| Vector2d | FilterOffsetInPixels (Vector2d offset, Vector2d bounds, bool objectBounds, const Transform2d &transform) |
| Resolve a filter offset vector in device coordinates. | |
| const components::FilterNode * | FilterFirstInputNode (const components::FilterGraph &graph, size_t index) |
| The node a primitive's first input names, or nullptr when it reads a standard input. | |
| Vector2d | FinishFilterReach (Vector2d reach) |
| Finish a device reach: one more pixel covers rounding at the reach's edge. | |
| FilterInputMargin | ComputeFilterSamplingReach (const components::FilterGraph &graph, const Transform2d &deviceFromFilter) |
| Conservatively measure how far beyond each output pixel a filter graph reads its raster. Every primitive counts, including those fed only by generators: feFlood, feImage and feTurbulence produce output only over the raster, so a later blur or tile still needs the raster to extend past the viewport. Reaches add up, since chained primitives compound. | |
| FilterInputMargin | ComputeFilterInputMargin (const components::FilterGraph &graph, const Transform2d &deviceFromFilter) |
| The input margin a filter layer's capture gets: the graph's sampling reach, or none when the capture must stay viewport-aligned (see components::FilterGraph::keepsViewportAlignedCapture and feTurbulence). | |
| int | FilterInputExtension (double beyond, double needed) |
| Pixels to extend a filter input raster past one viewport edge. | |
| FilterInputAxis | LayoutFilterInputAxis (std::pair< double, double > region, double reach, std::optional< std::pair< double, double > > capture, int viewport) |
| Lay out one raster axis. | |
| FilterInputBuffer | ComputeFilterInputBuffer (const components::FilterGraph &graph, const std::optional< Box2d > &filterRegion, const Transform2d &deviceFromFilter, int viewportWidth, int viewportHeight) |
Lay out the input raster for a filter layer over a viewportWidth by viewportHeight surface. Primitives that read input away from the output position need the filtered content just past the viewport, so the raster extends by the graph's input margin wherever the filter region extends past the viewport, up to the whole region for a graph with unbounded reach. Each axis stays within the surface dimension limit; a layout over the pixel limit falls back to the viewport. Renderers also fall back to the viewport when the larger raster would not fit the frame's filter budgets. | |
| std::optional< Transform2d > | FiniteFilterInverse (const Transform2d &deviceFromFilter) |
| Invert only finite, nonsingular transforms whose inverse remains finite. | |
| std::ostream & | operator<< (std::ostream &out, GifEncoder::Error error) |
| Ostream operator for GifEncoder::Error. | |
| std::ostream & | operator<< (std::ostream &os, ImageSamplingKernel kernel) |
| ostream output operator for ImageSamplingKernel. | |
| constexpr ImageSamplingKernel | ImageSamplingKernelFor (ImageRendering imageRendering) |
| Selects the raster resampling kernel for a resolved image-rendering value. | |
| ImageSamplingKernel | ImageSamplingKernelFor (ImageRendering imageRendering, const Transform2d &deviceFromImage) |
Selects the resampling kernel for drawing a raster through deviceFromImage. | |
| std::vector< std::uint8_t > | RasterizeImagePremultiplied (std::span< const std::uint8_t > premultipliedPixels, int sourceWidth, int sourceHeight, const Transform2d &deviceFromImage, int outputWidth, int outputHeight, ImageSamplingKernel kernel) |
| Rasterizes a premultiplied image through an affine transform into a bounded device surface. | |
| std::optional< PatternTileRasterMetrics > | ComputePatternTileRasterMetrics (const Box2d &tileRect, const Transform2d &deviceFromPattern) |
| Computes bounded raster dimensions for a logical pattern tile. | |
| Transform2d | TargetFromPatternRaster (const Transform2d &targetFromPattern, const Vector2d &rasterFromPatternScale) |
| Converts a logical pattern-to-target transform into a raster-tile-to-target transform. | |
| bool | HasExactRgbaPayload (std::span< const std::uint8_t > rgbaPixels, int width, int height) |
| Returns whether a byte span is exactly one tightly packed RGBA8 payload. | |
| std::vector< std::uint8_t > | PremultiplyRgba (std::span< const std::uint8_t > rgbaPixels) |
| Convert tightly-packed straight-alpha RGBA8 to premultiplied RGBA8. | |
| void | PremultiplyRgbaInto (std::span< const std::uint8_t > rgbaPixels, std::vector< std::uint8_t > &out) |
| Convert tightly-packed straight-alpha RGBA8 to premultiplied RGBA8, writing into a caller-owned buffer. | |
| std::vector< std::uint8_t > | CopyTightRgbaRows (std::span< const std::uint8_t > rgbaPixels, int width, int height, std::size_t rowBytes) |
| Copy row-strided RGBA8 bytes into a tightly-packed RGBA8 buffer. | |
| void | CopyTightRgbaRowsInto (std::span< const std::uint8_t > rgbaPixels, int width, int height, std::size_t rowBytes, std::vector< std::uint8_t > &out) |
| Copy row-strided RGBA8 bytes into a caller-owned tightly-packed buffer. | |
| std::vector< std::uint8_t > | PremultiplyRgbaRows (std::span< const std::uint8_t > rgbaPixels, int width, int height, std::size_t rowBytes) |
| Convert row-strided straight-alpha RGBA8 to tightly-packed premultiplied RGBA8. | |
| void | PremultiplyRgbaRowsInto (std::span< const std::uint8_t > rgbaPixels, int width, int height, std::size_t rowBytes, std::vector< std::uint8_t > &out) |
| Convert row-strided straight-alpha RGBA8 to tightly-packed premultiplied RGBA8, writing into a caller-owned buffer. | |
| void | UnpremultiplyRgbaInPlace (std::vector< std::uint8_t > &rgba) |
| Convert tightly-packed premultiplied RGBA8 to straight-alpha RGBA8, in place. Fully-opaque pixels (alpha == 255) are unchanged; fully-transparent pixels (alpha == 0) become (0, 0, 0, 0). | |
| std::vector< std::uint8_t > | UnpremultiplyRgba (std::span< const std::uint8_t > rgbaPixels) |
| Non-mutating variant of UnpremultiplyRgbaInPlace that allocates. Prefer the in-place form on hot paths; use this when the caller needs to preserve the input. | |
| std::vector< std::uint8_t > | UnpremultiplyRgbaRows (std::span< const std::uint8_t > rgbaPixels, int width, int height, std::size_t rowBytes) |
| Convert row-strided premultiplied RGBA8 to tightly-packed straight-alpha RGBA8. | |
| TextLayoutParams | ToTextLayoutParams (const TextParams ¶ms) |
| Convert renderer-facing text parameters to the shared layout engine's input. | |
| TextDrawGeometry | PrepareTextDrawGeometry (Registry ®istry, const components::ComputedTextComponent &text, const TextParams ¶ms, TextEngine &textEngine) |
| Resolve one backend draw from a shared element preparation or the direct-caller fallback. | |
| Path | TransformPath (const Path &path, const Transform2d &transform) |
| Apply an affine transform to every point of a path. | |
| Transform2d | GlyphPlacementTransform (const TextGlyph &glyph) |
| The affine that places a glyph's unplaced outline at its baseline position in the text element's local space. | |
| GlyphOutlineAndPlacement | UnplacedGlyphOutline (const TextEngine &textEngine, FontHandle font, const TextGlyph &glyph, float scale) |
| Build a glyph's unplaced outline and its placement transform. | |
| Path | PlacedGlyphOutline (const TextEngine &textEngine, FontHandle font, const TextRun &run, const TextGlyph &glyph, float scale, double warpTolerance) |
| Build the placed outline for a single glyph in document space. | |
| GlyphFaceScale | ResolveGlyphFace (const TextEngine &textEngine, const TextRun &run, const TextGlyph &glyph, float runScale, bool runBitmapOnly) |
Resolves the face that draws glyph. | |
| Path | WarpGlyphOutline (const Path &outline, const StretchedTextPath &mapping, const TextGlyph &glyph, double tolerance=Path::kLocalFlattenTolerance) |
| Warp a glyph-local outline onto the perpendicular vectors of a stretched text path. | |
| double | TextWarpToleranceFor (const Transform2d &deviceFromLocal) |
| Derive a path-local warp tolerance from a local-to-device transform. | |
| Box2d | ComputeTextBounds (const TextEngine &textEngine, const std::vector< TextRun > &runs) |
| Compute the text element's bounding box for objectBoundingBox paint. | |
| void | ClearUnpaintedSpanGlyphs (const components::ComputedTextComponent &text, entt::entity spanEffectOwner, std::vector< TextRun > &runs) |
| Drop the glyphs of runs this draw is not responsible for painting. | |
| template<typename DrawFn> | |
| void | ForEachEmittingOrigin (std::span< const components::TextDecorationOrigin > origins, TextDecoration emittedLines, const DrawFn &draw) |
| Call draw for each origin that has a line in emittedLines, so a paint pass skips origins it would draw nothing for before resolving their paint. | |
| template<typename FillFn, typename StrokeFn> | |
| void | PaintFillAndStroke (const PaintOrder &paintOrder, const FillFn &fill, const StrokeFn &stroke) |
| Run fill and stroke in the order paintOrder gives them; SVG 2 section 11.11 orders a decoration's own fill and stroke by the paint-order where it is declared. | |
| void | EmitTextDecorationPaths (const TextRun &run, const components::TextDecorationOrigin &origin, TextDecoration emittedLines, std::size_t originCount, float fontSize, const TextEngine &engine, const Transform2d &deviceFromLocal, std::size_t &remainingWork, const std::function< void(const Path &)> &emit) |
| Emit bounded decoration paths while preserving each originating declaration. | |
| RendererBitmap | RenderDocumentsToAtlasBitmap (RendererInterface &renderer, std::span< const AtlasDocumentPlacement > placements, Vector2i atlasSizePx) |
| Rasterize several documents into one render target and read it back once. | |
| ImageParams | BitmapBlitImageParams (ImageParams params) |
Returns params with the sampling policy for a bitmap blit, such as a compositor layer or tile raster. | |
| std::size_t | RetainedEntryBytes (const RetainedSpansComponent &entry) |
| Returns everything an entry holds: recorded coverage, the paints kept beside it, and the entry itself. | |
| void | EnsureRetainedSpanInvalidationWired (Registry ®istry) |
| Connects the resolved-path invalidation listener to registry, once per registry. | |
| RetainedSpanDocumentState & | RetainedSpanStateFor (Registry ®istry, std::size_t budgetBytes) |
| Returns the document's retained-coverage state, creating it if needed. | |
| void | ClearRetainedSpans (Registry ®istry) |
| Drops every retained entry in registry and resets its accounting. | |
| void | EvictRetainedSpansToBudget (Registry ®istry, std::uint64_t currentFrame) |
| Evicts the coldest entries until the document is under budget. | |
| std::span< const CatalogFontAsset > | CatalogFontAssets () |
| The small, compiled catalog manifest; does not reference native embedded byte arrays. | |
| std::ostream & | operator<< (std::ostream &os, const FontFaceRequest &request) |
| Ostream output operator, so test failures print the requested face instead of an opaque struct. | |
| std::ostream & | operator<< (std::ostream &os, const FontFaceAvailability &availability) |
| Diagnostic output for dependency-bearing test failures and application logs. | |
| std::ostream & | operator<< (std::ostream &os, const FontFaceDependency &dependency) |
| Print a dependency for diagnostic output. | |
| std::optional< FontMetadata > | ParseFontMetadata (std::span< const uint8_t > data) |
| Parse CSS-relevant metadata from a raw OpenType/TrueType font file. | |
| std::string_view | ToString (ResourceLoaderError error) |
| Convert a resource-loader error to a stable human-readable string. | |
| std::string_view | ToString (UrlLoaderError err) |
| Converts a UrlLoaderError to a human-readable string. | |
| std::ostream & | operator<< (std::ostream &os, UrlLoaderError err) |
| Ostream operator for UrlLoaderError. | |
| bool | IsAnimationTarget (const SVGElement &element) |
Conservatively determine whether an animation may target element. | |
| std::ostream & | operator<< (std::ostream &os, FontResourcePreflight::Status status) |
| Write the font-preflight status type and numeric value for diagnostics. | |
| std::vector< SVGMatchedStyleRule > | CollectMatchedStyleRules (const SVGElement &element) |
Collect stylesheet rules that match element. | |
| std::vector< SVGStylesheetRule > | CollectStylesheetRules (const SVGDocument &document, bool includeUserAgent=false) |
Collect source-backed author stylesheet rules in document, optionally with the built-in user agent stylesheet rules. | |
| bool | AuthorStyleDependsOnTreePosition (const SVGDocument &document) |
Return true when an author stylesheet rule in document matches on tree position. | |
| std::optional< SVGStyleRuleAtSourceOffset > | FindStyleRuleAtSourceOffset (const SVGDocument &document, std::size_t documentSourceOffset) |
Find the author stylesheet rule at documentSourceOffset. | |
| constexpr bool | IsBidiControlCodepoint (char32_t cp) |
| Unicode Bidi_Control characters affect ordering but consume no SVG character position. | |
| uint16_t | ReadUnitsPerEm (std::span< const uint8_t > data) |
| Check if raw font data has a valid 'head' table and read unitsPerEm. Returns 0 if missing. | |
| bool | HasOutlineTables (std::span< const uint8_t > data) |
| Returns true if the raw font has a scalable outline table. | |
| std::optional< TextStyleContext > | BuildShadowTextStyleContext (Registry ®istry, Entity root, const components::ComputedTextComponent &text, std::size_t *remainingWork=nullptr) |
| Build the bounded authored-to-occurrence style mapping for one shadow text root. | |
| std::optional< Vector2d > | MapTextPathPoint (const StretchedTextPath &mapping, const TextGlyph &glyph, const Vector2d &point) |
| Map one glyph-local point through a stretched text-path placement. | |
| Path | WarpTextPathOutline (const Path &outline, const StretchedTextPath &mapping, const TextGlyph &glyph, double tolerance=kDefaultTextPathWarpTolerance) |
| Warp glyph outline endpoints and control points along text-path perpendiculars. | |
| Path | PlaceStretchedTextPathOutline (Path outline, const TextRun &run, const TextGlyph &glyph, double tolerance=kDefaultTextPathWarpTolerance) |
| Apply glyph-local authored rotation and the shared nonlinear text-path mapping. | |
| Path | PlaceStretchedTextPathCell (const TextRun &run, const TextGlyph &glyph, double emTop, double emBottom, double tolerance=kDefaultTextPathWarpTolerance) |
| Build and place the full-font glyph cell for a stretched horizontal run. | |
| FontHandle | GlyphFont (const TextRun &run, const TextGlyph &glyph) |
Returns the face that draws glyph: its fallback face when it has one, otherwise the run's. | |
| int | RunDonnerSvgTool (int argc, char *argv[], std::ostream &out, std::ostream &err) |
| Run the donner-cli command line tool. | |
| std::string | BuildCssSelectorPath (const SVGElement &element) |
| Build a CSS-like selector path for an element. | |
| std::optional< std::filesystem::path > | ResourceSandboxRootForAbsoluteInput (const std::filesystem::path &absoluteInputPath) |
| Return the narrowest sandbox root for an absolute input document path. | |
| void | CompositeAABBRect (RendererBitmap &bitmap, const Box2d &bounds, const SampledImageInfo &imageInfo) |
| Draw a 1-sub-pixel blue AABB outline directly into the bitmap, aligned to the terminal sub-pixel grid. | |
| std::optional< std::span< const uint8_t > > | FindSfntTable (std::span< const uint8_t > data, std::string_view tag) |
Read a 32-bit big-endian unsigned integer from p. | |
| uint32_t | ReadBe32 (const uint8_t *p) |
Read a 32-bit big-endian unsigned integer from p. | |
| bool | ValidateSfnt (std::span< const uint8_t > data) |
Return true when data passes the bounded sfnt and outline validation policy. | |
| std::string | EscapeTerminalText (std::string_view text, bool preserveNewlines=false) |
| Escape untrusted bytes and terminal format controls while preserving printable UTF-8. | |
Variables | |
| constexpr std::string_view | kUserAgentStylesheet |
| The user agent stylesheet to be used by default on all SVG documents. | |
| constexpr size_t | kElementTypeCount = static_cast<size_t>(ElementType::Use) + 1 |
| Number of distinct ElementType values, for sizing arrays indexed by element type. | |
| constexpr std::int64_t | kMaxImageSamplingDimension = 16384 |
| Maximum output axis of a materialized procedural image-sampling surface. | |
| constexpr std::size_t | kMaxImageSamplingSurfacePixels = 16 * 1024 * 1024 |
| Maximum pixels in one materialized image-sampling surface. | |
| constexpr int | kMaxPatternTileRasterDimension = 4096 |
| Maximum accepted raster dimension for one pattern-tile axis. | |
| constexpr TextDecoration | kDecorationLinesBeneathText |
| Lines that CSS Text Decoration 3 paints beneath a run's glyphs; line-through paints above them. | |
| constexpr auto | kSVGElementNames = detail::extractTagNames(AllSVGElements{}) |
| Compile-time array of all known SVG element tag names (e.g. "rect", "circle", "path"). Derived from AllSVGElements and each element class's static Tag constant. | |
| constexpr std::array< std::string_view, 71 > | kSVGPresentationAttributeNames |
| Compile-time array of SVG presentation attributes and geometry attributes. Each entry is an attribute name string (e.g. "fill", "stroke", "transform"). | |
| constexpr size_t | kMaximumTextPathWarpExpansion = 256u |
| constexpr double | kDefaultTextPathWarpTolerance = 0.1 |
Donner SVG library, which can load, manipulate and render SVG files.
Loading SVG files can be done using donner::svg::parser::SVGParser
The resulting SVGDocument can be used to traverse the SVG file:
The SVG file can be rendered using donner::svg::Renderer
For hit-testing and spatial queries, use donner::svg::DonnerController.
| struct donner::svg::GradientStop |
Values for a gradient stop, https://www.w3.org/TR/SVG2/pservers.html#StopElement.
This is used on <stop> elements.
| Class Members | ||
|---|---|---|
| Color | color {css::RGBA(0, 0, 0, 0xFF)} | Color of the gradient stop. |
| float | offset = 0.0 | Offset of the gradient stop, in the range [0, 1]. |
| float | opacity = 1.0f | Opacity of the gradient stop, in the range [0, 1]. |
| struct donner::svg::TransformOrigin |
| struct donner::svg::DetachedNodeDiagnostics |
Summary of detached-node collection state.
| struct donner::svg::DocumentAccessDiagnostics |
Summary of document access and lock state.
| struct donner::svg::DocumentMutationRecord |
| struct donner::svg::DocumentMutationLogSnapshot |
Snapshot of mutation-log records after a caller-owned sequence number.
| Class Members | ||
|---|---|---|
| uint64_t | latestSequence = 0 | Latest sequence in the document. |
| bool | missedRecords = false | True if older records were truncated. |
| vector< DocumentMutationRecord > | records | Mutation records newer than the caller cursor. |
| struct donner::svg::FilterInputMargin |
Input a filter layer's capture must include beyond each output pixel, in device pixels.
| Class Members | ||
|---|---|---|
| Vector2d | captureReach | Input read beyond userCapture by the primitives feeding it. |
| Vector2d | pixels | Farthest input read from an output pixel, per axis. |
| optional< Box2d > | userCapture | User-space rectangle the capture must cover in full. |
| bool | wholeRegion = false | Some primitive can read any position in its input. |
| struct donner::svg::FilterInputAxis |
One axis of a FilterInputBuffer.
| Class Members | ||
|---|---|---|
| int | before = 0 | Pixels before the viewport. |
| int | extent = 0 | Total pixels. |
| struct donner::svg::FilterRegionSample |
| struct donner::svg::PatternTileRasterMetrics |
Validated dimensions and scale for a rasterized pattern tile.
| Class Members | ||
|---|---|---|
| int | pixelHeight | |
| int | pixelWidth | |
| Vector2d | rasterFromPatternScale | |
| struct donner::svg::PreparedTextDraw |
| struct donner::svg::TextDrawGeometry |
| struct donner::svg::GlyphOutlineAndPlacement |
A glyph's outline split into the part that depends only on the glyph and the part that depends only on where the glyph sits in the run.
The two compose back into the placed outline: TransformPath(outline, glyphFromLocal) maps to the same place PlacedGlyphOutline does. It is not the same arithmetic - that one composes the placement into a single affine - so the two agree as mappings, not bit for bit, whenever a rotation is present.
Splitting them lets a renderer key a cache on glyph identity (font, glyph index, effective scale, stretch, rotation) and reuse one outline for every occurrence, carrying the per-occurrence placement as a transform instead of re-deriving and re-transforming the outline for each one.
| Class Members | ||
|---|---|---|
| Transform2d | glyphFromLocal | Pure translation placing outline at its baseline position in the text element's local space. |
| Path | outline | Raw glyph outline at the glyph's effective scale, with the lengthAdjust stretch and the per-glyph rotation already baked in. Empty for .notdef and for glyphs with no vector outline. |
| struct donner::svg::GlyphFaceScale |
The face that draws one glyph, with its outline scale and whether it has only bitmap glyphs.
| Class Members | ||
|---|---|---|
| bool | bitmapOnly = false | True when font has no vector outlines. |
| FontHandle | font | Face that draws the glyph. |
| float | scale = 0.0f | scaleForPixelHeight of font at the run's used size. |
| struct donner::svg::AtlasDocumentPlacement |
Placement of one document inside a shared atlas render target.
| Class Members | ||
|---|---|---|
| SVGDocument * | document = nullptr |
Document to rasterize. Must outlive the atlas call; null entries are skipped. Outliving the call is a hard requirement, not a lifetime convenience. A GPU backend keeps each document's resident geometry and bind groups in state owned by that document and consumes them when the frame is submitted, so a document released before this call returns frees buffers the recorded draws still reference and its tile comes back blank. Callers bounding peak memory must therefore shrink the batch, not shorten a document's lifetime inside one. |
| Vector2i | originPx = Vector2i::Zero() | Top-left corner of this document's tile, in atlas device pixels. |
| struct donner::svg::FrameTimings |
Per-frame performance instrumentation for RendererGeode.
Returned by RendererGeode::lastFrameTimings(). Each field reports the cost of the most recent beginFrame to endFrame window. Counters are the durable CI signal. GPU timestamps are not captured yet, so the GPU-timestamp fields are always zero.
GeodePerf_tests.cc pins the steady-state ceilings these drive toward.
| struct donner::svg::RendererGeodeTexturePoolStats |
Retained-memory instrumentation for RendererGeode's transient texture pool.
Counts include only free textures available for cross-frame reuse, not textures currently in use by an active frame or the renderer's primary target.
| struct donner::svg::RenderViewport |
Describes the viewport for a render pass.
| Class Members | ||
|---|---|---|
| double | devicePixelRatio = 1.0 | Device pixel ratio used to map logical coordinates to device pixels. |
| Vector2d | size = Vector2d::Zero() | Logical size in CSS/SVG units after layout. |
| struct donner::svg::RendererReadbackStats |
Aggregate diagnostics for CPU readbacks run by a renderer and any offscreen instances that share its backend device, plus the device-health outcome those readbacks observed.
| Class Members | ||
|---|---|---|
| uint64_t | bindgroupCreates = 0 | |
| uint64_t | bufferCreates = 0 | |
| uint64_t | captureCancellations = 0 | Capture cancellation and total-budget expiry, independent of device loss. |
| uint64_t | captureTimeouts = 0 | |
| uint64_t | contextCreates = 0 | Readback-only contexts and the allocation/submission work they performed. |
| int | count = 0 | Readback buffer-map waits run since the last consume, including waits that were cancelled or timed out. |
| bool | deviceLost = false | True once the backend device has been declared lost. Sticky: a device that hangs never recovers, and a caller whose frame produced nothing has no other evidence to report. |
| int | pollIterations = 0 | Bounded wait iterations those readbacks ran. A wait cancelled or past its deadline before its first iteration adds none. |
| uint64_t | poolBytes = 0 | |
| uint64_t | poolEntries = 0 | Idle pooled readback sets and their logical backing bytes. |
| uint64_t | sharedTextureTailBytes = 0 | Bytes of this renderer's released textures still resident because another context still reads them. Allocation accounting no longer counts them, so a working set adds these. |
| uint64_t | submits = 0 | |
| uint64_t | textureCreates = 0 | |
| int | timedOutWaitMs = 0 | Wall time that wait spent before giving up, in milliseconds. Zero while timedOutWaitSite is GpuWaitTimeoutSite::None. |
| GpuWaitTimeoutSite | timedOutWaitSite = GpuWaitTimeoutSite::None | Which bounded wait declared that loss, when a deadline did. |
| bool | usedTimedWaitAny = false | True when any of those waits blocked on the map's completion event rather than only polling for it. |
| struct donner::svg::RendererResourceStats |
Bounded-resource diagnostics for the most recently started render frame.
| struct donner::svg::ClipPathShape |
One resolved clip-path shape, owned by the ResolvedClip that holds it.
Unlike PathShape this owns its geometry: a ResolvedClip is copied into render snapshots that outlive the document registry, so it cannot borrow from the source ComputedClipPathsComponent.
| Class Members | ||
|---|---|---|
| FillRule | fillRule = FillRule::NonZero | |
| size_t | groupPathCount = 0 | Nonzero for a group marker whose geometry is the preceding counted record span. |
| int | layer = 0 | Nested paths precede their referencing shape at a greater layer index. Their union intersects only that shape; resulting sibling shapes at the same layer are unioned. |
| Transform2d | parentFromEntity | Transform from clip path child to the clip path's coordinate system. |
| Path | path | |
| struct donner::svg::PaintParams |
Paint state derived from resolved style for the current node.
| Class Members | ||
|---|---|---|
| Color | currentColor = css::Color(css::RGBA()) | CurrentColor value for paint server resolution. |
| bool | drawFillComponent = true | When paint-order reorders fill and stroke around markers, the driver issues a shape draw per paint component, restricting which of fill/stroke a single drawPath/drawRect/drawEllipse call emits. Defaults to drawing both in the usual fill-then-stroke order. |
| bool | drawStrokeComponent = true |
|
| ResolvedPaintServer | fill = PaintServer::None{} | |
| double | fillOpacity = 1.0 | |
| double | opacity = 1.0 | Multiplicative opacity applied to all drawing. |
| ResolvedPaintServer | stroke = PaintServer::None{} | |
| double | strokeOpacity = 1.0 | |
| StrokeParams | strokeParams | |
| Box2d | viewBox | View box used for unit resolution and gradient coordinate conversion. |
| struct donner::svg::ImageParams |
Parameters describing how an image should be drawn.
| Class Members | ||
|---|---|---|
| ImageRendering | imageRendering = ImageRendering::Auto | Resolved CSS image sampling policy. |
| bool | imageRenderingPixelated = false | Legacy source-compatibility switch. New callers set imageRendering. |
| EntityHandle | sourceEntity | Source entity the drawn image was loaded onto. Set by the driver at the drawImage call site. Backends that cache a converted form of the pixels key off this, the same way PathShape::sourceEntity keys converted geometry. A null EntityHandle (the default) means "no associated entity" - non-driver callers leave it null and backends fall back to converting per draw. |
| Box2d | targetRect | Destination rectangle in device-independent units. |
| struct donner::svg::TextParams |
Parameters describing how text is drawn and outlined.
| Class Members | ||
|---|---|---|
| Color | fillColor = css::Color(css::RGBA()) | |
| span< const FontFace > | fontFaces | @font-face declarations for custom font resolution. |
| SmallVector< RcString, 1 > | fontFamilies | |
| FontMetrics | fontMetrics | |
| Lengthd | fontSize | |
| double | inlineSizePx = 0.0 | SVG2 inline-size measure in pixels. > 0 wraps horizontal or vertical text to this measure; 0 = no wrapping area. |
| LengthAdjust | lengthAdjust = LengthAdjust::Default | |
| double | letterSpacingPx = 0.0 | Extra spacing added after each character (CSS letter-spacing). 0 = normal. |
| shared_ptr< const PreparedTextDraw > | preparedTextDraw | Optional driver-prepared runs for this draw. Shared ownership keeps them alive through the synchronous backend call; the runs align with the text spans passed to drawText. |
| entity | spanEffectOwner = entt::null | Paints only the spans whose effectOwner matches this entity. entt::null selects the spans that no span-level clip-path, mask, or filter claims, which is what the text root's own draw paints. |
| Color | strokeColor = css::Color(css::RGBA()) | |
| StrokeParams | strokeParams | |
| TextAnchor | textAnchor = TextAnchor::Start | |
| TextDecoration | textDecoration = TextDecoration::None | |
| double | textIndentPx = 0.0 | Computed CSS first-line start margin for a positive inline-size area; paths ignore it. |
| optional< Lengthd > | textLength | If set, stretches or compresses text to fill the given length. |
| entity | textRootEntity = entt::null | Entity of the text root element, for cached layout lookup. entt::null if unknown. |
| Box2d | viewBox | |
| double | wordSpacingPx = 0.0 | Extra spacing added after each word/space character (CSS word-spacing). 0 = normal. |
| WritingMode | writingMode = WritingMode::HorizontalTb | CSS writing-mode for this text element. Controls horizontal vs vertical text flow. |
| struct donner::svg::RendererTinySkiaFrameCounters |
Per-frame counts of the conversions RendererTinySkia caches.
Reset at every RendererTinySkia::beginFrame, so a read after a frame reports that frame's work alone. Both count only the conversion sites the caches cover, not every conversion the backend performs. Both are zero on a settled frame of an unchanged document, because every cached shape and image is served from its per-entity cache; that invariant is what keeps the caches from silently regressing into per-draw conversions, so it is pinned by a test.
| Class Members | ||
|---|---|---|
| uint64_t | imagePremultiplies = 0 |
Straight-alpha -> premultiplied image conversions performed for <image> draws, the only site the image cache covers. Layer and bitmap composites premultiply their own payloads outside the cache and are not counted.
|
| uint64_t | pathConversions = 0 | donner::Path -> tiny_skia::Path conversions performed at the shape-draw call sites the path cache covers: cache misses plus shape draws that carry no source entity to cache on. Conversions the cache does not reach are not counted, so this is not a total for the frame; clip-path shapes and text glyph and decoration outlines convert outside it. |
| uint64_t | textGlyphMaterializations = 0 | Vector-outline or bitmap materializations attempted for text glyphs in this frame. |
| struct donner::svg::RetainedSpanStats |
Counters describing what a renderer's retained coverage did, for tests and benchmarks.
Counts are per fill or stroke pass of a shape draw, and cover the frame most recently drawn. Draw kinds retention does not reach at all (text, images, layer composites) are not counted here at all, not even as bypassed.
| struct donner::svg::StrokeParams |
Stroke configuration used for path and primitive drawing.
| Class Members | ||
|---|---|---|
| vector< double > | dashArray | Dash pattern lengths alternating on/off segments. |
| double | dashOffset = 0.0 | Dash phase offset. |
| StrokeLinecap | lineCap = StrokeLinecap::Butt | |
| StrokeLinejoin | lineJoin = StrokeLinejoin::Miter | |
| double | miterLimit = 4.0 | Maximum miter ratio before converting to bevel. |
| double | pathLength = 0.0 | SVG pathLength attribute value; 0 means unused. When non-zero, dash arrays and offsets are scaled by the ratio of the actual path length to this value. |
| double | strokeWidth = 0.0 | Stroke width in user units. |
| struct donner::svg::TerminalCapabilities |
| struct donner::svg::TerminalSize |
| struct donner::svg::TerminalCellSize |
| struct donner::svg::TerminalImageViewerConfig |
Rendering configuration for terminal output.
| Class Members | ||
|---|---|---|
| bool | autoScale = false | Automatically calculate scale based on terminal size. When true, the scale parameter is ignored and calculated dynamically. |
| bool | enableITermInlineImages = false | Use iTerm2 inline image protocol (supported by iTerm2, VSCode, WezTerm, and others). |
| string | imageName | Optional name for the image. When using iTerm inline images, this will be included in the protocol metadata. For text mode, this can be used as a caption. |
| int | maxTerminalHeight = 80 | Maximum terminal height to target when auto-scaling (rows). |
| int | maxTerminalWidth = 200 | Maximum terminal width to target when auto-scaling (columns). |
| TerminalPixelMode | pixelMode = TerminalPixelMode::kQuarterPixel | Pixel granularity. |
| double | scale = 0.67 | Overall scale factor for image size. Only used when autoScale=false. |
| bool | useTrueColor = true | Emit 24-bit ANSI sequences when true, fallback to 256-color when false. |
| double | verticalScaleFactor = 0.5 | Vertical scaling factor to compensate for terminal character aspect ratio (typically ~2:1 height/width). Default 0.5 accounts for typical terminal fonts. |
| struct donner::svg::TerminalImageView |
| struct donner::svg::QuarterBlock |
| struct donner::svg::HalfBlock |
| struct donner::svg::TerminalCell |
Aggregated subpixel data for a terminal cell.
| Class Members | ||
|---|---|---|
| HalfBlock | half | |
| TerminalPixelMode | mode | |
| QuarterBlock | quarter | |
| struct donner::svg::CatalogFontAsset |
Build-pinned catalog metadata. Runtime responses never add entries or choose package paths.
| Class Members | ||
|---|---|---|
| FontCategory | category = FontCategory::Unknown | |
| string | contentId | SHA-256 of the encoded WOFF2 bytes, in lowercase hexadecimal. |
| size_t | decodedBytes = 0 | |
| size_t | encodedBytes = 0 | |
| string | family | |
| string | packagePath | |
| struct donner::svg::FontFaceAdmission |
Nonblocking admission result. Synchronous custom providers need no reservation by default.
| Class Members | ||
|---|---|---|
| unique_ptr< FontFaceLoadReservation > | reservation | |
| FontFaceLoadState | state = FontFaceLoadState::Resolving | |
| FontFaceWaitReason | waitReason = FontFaceWaitReason::None | |
| struct donner::svg::FontDataRenderingOptions |
Owned rendering attributes for a provider face reloaded from encoded bytes.
These values configure the new face before a backend can cache it. They do not name or query a provider, and do not associate the face with a CSS family.
| Class Members | ||
|---|---|---|
| bool | genericSans = false | The source face belongs to the generic sans-serif provider. |
| bool | immutableCatalog = false | The source face belongs to an immutable font catalog. |
| optional< FontFaceRequest > | providerRequest | Requested weight, style and stretch. |
| struct donner::svg::FontLoadingDomainIdentity |
Non-owning identity of an installed font-loading domain.
Compare owner control blocks, including after expiration. The allowance conservatively accounts for the fixed coallocation kept alive by a weak reference, not live font data or physical RSS.
| Class Members | ||
|---|---|---|
| weak_ptr< const void > | owner | Does not retain the source or its resources. |
| size_t | retainedStorageBytes = 0 | Conservative fixed weak-identity storage allowance. |
| struct donner::svg::FontMetadata |
Metadata extracted from a raw OpenType/TrueType font file.
| struct donner::svg::SvgImageContent |
Contains raw SVG document bytes, returned by ImageLoader when the referenced resource is an SVG image (image/svg+xml).
This must be parsed into an SVGDocument separately.
| Class Members | ||
|---|---|---|
| vector< uint8_t > | data | Raw SVG document bytes (XML text). |
| struct donner::svg::ImageResource |
| struct donner::svg::SVGAnimationEventBatch |
Bounded lifecycle query result. An incomplete query returns no partial events.
| Class Members | ||
|---|---|---|
| bool | complete = true | False for invalid bounds or budget exhaustion. |
| vector< SVGAnimationEvent > | events | Boundaries sorted by document time. |
| struct donner::svg::SVGStylesheetDeclaration |
Parsed declaration within a stylesheet rule, with an optional document source range.
| Class Members | ||
|---|---|---|
| Declaration | declaration | Parsed CSS declaration. |
| size_t | declarationIndex = 0 | Index within the rule. |
| optional< SourceRange > | declarationSourceRange | Declaration range in SVG source. |
| struct donner::svg::SVGStylesheetRule |
Stylesheet rule in a document; built-in rules have no document source ranges.
| Class Members | ||
|---|---|---|
| vector< SVGStylesheetDeclaration > | declarations | Rule declarations. |
| bool | isUserAgentStylesheet = false | True for a built-in rule without document source ranges. |
| size_t | ruleIndex = 0 | Index within the stylesheet. |
| optional< SourceRange > | ruleSourceRange | Rule range in SVG source. |
| optional< SourceRange > | selectorSourceRange | Selector range in SVG source. |
| Entity | stylesheetEntity = entt::null | Owning <style> or <svg> element key. |
| struct donner::svg::TextGlyphOutline |
A single placed glyph outline paired with the element that painted it.
source is the text-content element (<text>, <tspan>, <a>, or <textPath>) whose computed style (fill, stroke, opacity, paint-server reference, currentColor, ...) colors this glyph. Callers that must preserve per-span paint - such as "Convert Text to Outlines" - resolve paint from source.getComputedStyle() rather than from the text root's attributes alone.
| Class Members | ||
|---|---|---|
| Path | path | Glyph outline in text-element local coordinates. |
| SVGElement | source | Text-content element whose computed style paints this glyph. |
| struct donner::svg::FontVMetrics |
Font vertical metrics in font design units (unscaled).
| struct donner::svg::UnderlineMetrics |
| struct donner::svg::SubSuperMetrics |
| struct donner::svg::TextLayoutParams |
Layout-only parameters consumed by TextEngine.
Baseline alignment (dominant-baseline / alignment-baseline) is resolved per span into donner::svg::components::ComputedTextComponent::TextSpan::alignmentBaseline rather than carried here, since each span may resolve a different baseline.
| Class Members | ||
|---|---|---|
| SmallVector< RcString, 1 > | fontFamilies | |
| FontKerning | fontKerning = FontKerning::Auto | |
| FontMetrics | fontMetrics | |
| Lengthd | fontSize | |
| optional< double > | fontSizeAdjust | |
| double | inlineSizePx = 0.0 | SVG2 inline-size measure in pixels. When greater than 0 (and the writing mode is horizontal or vertical), the engine wraps glyph runs to this measure, producing stacked lines. 0 means no wrapping area (ordinary single-line SVG text). |
| LengthAdjust | lengthAdjust = LengthAdjust::Default | |
| double | letterSpacingPx = 0.0 | |
| TextAnchor | textAnchor = TextAnchor::Start | |
| double | textIndentPx = 0.0 | Signed CSS first-line start margin in pixels. Used only with a positive inlineSizePx; percentages resolve against the own-area measure before layout; em computes in style. Does not affect text paths. |
| optional< Lengthd > | textLength | |
| Box2d | viewBox | |
| double | wordSpacingPx = 0.0 | |
| WritingMode | writingMode = WritingMode::HorizontalTb | |
| struct donner::svg::StretchedTextPath |
Shared path mapping used to warp glyph outlines for textPath method="stretch".
| Class Members | ||
|---|---|---|
| bool | closed = false | |
| bool | linear = false | |
| MeasuredPath | measuredPath | |
| shared_ptr< TextPathMeasurementReservation > | measurementReservation | |
| vector< double > | segmentEndDistances | |
| double | startOffset = 0.0 | |
| struct donner::svg::ResolvedTextFont |
Resolved face and used font size for layout or declaring-element decoration metrics.
| Class Members | ||
|---|---|---|
| FontHandle | font | |
| float | usedSizePx = 0.0f | |
| struct donner::svg::TextGlyph |
A single positioned glyph in a laid-out text run.
Produced by the text engine for simple and full shaping backends.
| Class Members | ||
|---|---|---|
| bool | absoluteInlinePosition = false | This visual chunk origin applies an authored horizontal absolute position. |
| bool | allowSyntheticOblique = true | Immutable outline policy resolved from the source span and its requested font style. |
| uint32_t | cluster = 0 | Byte offset into the span text for the glyph's source cluster. Byte offset of the SVG positioning group; absent uses the source cluster. |
| bool | emergencyBreakBefore = false | A safe emergency boundary precedes this visual glyph group after contextual shaping. |
| bool | emergencyLineStart = false | First visual group of a planned line, retaining logical order between backward lines. |
| FontHandle | font | Face for a cluster that the run's face cannot render; null when TextRun::font renders it. Use GlyphFont to resolve the face that draws the glyph. |
| float | fontSizeScale = 1.0f | Per-glyph font size multiplier (< 1.0 for small-caps). |
| int | glyphIndex = 0 | Glyph index (backend-specific: stbtt or HarfBuzz). |
| bool | hangingBefore = false | Preserved logical end space hanging before a backward line's visual content. |
| optional< uint32_t > | positioningCluster | |
| bool | rightToLeft = false | Resolved horizontal source-character direction. Global visual adjacency for source-span decoration continuity; absent on legacy layouts. |
| double | rotateDegrees = 0 | Per-glyph rotation in degrees. |
| bool | sideways = false | |
| float | stretchScaleX = 1.0f | Additional X-axis glyph stretch from lengthAdjust. |
| float | stretchScaleY = 1.0f | Additional Y-axis glyph stretch from lengthAdjust. |
| optional< double > | textPathLocalRotateDegrees | Authored rotation before path warping. True when vertical layout set this glyph sideways, a quarter turn from upright, so the glyph's own x axis runs along the inline axis. |
| double | textPathNormalOffset = 0.0 | Offset from the path along its left normal. |
| optional< double > | textPathOrigin | Logical path distance for a stretched outline origin. |
| double | verticalOriginOffset = 0 | Inline-axis distance from the pen position to an upright vertical glyph's origin, already included in yPosition. Zero for horizontal and sideways glyphs. |
| optional< uint32_t > | visualOrder | |
| double | xAdvance = 0 | Horizontal advance; staged paths use canonical local X. |
| double | xKern = 0 | Kerning adjustment applied before this glyph (for path layout). |
| double | xPosition = 0 | Absolute X position for this glyph. |
| double | yAdvance = 0 | Flat vertical advance; zero after text-path staging. |
| double | yPosition = 0 | Absolute Y baseline position. |
| struct donner::svg::TextRun |
A run of positioned glyphs laid out with one primary face.
Clusters that face cannot render carry their fallback face in TextGlyph::font.
| Class Members | ||
|---|---|---|
| FontHandle | font | Primary font handle for this run. |
| vector< TextGlyph > | glyphs | Positioned glyphs. |
| bool | onPath = false | True if glyphs are positioned along a textPath. |
| shared_ptr< const StretchedTextPath > | stretchedTextPath | Shared nonlinear path mapping. |
| bool | textLengthAppliedOnPath | True when path placement consumed this run's textLength. |
| float | usedFontSizePx = 0.0f | Font size used for shaping, including font-size-adjust. |
| struct donner::svg::SampledImageInfo |
Sampled image dimensions and scaling for coordinate mapping.
| using donner::svg::GetInitialFn = std::optional<T> (*)() |
Callback function to get the initial value of a property.
The function returns a std::optional to allow for properties that have no initial value.
|
strong |
|
strong |
Values for the "clipPathUnits" attribute, https://drafts.fxtf.org/css-masking-1/#element-attrdef-clippath-clippathunits.
This is used on the <clipPath> element, and defines the coordinate system for the contents of the clip path.
|
strong |
The parsed result of the clip-rule property, see: https://drafts.fxtf.org/css-masking-1/#propdef-clip-rule.
|
strong |
|
strong |
|
strong |
CSS cursor types, defining which cursor the user agent should display.
|
strong |
The parsed result of the CSS 'display' property, see https://www.w3.org/TR/CSS2/visuren.html#propdef-display.
Note that in SVG2, there are only two distinct behaviors, 'none', and everything else rendered as normal, see https://www.w3.org/TR/SVG2/render.html#VisibilityControl
Elements that have any other display value than none are rendered as normal.
| Enumerator | |
|---|---|
| Inline | [DEFAULT] "inline": Causes an element to generate one or more inline boxes. |
| Block | "block": Causes an element to generate a block box. |
| ListItem | "list-item": Causes an element to act as a list item. |
| InlineBlock | "inline-block": Causes an element to generate an inline-level block container. |
| Table | "table": Specifies that an element defines a block-level table, see https://www.w3.org/TR/CSS2/tables.html#table-display. |
| InlineTable | "inline-table": Specifies that an element defines a inline-level table, see https://www.w3.org/TR/CSS2/tables.html#table-display. |
| TableRowGroup | "table-row-group": Specifies that an element groups one or more rows. |
| TableHeaderGroup | "table-header-group": Like 'table-row-group', but for visual formatting, the row group is always displayed before all other rows and row groups and after any top captions. |
| TableFooterGroup | "table-footer-group": Like 'table-row-group', but for visual formatting, the row group is always displayed after all other rows and row groups and before any bottom captions. |
| TableRow | "table-row": Specifies that an element is a row of cells. |
| TableColumnGroup | "table-column-group": Specifies that an element groups one or more columns. |
| TableColumn | "table-column": Specifies that an element is a column of cells. |
| TableCell | "table-cell": Specifies that an element represents a table cell. |
| TableCaption | "table-caption": Specifies a caption for the table. |
| None | "none": The element is not rendered. |
|
strong |
The parsed result of the dominant-baseline property.
Determines which baseline of the font is used to align the text.
| Enumerator | |
|---|---|
| Auto | [DEFAULT] Use the default baseline for the script. |
| TextBottom | Align to the bottom of the text. Also text-after-edge / after-edge. |
| Alphabetic | Align to the alphabetic baseline. |
| Ideographic | Align to the ideographic baseline. |
| Middle | Align to the middle of the x-height. |
| Central | Align to the central baseline (middle of the em box). |
| Mathematical | Align to the mathematical baseline. |
| Hanging | Align to the hanging baseline. |
| TextTop | Align to the top of the text. Also text-before-edge / before-edge. |
| UseScript | Deprecated SVG 1.1 keyword; behaves like DominantBaseline::Auto. |
| NoChange | Deprecated SVG 1.1 keyword; uses the parent's dominant baseline. |
| ResetSize | Deprecated SVG 1.1 keyword; behaves like DominantBaseline::Auto. |
|
strong |
SVG element types, corresponds to each XML element name, such as <circle>, <svg>, <rect>, etc.
| Enumerator | |
|---|---|
| A | |
| Animate | <animate>, value animation element. |
| AnimateMotion | <animateMotion>, motion animation. |
| AnimateTransform | <animateTransform>, transform animation element. |
| Circle | |
| ClipPath | |
| Defs | |
| Desc | |
| Ellipse | |
| FeBlend | |
| FeColorMatrix | |
| FeComponentTransfer | |
| FeComposite | |
| FeConvolveMatrix | |
| FeDiffuseLighting | |
| FeDisplacementMap | |
| FeDistantLight | |
| FeDropShadow | |
| FeFlood | |
| FeFuncA | |
| FeFuncB | |
| FeFuncG | |
| FeFuncR | |
| FeGaussianBlur | |
| FeImage | |
| FeMerge | |
| FeMergeNode | |
| FeMorphology | |
| FeOffset | |
| FePointLight | |
| FeSpecularLighting | |
| FeSpotLight | |
| FeTile | |
| FeTurbulence | |
| Filter | |
| G | |
| Image | |
| Line | |
| LinearGradient | |
| Marker | |
| Mask | |
| MPath | <mpath>, motion path reference. |
| Metadata | |
| Path | |
| Pattern | |
| Polygon | |
| Polyline | |
| RadialGradient | |
| Rect | |
| Set | <set>, discrete animation element. |
| Stop | <stop>, for gradient stops. |
| Style | |
| SVG | <svg>, SVG root element. |
| Switch | |
| Symbol | |
| Text | |
| TextPath | |
| Title | |
| TSpan | |
| Unknown | For unknown elements. |
| Use | |
|
strong |
Types of DOM events that can be dispatched through the SVG event system.
|
strong |
Values for the "filterUnits" attribute which defines the coordinate system for attributes x, y, width, height.
This is used on <filter> element.
|
strong |
Coarse style bucket for a font family, used to give the picker variety and (later) to inform generic-family fallback.
Best-effort: Unknown is used when a provider cannot classify a family.
|
strong |
|
strong |
|
strong |
Where a font family in the FontCatalog originates.
The picker groups families by source, and resolution prefers Bundled over System (see FontCatalog and FontManager).
| Enumerator | |
|---|---|
| Bundled | Bundled with the build (curated fonts supplied by the application package). |
| System | Discovered from the host OS (CoreText on macOS; none on other platforms). |
|
strong |
The parsed result of the font-stretch property.
Values are ordered from narrowest to widest to allow relative keyword resolution.
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
Bounded CPU-blocks-on-GPU wait that exceeded its deadline and caused a renderer backend to declare its device lost.
Backend-neutral mirror of the GPU backend's own wait vocabulary, so a consumer of RendererReadbackStats can distinguish the two very different hangs without depending on a graphics API. Backends that never block on the GPU always report GpuWaitTimeoutSite::None.
| Enumerator | |
|---|---|
| None | No bounded wait has timed out. A device reported lost with this site was reported by the driver, not by a deadline. This is a positive claim, so never use it as a fallback for a site that could not be translated - see GpuWaitTimeoutSite::Unknown. |
| ReadbackMap | A buffer-map wait for GPU-to-CPU readback. |
| QueueIdle | A wait for the GPU queue to drain. |
| Present | A present's wait for its frame's own work before the frame is shown. |
| Unknown | A backend wait this build cannot name. Reported rather than folded into GpuWaitTimeoutSite::None so a report never claims the driver declared a loss that one of the backend's own deadlines actually did. |
|
strong |
Values for the gradient "spreadMethod" attribute, https://www.w3.org/TR/SVG2/pservers.html#LinearGradientElementSpreadMethodAttribute and https://www.w3.org/TR/SVG2/pservers.html#RadialGradientElementSpreadMethodAttribute.
Specifies what happens at the start or end of a gradient, when the gradient coordinates are inside the bounds of the referencing element.
This is used on <linearGradient> and <radialGradient> elements.
|
strong |
Values for the "gradientUnits" attribute, https://www.w3.org/TR/SVG2/pservers.html#LinearGradientElementGradientUnitsAttribute and https://www.w3.org/TR/SVG2/pservers.html#RadialGradientElementGradientUnitsAttribute.
This is used on <linearGradient> and <radialGradient> elements.
|
strong |
|
strong |
CSS image-rendering property values.
Controls the sampling filter used when a raster image is scaled.
|
strong |
Resampling kernel a backend applies when it scales a raster <image>.
|
strong |
|
strong |
Values for the "lengthAdjust" attribute, https://www.w3.org/TR/SVG2/text.html#TextElementLengthAdjustAttribute.
This is used on the <text> and <tspan> elements, and controls how the text is stretched, either by adding spacing between glyphs or also by stretching the glyphs themselves.
|
strong |
Values for the "markerUnits" attribute, https://www.w3.org/TR/SVG2/painting.html#MarkerUnitsAttribute.
This is used on the <marker> element, and defines the coordinate system for markerWidth, markerHeight, and the contents of the marker.
|
strong |
Values for the "maskContentUnits" attribute, https://drafts.fxtf.org/css-masking-1/#element-attrdef-mask-maskcontentunits.
This is used on the <mask> element, and defines the coordinate system for the contents of the mask.
|
strong |
|
strong |
Values for the "maskUnits" attribute, https://drafts.fxtf.org/css-masking-1/#element-attrdef-mask-maskunits.
This is used on the <mask> element, and defines the coordinate system for the x, y, width, and height attributes of the mask.
|
strong |
CSS mix-blend-mode property values for compositing blend modes.
Maps to tiny_skia::BlendMode values at the renderer level.
|
strong |
How an element's stroke is realized under its current CTM.
vector-effect: non-scaling-stroke is defined in terms of a constant width in host space, but only geometry that the renderer can map into host space achieves that exactly. This enum names which of the two realizations applies, so the draw path, the culling bounds, and the editor's selection bounds all answer the question the same way.
|
strong |
The parsed result of the CSS 'overflow' property, see https://www.w3.org/TR/CSS2/visufx.html#overflow and https://www.w3.org/TR/SVG2/render.html#OverflowAndClipProperties.
The 'overflow' property specifies whether to clip content, render scrollbars, or display content outside the element's box.
In SVG, the 'overflow' property applies to container elements and determines how to handle content that exceeds the bounds of the viewport.
|
strong |
|
strong |
PatternContentUnits controls the coordinate system of the children of the pattern:
With userSpaceOnUse, as the shape size changes, padding will be added between tiles. With objectBoundingBox, the tiles will be stretched to fill the shape.
| Enumerator | |
|---|---|
| UserSpaceOnUse | The children of the pattern are specified in the current user space where the pattern is referenced. |
| ObjectBoundingBox | The children of the pattern are specified as percentages of the object bounding box, where 0.0 is the left and 1.0 is the right, and similarly for the y axis. |
| Default | The default value, PatternContentUnits::UserSpaceOnUse. |
|
strong |
PatternUnits controls the coordinate system of the x/y/width/height attributes:
See also: PatternContentUnits
For example, both of these patterns appear the same when applied to a 50x50 shape, but the objectBoundingBox one changes based on the shape the pattern is applied to:
See also: PatternUnits
| Enumerator | |
|---|---|
| UserSpaceOnUse | The pattern's x/y/width/height attributes are specified in the current user space where the pattern is referenced. |
| ObjectBoundingBox | The pattern's x/y/width/height attributes are specified as percentages of the object bounding. |
| Default | The default value, PatternUnits::ObjectBoundingBox. |
|
strong |
Values for the 'pointer-events' property, which defines how mouse events interact with an element.
|
strong |
Values for the "primitiveUnits" attribute which specifies the coordinate system for the various length values within the filter primitives and for the attributes that define the filter primitive subregion.
This is used on <filter> element.
| Enumerator | |
|---|---|
| UserSpaceOnUse | If primitiveUnits is equal to userSpaceOnUse, any length values within the filter definitions represent values in the current local coordinate system in place at the time when the <filter> element is referenced (i.e., the user coordinate system for the element referencing the filter element via a filter property). |
| ObjectBoundingBox | If primitiveUnits is equal to objectBoundingBox, then any length values within the filter definitions represent fractions or percentages of the bounding box on the referencing element (see object bounding box units). Note that if only one number was specified in a <number-optional-number> value this number is expanded out before the primitiveUnits computation takes place. |
| Default | The default value for the "primitiveUnits" attribute, which is userSpaceOnUse. |
|
strong |
SVG document processing mode, per SVG2 ยง2.7.1.
Controls which features are available when processing a document. Select the mode of a top-level document with donner::svg::SVGDocument::Settings::processingMode when parsing. Unless the host supplies its own donner::svg::SVGDocument::Settings::svgParseCallback, sub-documents referenced by <image> are parsed in ProcessingMode::SecureStatic mode, so they neither load external resources nor animate. Donner never executes scripts in any mode.
|
strong |
Defines how this property cascades between the parent and child elements.
| Enumerator | |
|---|---|
| None | Property does not inherit. |
| Inherit | Property inherits unconditionally. |
| PaintInherit | Property inherits unless the child is instantiated as a paint server. This is handled as a special case to prevent recursion for <pattern>. |
|
strong |
Options to control how inheritance is performed, to either inherit everything or conditionally disable inheritance of paint servers.
| Enumerator | |
|---|---|
| All | Inherit everything (default). |
| NoPaint | Inherit everything except paint servers, for <pattern> elements. |
|
strong |
The current property state, which can be either set, not set, or a specific CSS keyword such as "inherit", "initial", or "unset".
|
strong |
|
strong |
The parsed result of the 'stroke-linecap' property, see: https://www.w3.org/TR/SVG2/painting.html#StrokeLinecapProperty.
|
strong |
The parsed result of the 'stroke-linejoin' property, see: https://www.w3.org/TR/SVG2/painting.html#StrokeLinejoinProperty.
|
strong |
|
strong |
Bitmask for the text-decoration property line types.
Values can be combined: Underline | Overline represents both an underline and overline. The CSS text-decoration shorthand parses space-separated values into this bitmask.
| Enumerator | |
|---|---|
| None | [DEFAULT] No text decoration. |
| Underline | Draw a line below the text. |
| Overline | Draw a line above the text. |
| LineThrough | Draw a line through the middle of the text. |
|
strong |
The text-decoration-style property: how each decoration line is drawn.
CSS Text Decoration 3 leaves exact proportions to the user agent. Donner derives every style from the solid band of thickness t: Double draws two bands of thickness t separated by a gap of t, Dotted draws round dots of diameter t every 2t, Dashed draws dashes 3t long every 5t, and Wavy draws a band of thickness t that follows a wave of amplitude t with a half-period near 2t.
| Enumerator | |
|---|---|
| Solid | [DEFAULT] A single line. |
| Double | Two parallel lines. |
| Dotted | A series of round dots. |
| Dashed | A series of dashes. |
| Wavy | A wavy line. |
|
strong |
|
strong |
Enum of possible errors that can occur when loading an image.
|
strong |
Values for the vector-effect property, which modifies how an element is affected by the coordinate system transformations in effect (such as viewBox scaling and transform).
Only non-scaling-stroke is honored during rendering. The remaining values are at-risk in the SVG 2 Candidate Recommendation; they parse successfully but fall back to none behavior.
|
strong |
The parsed result of the 'visibility' property, see: https://www.w3.org/TR/CSS2/visufx.html#propdef-visibility.
This determines whether the element is painted. In SVG both non-visible values suppress painting only: collapse has its CSS table-row meaning nowhere in SVG, so for text content it behaves as hidden, and a span with either value is still laid out, still advances the pen for the spans that follow it, and still contributes to the element's object bounding box.
| Enumerator | |
|---|---|
| Visible | [DEFAULT] Visible is the default value. |
| Hidden | Hidden elements are not painted, but are still laid out. |
| Collapse | Behaves as Visibility::Hidden for SVG content. |
|
strong |
CSS writing-mode property values, controlling the direction of text flow.
SVG1 values (lr-tb, rl-tb, tb-rl, etc.) are mapped to these CSS3 equivalents during parsing.
| Enumerator | |
|---|---|
| HorizontalTb | [DEFAULT] Left-to-right, top-to-bottom (horizontal text). |
| VerticalRl | Top-to-bottom, right-to-left (vertical CJK style). |
| VerticalLr | Top-to-bottom, left-to-right. |
| void donner::svg::ApplyFilterGraphToPixmap | ( | tiny_skia::Pixmap & | pixmap, |
| const components::FilterGraph & | filterGraph, | ||
| const Transform2d & | deviceFromFilter, | ||
| const std::optional< Box2d > & | filterRegion, | ||
| bool | clipSourceToFilterRegion = false, | ||
| const tiny_skia::Pixmap * | fillPaintInput = nullptr, | ||
| const tiny_skia::Pixmap * | strokePaintInput = nullptr, | ||
| components::FilterExecutionBudget * | executionBudget = nullptr ) |
Applies a Donner filter graph to a premultiplied RGBA pixmap in place.
| pixmap | Premultiplied RGBA pixmap containing SourceGraphic on entry. |
| filterGraph | Filter graph to execute. |
| deviceFromFilter | Transform from filter local coordinates to device coordinates. |
| filterRegion | Optional filter region in filter local coordinates. |
| clipSourceToFilterRegion | If true, clip pixmap's contents to filterRegion before running the filter graph. |
| fillPaintInput | Optional FillPaint input pixmap, or nullptr if unused. |
| strokePaintInput | Optional StrokePaint input pixmap, or nullptr if unused. |
| executionBudget | Optional shared per-frame budget. Direct callers may omit it to apply only the graph-local limit. |
| bool donner::svg::AuthorStyleDependsOnTreePosition | ( | const SVGDocument & | document | ) |
Return true when an author stylesheet rule in document matches on tree position.
Such a rule (#layer rect, svg > rect, rect:first-child) can start or stop matching when an element is moved to a different parent or a different place among its siblings, so a caller that must not change how the document paints has to treat a move as unsafe while one exists.
The user agent stylesheet is excluded. It is a fixed part of every document, and each of its position-based rules keys on the document root (svg:not(:root)) or on having a foreignObject parent (*:not(foreignObject) > svg). Moving an element between a <g> and the document root changes none of those, so excluding them does not weaken the answer for a caller asking about such a move.
| document | SVG document to inspect. |
|
inline |
Returns params with the sampling policy for a bitmap blit, such as a compositor layer or tile raster.
auto resolves to smooth there: the quality kernel applies to <image> content, and bitmap blits keep bilinear sampling.
| params | Placement parameters passed to drawBitmap. |
|
inline |
Clamp a finite nonnegative radius to the filter-work bound.
| value | Requested pixels. |
|
inline |
Clamp a finite offset to the filter-work bound.
| value | Requested pixels. |
| std::string donner::svg::BuildCssSelectorPath | ( | const SVGElement & | element | ) |
Build a CSS-like selector path for an element.
| element | Element to describe. |
| std::tuple< Lengthd, double > donner::svg::CalculateRadiusMaybeAuto | ( | const Property< Lengthd > & | property, |
| const Property< Lengthd > & | fallbackProperty, | ||
| const Box2d & | viewBox, | ||
| const FontMetrics & | fontMetrics, | ||
| Lengthd::Extent | propertyExtent, | ||
| Lengthd::Extent | fallbackExtent ) |
Calculates the the radius for elements with rx and ry radius, in pixels, taking into account the "auto" identifier and handling negative values.
This is used for <rect> or <ellipse>.
Percentages resolve against the axis of the property they belong to: rx against the viewport width (Lengthd::Extent::X) and ry against the viewport height (Lengthd::Extent::Y). The "auto" fallback uses the other property's value, which must resolve against the other axis - so the primary and fallback extents are distinct.
| property | The property to compute, the storage for either rx or ry. |
| fallbackProperty | The other property to use if the first one is "auto". |
| viewBox | The viewBox to use for computing the length. |
| fontMetrics | The font metrics to use for computing the length. |
| propertyExtent | The viewport axis percentages of property resolve against. |
| fallbackExtent | The viewport axis percentages of fallbackProperty resolve against. |
| void donner::svg::ClearUnpaintedSpanGlyphs | ( | const components::ComputedTextComponent & | text, |
| entt::entity | spanEffectOwner, | ||
| std::vector< TextRun > & | runs ) |
Drop the glyphs of runs this draw is not responsible for painting.
Two reasons take a run out of a draw:
spanEffectOwner is the one doing the drawing.Backends call this on their local copy of the layout runs after ComputeTextBounds, so the element-level bounding box that objectBoundingBox paint maps through stays the same for every draw of the element.
Runs are index-aligned with text.spans; a run past the end of the span list is left alone.
| text | The computed text component supplying per-span visibility and ownership. |
| spanEffectOwner | The span entity this draw paints, or entt::null for the text root's own draw. |
| runs | Layout runs to filter in place. |
| void donner::svg::ClipFilterOutputToRegion | ( | tiny_skia::Pixmap & | pixmap, |
| const std::optional< Box2d > & | filterRegion, | ||
| const Transform2d & | deviceFromFilter ) |
Clears pixels outside the transformed filter region.
| pixmap | Premultiplied RGBA pixmap to modify in place. |
| filterRegion | Optional filter region in filter local coordinates. |
| deviceFromFilter | Transform from filter local coordinates to device coordinates. |
| std::vector< SVGMatchedStyleRule > donner::svg::CollectMatchedStyleRules | ( | const SVGElement & | element | ) |
Collect stylesheet rules that match element.
| element | Element to inspect. |
| std::vector< SVGStylesheetRule > donner::svg::CollectStylesheetRules | ( | const SVGDocument & | document, |
| bool | includeUserAgent = false ) |
Collect source-backed author stylesheet rules in document, optionally with the built-in user agent stylesheet rules.
| document | SVG document to inspect. |
| includeUserAgent | Include built-in rules without document source ranges. Defaults to false. |
| void donner::svg::CompositeAABBRect | ( | RendererBitmap & | bitmap, |
| const Box2d & | bounds, | ||
| const SampledImageInfo & | imageInfo ) |
Draw a 1-sub-pixel blue AABB outline directly into the bitmap, aligned to the terminal sub-pixel grid.
| bitmap | Bitmap to draw into (modified in-place). |
| bounds | AABB in image coordinates. |
| imageInfo | Terminal sampling info for sub-pixel alignment. |
|
inline |
The input margin a filter layer's capture gets: the graph's sampling reach, or none when the capture must stay viewport-aligned (see components::FilterGraph::keepsViewportAlignedCapture and feTurbulence).
| graph | Filter graph. |
| deviceFromFilter | Filter user space to raster pixels. |
|
inline |
Conservatively measure how far beyond each output pixel a filter graph reads its raster. Every primitive counts, including those fed only by generators: feFlood, feImage and feTurbulence produce output only over the raster, so a later blur or tile still needs the raster to extend past the viewport. Reaches add up, since chained primitives compound.
| graph | Filter graph. |
| deviceFromFilter | Filter user space to raster pixels. |
| std::optional< PatternTileRasterMetrics > donner::svg::ComputePatternTileRasterMetrics | ( | const Box2d & | tileRect, |
| const Transform2d & | deviceFromPattern ) |
Computes bounded raster dimensions for a logical pattern tile.
| tileRect | Logical pattern tile rectangle. |
| deviceFromPattern | Transform from logical pattern coordinates to device pixels. |
| Box2d donner::svg::ComputeTextBounds | ( | const TextEngine & | textEngine, |
| const std::vector< TextRun > & | runs ) |
Compute the text element's bounding box for objectBoundingBox paint.
Encodes tiny-skia's computation: the union over rendered glyphs of em-box cells - horizontally [xPosition, xPosition + xAdvance], vertically [yPosition - ascent*scale, yPosition - descent*scale] (font v-metrics, not the raw font size), per the SVG spec for text objectBoundingBox. A tspan has no bbox of its own, so gradient/pattern paint on a span maps through this element-level box.
Returns an empty (default) Box2d when there are no rendered glyphs.
| textEngine | Engine providing per-run scale + font v-metrics. |
| runs | Positioned layout runs. |
|
nodiscard |
Copy row-strided RGBA8 bytes into a tightly-packed RGBA8 buffer.
| rgbaPixels | Source RGBA bytes. |
| width | Pixel width. |
| height | Pixel height. |
| rowBytes | Bytes between source rows. |
| void donner::svg::CopyTightRgbaRowsInto | ( | std::span< const std::uint8_t > | rgbaPixels, |
| int | width, | ||
| int | height, | ||
| std::size_t | rowBytes, | ||
| std::vector< std::uint8_t > & | out ) |
Copy row-strided RGBA8 bytes into a caller-owned tightly-packed buffer.
Buffer-reusing form of CopyTightRgbaRows. rgbaPixels must not alias out.
| rgbaPixels | Source RGBA bytes. |
| width | Pixel width. |
| height | Pixel height. |
| rowBytes | Bytes between source rows. |
| out | Destination buffer, resized to the tightly-packed size, or emptied when dimensions or row storage are invalid. |
| double donner::svg::EffectiveStrokeWidth | ( | double | authoredWidth, |
| NonScalingStrokeMode | mode, | ||
| const Transform2d & | worldFromEntity ) |
Returns the stroke width the renderer expands the centerline by, in the space that centerline is stroked in: local space for NonScalingStrokeMode::Scaling and NonScalingStrokeMode::ScaledLocal, host space for NonScalingStrokeMode::HostSpace.
| authoredWidth | The computed stroke-width. |
| mode | The element's resolved mode. |
| worldFromEntity | The element's CTM. |
| void donner::svg::EmitTextDecorationPaths | ( | const TextRun & | run, |
| const components::TextDecorationOrigin & | origin, | ||
| TextDecoration | emittedLines, | ||
| std::size_t | originCount, | ||
| float | fontSize, | ||
| const TextEngine & | engine, | ||
| const Transform2d & | deviceFromLocal, | ||
| std::size_t & | remainingWork, | ||
| const std::function< void(const Path &)> & | emit ) |
Emit bounded decoration paths while preserving each originating declaration.
| run | Laid-out glyph run. |
| origin | Declaration whose geometry is emitted. |
| emittedLines | Subset of the origin's lines to emit, so callers can paint lines beneath and above the glyphs in separate passes. Positions still account for all of the origin's lines. |
| originCount | Number of declarations affecting the span. |
| fontSize | Used run size for direct-caller fallback metrics. |
| engine | Font metrics provider. |
| deviceFromLocal | Transform used to resolve each segment's thickness direction. |
| remainingWork | Shared per-draw geometry work allowance. |
| emit | Paint callback for each generated path. |
|
inline |
Escape untrusted bytes and terminal format controls while preserving printable UTF-8.
Bytes that are not valid UTF-8, C0 controls, and DEL are written as \xHH; C1 controls as \u00HH; and invisible format and bidirectional controls (U+061C, U+180E, U+200B to U+200F, U+2028 to U+202E, U+2060 to U+206F, and U+FEFF) as \uHHHH. Hex digits are lowercase.
| text | Text to escape. |
| preserveNewlines | When true, \n is copied unchanged instead of escaped. |
| void donner::svg::EvictRetainedSpansToBudget | ( | Registry & | registry, |
| std::uint64_t | currentFrame ) |
Evicts the coldest entries until the document is under budget.
Entries last used before currentFrame go first. When dropping all of those still leaves the document over budget, its working set does not fit, so retention is disabled for the document and everything is dropped.
|
inline |
Device scale of the filter X axis.
| transform | Filter-to-device transform. |
|
inline |
Device scale of the filter Y axis.
| transform | Transform. |
| scaleX | X-axis scale. |
|
inline |
Pixels to extend a filter input raster past one viewport edge.
| beyond | How far the filter region extends past the edge. |
| needed | Input the graph reads past that edge. |
|
inline |
Resolve an effect length in device pixels.
| value | Length. |
| bound | Object extent. |
| scale | Device scale. |
| objectBounds | Whether unitless lengths use object-bounding-box units. |
|
inline |
Resolve a filter offset vector in device coordinates.
| offset | User offset. |
| bounds | Object extents. |
| objectBounds | Unit mode. |
| transform | Filter-to-device transform. |
| std::optional< SVGStyleRuleAtSourceOffset > donner::svg::FindStyleRuleAtSourceOffset | ( | const SVGDocument & | document, |
| std::size_t | documentSourceOffset ) |
Find the author stylesheet rule at documentSourceOffset.
| document | SVG document to inspect. |
| documentSourceOffset | Offset in the SVG document source. |
documentSourceOffset, or std::nullopt. Finish a device reach: one more pixel covers rounding at the reach's edge.
| reach | Accumulated device reach per axis. |
|
inline |
Invert only finite, nonsingular transforms whose inverse remains finite.
| deviceFromFilter | Transform to validate. |
|
inline |
Returns the face that draws glyph: its fallback face when it has one, otherwise the run's.
| run | Run that contains glyph. |
| glyph | Glyph to resolve. |
| Transform2d donner::svg::GlyphPlacementTransform | ( | const TextGlyph & | glyph | ) |
The affine that places a glyph's unplaced outline at its baseline position in the text element's local space.
A pure translation to (xPosition, yPosition). Per-glyph rotation is NOT here: it is baked into the outline by UnplacedGlyphOutline, so a renderer that rasterises in the outline's own space keeps that space aligned with the pixel grid. Depends only on the glyph's position, so a renderer that caches outlines by glyph identity can compute this per occurrence without touching the font backend.
| glyph | The positioned glyph. |
|
nodiscard |
Returns whether a byte span is exactly one tightly packed RGBA8 payload.
This internal renderer guard performs no allocation and rejects non-positive dimensions and any byte-count multiplication that cannot be represented by size_t.
| rgbaPixels | Candidate tightly packed RGBA8 bytes. |
| width | Declared pixel width. |
| height | Declared pixel height. |
|
constexpr |
Selects the raster resampling kernel for a resolved image-rendering value.
Both renderer backends map <image> draws and feImage raster placement through this function, so their image kernels cannot drift apart. resvg likewise renders an feImage raster as an image.
auto is UA-defined; Donner, like resvg, uses the Mitchell cubic, and gives optimizeQuality and high-quality the same quality kernel.
| imageRendering | The resolved image-rendering value. |
|
inline |
Selects the resampling kernel for drawing a raster through deviceFromImage.
tiny-skia, whose image sampling Donner's software renderer and resvg share, samples the texel containing each sample whenever the transform is a pure translation, fractional ones included, so every interpolating kernel becomes ImageSamplingKernel::Nearest there.
| imageRendering | The resolved image-rendering value. |
| deviceFromImage | Transform from source-pixel coordinates to output pixels. |
| bool donner::svg::IsAnimationTarget | ( | const SVGElement & | element | ) |
Conservatively determine whether an animation may target element.
An animation element (<animate>, <animateTransform>, <animateMotion>, <set>) animates the element named by its href, or its own parent when href is absent. A caller that must not change how a document paints uses this to tell whether an element is observed by an animation: a group holding an animation element is animated without naming itself anywhere, and moving a child out of it changes what the animation applies to.
Work is bounded. When the analysis exhausts its budget, this returns true, so callers cannot treat an incomplete query as permission to move an element out of an animated container.
| element | Element to test. |
| bool donner::svg::IsSimilarityTransform | ( | const Transform2d & | transform | ) |
Returns whether transform's linear part is a similarity: uniform scale combined with rotation and optionally reflection.
Under a similarity the CTM's scale is exactly sqrt(|det|), so a non-scaling stroke reaches its authored width from local space with a scalar width adjustment; only a non-uniform scale or shear needs the geometry in host space.
| transform | Transform to classify. |
|
inline |
Lay out one raster axis.
| region | Filter region extent on the axis, in device pixels. |
| reach | Input read past an output pixel. |
| capture | Input rectangle to cover. |
| viewport | Viewport extent on the axis. |
|
inline |
Prints a color interpolation value.
| os | Output stream. |
| value | Value to print. |
|
inline |
|
inline |
Print a dependency for diagnostic output.
| os | Stream receiving the diagnostic. |
| dependency | Dependency to print. |
| std::ostream & donner::svg::operator<< | ( | std::ostream & | os, |
| const Property< T, kCascade > & | property ) |
Ostream output operator, which outputs the current property value, how it was set (e.g.
directly set or inherited, see PropertyState), and the property's specificity.
Example output:
| os | Output stream to write to. |
| property | Property to output. |
| std::ostream & donner::svg::operator<< | ( | std::ostream & | os, |
| const std::optional< T > & | value ) |
Write an optional property's value, or none when no value is present.
| T | Value type supported by the output stream. |
| os | Destination output stream. |
| value | Optional value to print. |
|
inline |
Write the font-preflight status type and numeric value for diagnostics.
| os | Output stream. |
| status | Status value to format. |
|
inline |
Write the CSS keyword for the given synthesis policy.
| os | Output stream. |
| value | Policy to write. |
|
inline |
Write the CSS keyword for a synthesis policy.
| os | Output stream. |
| value | Policy to write. |
|
inline |
Write the CSS keyword for the policy.
| os | Destination stream. |
| value | Emergency wrapping policy. |
| ParseResult< ClipPath > donner::svg::ParseBasicShapeClipPath | ( | std::span< const css::ComponentValue > | components, |
| bool | allowUserUnits ) |
Parse a supported basic clipping shape and its optional reference box.
| components | Trimmed CSS component values. |
| allowUserUnits | Permit SVG presentation-attribute user units. |
| std::optional< FontMetadata > donner::svg::ParseFontMetadata | ( | std::span< const uint8_t > | data | ) |
Parse CSS-relevant metadata from a raw OpenType/TrueType font file.
| data | Raw font bytes. |
| Path donner::svg::PlacedGlyphOutline | ( | const TextEngine & | textEngine, |
| FontHandle | font, | ||
| const TextRun & | run, | ||
| const TextGlyph & | glyph, | ||
| float | scale, | ||
| double | warpTolerance ) |
Build the placed outline for a single glyph in document space.
Encodes tiny-skia's exact placement sequence: stretch the raw outline, then position it with Rotate(rotateDegrees) * Translate(xPosition, yPosition) composed into ONE affine and applied once. The single composition is load-bearing rather than incidental: the CPU backend's golden images are pinned to that arithmetic, so UnplacedGlyphOutline's two-step form is not a drop-in substitute for it.
Returns an empty path for .notdef (glyphIndex 0) or when the font has no vector outline for the glyph (e.g. bitmap-only fonts) - callers handle those cases (skip / bitmap path) exactly as before.
| textEngine | Engine providing glyph outlines. |
| font | Font handle for the run. |
| glyph | The positioned glyph (carries position, rotation, stretch). |
| scale | Per-run pixel-height scale (scaleForPixelHeight(font, sizePx)). |
|
nodiscard |
Convert tightly-packed straight-alpha RGBA8 to premultiplied RGBA8.
| rgbaPixels | Straight-alpha RGBA bytes (size must be a multiple of 4). |
| void donner::svg::PremultiplyRgbaInto | ( | std::span< const std::uint8_t > | rgbaPixels, |
| std::vector< std::uint8_t > & | out ) |
Convert tightly-packed straight-alpha RGBA8 to premultiplied RGBA8, writing into a caller-owned buffer.
Same conversion as PremultiplyRgba, but out's existing storage is reused when it is large enough, so a caller that converts once per frame keeps one buffer instead of allocating and freeing a new one every time.
rgbaPixels must not alias out; see the aliasing note at the top of this file.
| rgbaPixels | Straight-alpha RGBA bytes (size must be a multiple of 4). |
| out | Destination buffer, resized to match rgbaPixels. |
|
nodiscard |
Convert row-strided straight-alpha RGBA8 to tightly-packed premultiplied RGBA8.
| rgbaPixels | Straight-alpha source RGBA bytes. |
| width | Pixel width. |
| height | Pixel height. |
| rowBytes | Bytes between source rows. |
| void donner::svg::PremultiplyRgbaRowsInto | ( | std::span< const std::uint8_t > | rgbaPixels, |
| int | width, | ||
| int | height, | ||
| std::size_t | rowBytes, | ||
| std::vector< std::uint8_t > & | out ) |
Convert row-strided straight-alpha RGBA8 to tightly-packed premultiplied RGBA8, writing into a caller-owned buffer.
Buffer-reusing form of PremultiplyRgbaRows. rgbaPixels must not alias out.
| rgbaPixels | Straight-alpha source RGBA bytes. |
| width | Pixel width. |
| height | Pixel height. |
| rowBytes | Bytes between source rows. |
| out | Destination buffer, resized to the tightly-packed size, or emptied when dimensions or row storage are invalid. |
| std::vector< std::uint8_t > donner::svg::RasterizeImagePremultiplied | ( | std::span< const std::uint8_t > | premultipliedPixels, |
| int | sourceWidth, | ||
| int | sourceHeight, | ||
| const Transform2d & | deviceFromImage, | ||
| int | outputWidth, | ||
| int | outputHeight, | ||
| ImageSamplingKernel | kernel ) |
Rasterizes a premultiplied image through an affine transform into a bounded device surface.
| premultipliedPixels | Exact tightly packed premultiplied RGBA8 source payload. |
| sourceWidth | Source width in pixels. |
| sourceHeight | Source height in pixels. |
| deviceFromImage | Transform from source-pixel coordinates to output pixels. |
| outputWidth | Output width in pixels. |
| outputHeight | Output height in pixels. |
| kernel | Resampling kernel. |
|
nodiscard |
Rasterize several documents into one render target and read it back once.
Each document is drawn at its own atlas origin inside a single beginFrame/endFrame window, so the whole set costs exactly one GPU-to-CPU readback instead of one per document. Where a readback is a round trip through an asynchronous buffer mapping - WebGPU in a browser - that difference dominates: N serialized readback latencies collapse into one.
Every tile renders as it would standalone: each document is prepared and traversed through the same driver path, translated by its origin. Slicing the returned atlas therefore yields per-document bitmaps identical to rendering each document on its own.
Peak memory scales with the batch, because every document has to stay alive until the frame is submitted. That cost is not small - fourteen editor icons in one batch measured a 101.5 MB Wasm boot heap high-water against under 32 MB in small batches - so a caller with many documents should split them across several calls and trade a few readbacks for the headroom.
| renderer | Backend instance used for the atlas pass. |
| placements | Documents and their atlas origins. Tiles must not overlap. |
| atlasSizePx | Atlas dimensions in device pixels, large enough to contain every placed tile. |
|
inline |
Resolve a decoration width using the originating declaration and font metrics.
| thickness | Origin's computed thickness (explicit dimensions are in local pixels). |
| automatic | Automatic width for this line type. |
| underline | Preferred underline width for from-font. |
| deviceScale | Device pixels per local thickness unit. |
| GlyphFaceScale donner::svg::ResolveGlyphFace | ( | const TextEngine & | textEngine, |
| const TextRun & | run, | ||
| const TextGlyph & | glyph, | ||
| float | runScale, | ||
| bool | runBitmapOnly ) |
Resolves the face that draws glyph.
A glyph without a fallback face reuses the run's already computed values; a fallback glyph queries its own face.
| textEngine | Engine providing font metrics. |
| run | Run that contains glyph. |
| glyph | Glyph to resolve. |
| runScale | scaleForPixelHeight of the run's face at its used size. |
| runBitmapOnly | Whether the run's face has only bitmap glyphs. |
| NonScalingStrokeMode donner::svg::ResolveNonScalingStrokeMode | ( | VectorEffect | vectorEffect, |
| const Transform2d & | worldFromEntity, | ||
| bool | geometryMustStayLocal ) |
Resolves how an element's stroke is realized.
A CTM with a non-finite component never resolves to NonScalingStrokeMode::HostSpace. Mapping the centerline through it would produce non-finite geometry, and the caches keyed on that transform could never hit again, because a NaN component compares unequal to itself.
| vectorEffect | The element's computed vector-effect. |
| worldFromEntity | The element's CTM. |
| geometryMustStayLocal | True when the stroke pass cannot hand host-space geometry to the backend, which is the case for a pattern-painted stroke (the tile placement is built in path-local space) and for text (the stroke expands glyph outlines, not a path). |
| std::optional< std::filesystem::path > donner::svg::ResourceSandboxRootForAbsoluteInput | ( | const std::filesystem::path & | absoluteInputPath | ) |
Return the narrowest sandbox root for an absolute input document path.
A document grants access only to its containing directory, never to an ambient process working directory.
|
nodiscard |
Returns everything an entry holds: recorded coverage, the paints kept beside it, and the entry itself.
The paints are counted because a gradient paint owns its stop list and an entry keeps two of them, so a document of many small gradient-painted shapes would otherwise grow the cache in a way the budget could not see. Recorded coverage still dominates in practice.
| int donner::svg::RunDonnerSvgTool | ( | int | argc, |
| char * | argv[], | ||
| std::ostream & | out, | ||
| std::ostream & | err ) |
Run the donner-cli command line tool.
| argc | Number of command line arguments. |
| argv | Command line arguments. |
| out | Output stream for normal user-facing output. |
| err | Output stream for errors. |
| double donner::svg::StrokeCullHalfExtent | ( | double | strokeWidth, |
| StrokeLinecap | linecap, | ||
| StrokeLinejoin | linejoin, | ||
| double | miterLimit ) |
Returns the furthest distance a stroke of strokeWidth can reach from its centerline.
Half the stroke width, except at the two places a stroke reaches past that:
Callers inflating a centerline box for a culling or selection decision need that worst case, not the half width. An infinite stroke-miterlimit yields an infinite result rather than a smaller finite one: such a bound may only over-count, so the caller must decline to cull instead of substituting a tighter number.
| strokeWidth | Stroke width in the space the centerline is stroked in. |
| linecap | The element's computed stroke-linecap. |
| linejoin | The element's computed stroke-linejoin. |
| miterLimit | The element's computed stroke-miterlimit. |
| Transform2d donner::svg::TargetFromPatternRaster | ( | const Transform2d & | targetFromPattern, |
| const Vector2d & | rasterFromPatternScale ) |
Converts a logical pattern-to-target transform into a raster-tile-to-target transform.
| targetFromPattern | Transform from logical pattern coordinates to target coordinates. |
| rasterFromPatternScale | Raster pixels per logical pattern unit. |
| ReturnType donner::svg::ToConstexpr | ( | ElementType | type, |
| FnT | fn ) |
Converts a ElementType runtime value to a compile-time value, allowing conditional behavior for different element types with constexpr.
Takes the runtime value and invokes a function with std::integral_constant<ElementType> as a parameter.
Example 1:
Example 2:
| ReturnType | Return type of the function. |
| FnT | Function type, with signature ReturnType(std::integral_constant<ElementType>). |
| type | Runtime element type. |
| fn | Function to call with the compile-time element type, with signature ReturnType(std::integral_constant<ElementType>). |
| Path donner::svg::TransformPath | ( | const Path & | path, |
| const Transform2d & | transform ) |
Apply an affine transform to every point of a path.
Backend-agnostic replacement for the byte-identical TransformPath free functions that previously lived in each renderer TU.
| path | The source path. |
| transform | The transform to apply to each point. |
| GlyphOutlineAndPlacement donner::svg::UnplacedGlyphOutline | ( | const TextEngine & | textEngine, |
| FontHandle | font, | ||
| const TextGlyph & | glyph, | ||
| float | scale ) |
Build a glyph's unplaced outline and its placement transform.
Encodes tiny-skia's placement inputs, split at the point where the glyph-identity-dependent work ends:
Steps 1 to 3 depend only on (font, glyph index, scale * fontSizeScale, stretch, rotation, synthesis permission); step 4 depends only on the glyph's position.
| textEngine | Engine providing glyph outlines. |
| font | Font handle for the run. |
| glyph | The positioned glyph (carries position, rotation, stretch). |
| scale | Per-run pixel-height scale (scaleForPixelHeight(font, sizePx)). |
|
nodiscard |
Non-mutating variant of UnpremultiplyRgbaInPlace that allocates. Prefer the in-place form on hot paths; use this when the caller needs to preserve the input.
| rgbaPixels | Premultiplied RGBA bytes (size must be a multiple of 4). |
| void donner::svg::UnpremultiplyRgbaInPlace | ( | std::vector< std::uint8_t > & | rgba | ) |
Convert tightly-packed premultiplied RGBA8 to straight-alpha RGBA8, in place. Fully-opaque pixels (alpha == 255) are unchanged; fully-transparent pixels (alpha == 0) become (0, 0, 0, 0).
| rgba | Premultiplied RGBA bytes (size must be a multiple of 4). |
|
nodiscard |
Convert row-strided premultiplied RGBA8 to tightly-packed straight-alpha RGBA8.
| rgbaPixels | Premultiplied source RGBA bytes. |
| width | Pixel width. |
| height | Pixel height. |
| rowBytes | Bytes between source rows. |
|
inlineconstexpr |
Lines that CSS Text Decoration 3 paints beneath a run's glyphs; line-through paints above them.
|
inlineconstexpr |
Number of distinct ElementType values, for sizing arrays indexed by element type.
Derived from ElementType::Use being the last enumerator. Adding an enumerator after it requires updating this expression; callers that size a table with it should static_assert that the element types they index with fit, so the mismatch is caught at compile time rather than silently truncating the table.
|
constexpr |
The user agent stylesheet to be used by default on all SVG documents.