Donner SVG main
0.8.0 ยท 766e862a0.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::svg::components::ComputedStyle Struct Reference

An element's computed style: the result of the style="" attribute, presentation attributes, the CSS stylesheets and inheritance from the parent. More...

#include "donner/svg/components/style/ComputedStyleComponent.h"

Public Member Functions

 ComputedStyle ()=default
 An empty style, for an element without local declarations.
 ComputedStyle (const PropertyRegistry &local)
 A style that starts from an element's local declarations.
 ComputedStyle (const ComputedStyle &other)
 Copy style values without copying the source record's lifetime charge.
ComputedStyle & operator= (const ComputedStyle &)=delete
 ComputedStyle (ComputedStyle &&)=delete
ComputedStyle & operator= (ComputedStyle &&)=delete

Public Attributes

PropertyRegistry properties
 The computed style properties.
std::uint32_t cachePlacement = 0
 Document-local origin for a canonical record, or its dense index while speculative. Worker caches ignore this field when choosing a bucket.
std::optional< ComputedResourceOpacities > resourceOpacities
 Absent for manually constructed styles; the cascade always populates it.
std::shared_ptr< const CustomPropertyMap > customProperties
 Null when no computed custom values are present. Shared maps own their own charges.

Friends

class StyleResourceBudget

Detailed Description

An element's computed style: the result of the style="" attribute, presentation attributes, the CSS stylesheets and inheritance from the parent.

A record is built once and never changes after it is stored, so a ComputedStyleComponent and any snapshot that holds it can share it.

Constructor & Destructor Documentation

◆ ComputedStyle()

donner::svg::components::ComputedStyle::ComputedStyle ( const PropertyRegistry & local)
inlineexplicit

A style that starts from an element's local declarations.

Parameters
localPresentation attributes and style="" declarations of the element.

The documentation for this struct was generated from the following file: