Donner SVG main
0.8.0 ยท 766e862a0.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
DrawnContent.h File Reference

Finds the rendering instances that exist only as content drawn for another instance. More...

#include <algorithm>
#include <iterator>
#include <utility>
#include <vector>
#include "donner/base/EcsRegistry.h"
#include "donner/svg/components/RenderingInstanceComponent.h"
Include dependency graph for DrawnContent.h:

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.
namespace  donner::svg
 Donner SVG library, which can load, manipulate and render SVG files.

Functions

std::vector< std::pair< int, int > > donner::svg::compositor::DrawnContentDrawOrders (Registry &registry)
 Closed draw-order ranges of the mask, marker and pattern content drawn for rendering instances, sorted and merged.
bool donner::svg::compositor::InDrawOrderRanges (const std::vector< std::pair< int, int > > &ranges, int drawOrder)
 Whether a draw order lies in one of the ranges returned by DrawnContentDrawOrders.

Detailed Description

Finds the rendering instances that exist only as content drawn for another instance.

Function Documentation

◆ DrawnContentDrawOrders()

std::vector< std::pair< int, int > > donner::svg::compositor::DrawnContentDrawOrders ( Registry & registry)
inlinenodiscard

Closed draw-order ranges of the mask, marker and pattern content drawn for rendering instances, sorted and merged.

That content is instantiated as rendering instances of its own, but it reaches the frame only through the element that draws it. It is never a candidate for a layer of its own: such a layer would be composed onto the frame as document content.

Parameters
registryRegistry holding the rendering instances.

◆ InDrawOrderRanges()

bool donner::svg::compositor::InDrawOrderRanges ( const std::vector< std::pair< int, int > > & ranges,
int drawOrder )
inlinenodiscard

Whether a draw order lies in one of the ranges returned by DrawnContentDrawOrders.

Parameters
rangesSorted, merged closed ranges.
drawOrderDraw order to look up.