Donner
C++20 SVG rendering library
Loading...
Searching...
No Matches
donner::svg::components::OffscreenShadowTreeComponent Class Reference

Defines an offscreen shadow tree attached to the current entity (the shadow host). More...

#include "donner/svg/components/shadow/OffscreenShadowTreeComponent.h"

Public Member Functions

 OffscreenShadowTreeComponent ()=default
 Default constructor.
 
std::optional< RcStringbranchHref (ShadowBranchType branchType) const
 Get the href attribute for the shadow tree target, e.g.
 
void setBranchHref (ShadowBranchType branchType, const RcString &href)
 Set the href attribute for the shadow tree target, which must be an element reference (e.g.
 
std::optional< ResolvedReferencebranchTargetEntity (Registry &registry, ShadowBranchType branchType) const
 Get the resolved entity for the target of the shadow tree, if the href was able to be resolved.
 
const std::map< ShadowBranchType, Reference > & branches () const
 Get the underlying map containing each branch and reference.
 

Detailed Description

Defines an offscreen shadow tree attached to the current entity (the shadow host).

An offscreen shadow tree is a tree of entities, outside of the main render tree, which are rendered in the process of compositing the current entity. This is used for paint servers, which can be instantiated for fill or stroke attributes.

Supported shadow tree types are defined by ShadowBranchType.

Member Function Documentation

◆ branchHref()

std::optional< RcString > donner::svg::components::OffscreenShadowTreeComponent::branchHref ( ShadowBranchType branchType) const
inline

Get the href attribute for the shadow tree target, e.g.

"#otherEntity".

Parameters
branchTypeThe branch type to get the href for.
Returns
The href attribute, or std::nullopt if not set.

◆ branchTargetEntity()

std::optional< ResolvedReference > donner::svg::components::OffscreenShadowTreeComponent::branchTargetEntity ( Registry & registry,
ShadowBranchType branchType ) const
inline

Get the resolved entity for the target of the shadow tree, if the href was able to be resolved.

Parameters
registryThe registry.
branchTypeThe branch type to get the resolved entity for.
Returns
The resolved entity, or std::nullopt if not set.

◆ setBranchHref()

void donner::svg::components::OffscreenShadowTreeComponent::setBranchHref ( ShadowBranchType branchType,
const RcString & href )
inline

Set the href attribute for the shadow tree target, which must be an element reference (e.g.

"#otherEntity").

Parameters
branchTypeThe branch type to set the href for.
hrefThe href attribute value.

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