NovaSVG 0.11.5
An SVG library
Loading...
Searching...
No Matches
nova::svg::foreign_object_renderer Class Referenceabstract

Called concurrently from const methods on one document: keep no mutable state without a lock. More...

#include <foreign_object.h>

Public Member Functions

virtual ~foreign_object_renderer ()=default
virtual std::shared_ptr< void > prepare (std::string_view markup, const css_query &css) const
virtual void render (const foreign_object_context &context, foreign_object_painter &painter) const =0
virtual std::optional< foreign_object_size > measure (const foreign_object_context &context, const foreign_object_painter &painter, float max_width) const

Detailed Description

Called concurrently from const methods on one document: keep no mutable state without a lock.

Definition at line 104 of file foreign_object.h.

Constructor & Destructor Documentation

◆ ~foreign_object_renderer()

virtual nova::svg::foreign_object_renderer::~foreign_object_renderer ( )
virtualdefault

Member Function Documentation

◆ measure()

virtual std::optional< foreign_object_size > nova::svg::foreign_object_renderer::measure ( const foreign_object_context & context,
const foreign_object_painter & painter,
float max_width ) const
inlinevirtual

The size the content wants when wrapped at max_width (<= 0: the markup's own width, else no wrapping). Optional.

Definition at line 122 of file foreign_object.h.

◆ prepare()

virtual std::shared_ptr< void > nova::svg::foreign_object_renderer::prepare ( std::string_view markup,
const css_query & css ) const
inlinevirtual

Once per foreignObject, after the style sheets are applied (and again when the sheets or the renderer change): work out what depends on the CSS. The result is handed back in foreign_object_context::prepared.

Definition at line 111 of file foreign_object.h.

◆ render()

virtual void nova::svg::foreign_object_renderer::render ( const foreign_object_context & context,
foreign_object_painter & painter ) const
pure virtual

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