Donner 0.5.1
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
TransformComponent.h File Reference
Include dependency graph for TransformComponent.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  donner::svg::components::TransformComponent
 Stores the raw transform value set on an entity, for the transform presentation attribute. More...
struct  donner::svg::components::ComputedLocalTransformComponent
 Stores the computed local transform for an entity (after CSS cascade + percentage/viewport resolution). More...
struct  donner::svg::components::ComputedAbsoluteTransformComponent
 Stores the computed absolute transform for an entity — the full cascade of ancestor transforms composed together. More...

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.
namespace  donner::svg::components
 Contains the implementation of the Donner ECS,.

Class Documentation

◆ donner::svg::components::TransformComponent

struct donner::svg::components::TransformComponent

Stores the raw transform value set on an entity, for the transform presentation attribute.

This can be sourced from the transform="..." XML attribute, or from the transform CSS property.

Collaboration diagram for donner::svg::components::TransformComponent:
[legend]
Class Members
Property< CssTransform > transform Parsed value of the transform="…" presentation attribute / CSS transform property. Applied to entity-local coords, returns parent-space coords (i.e. parentFromEntity).

◆ donner::svg::components::ComputedLocalTransformComponent

struct donner::svg::components::ComputedLocalTransformComponent

Stores the computed local transform for an entity (after CSS cascade + percentage/viewport resolution).

Collaboration diagram for donner::svg::components::ComputedLocalTransformComponent:
[legend]
Class Members
Transform2d parentFromEntity Local transform that maps entity coords to the parent's coord system. Applying parentFromEntity to a point expressed in the entity's own coord system yields its position in the parent coord system. For <rect x=0 y=0 … transform="translate(100, 0)"/>, this matrix is Translate(100, 0), and the rect ends up at x=100 in the parent.
CssTransform rawCssTransform Raw CSS transform value, before resolving percentages relative to the viewport.
Vector2d transformOrigin Resolved transform origin in pixels.

◆ donner::svg::components::ComputedAbsoluteTransformComponent

struct donner::svg::components::ComputedAbsoluteTransformComponent

Stores the computed absolute transform for an entity — the full cascade of ancestor transforms composed together.

Collaboration diagram for donner::svg::components::ComputedAbsoluteTransformComponent:
[legend]
Class Members
Transform2d worldFromEntity Transform that maps entity-local coords through every ancestor's local transform to world (canvas) coords. This is the cascade of every parentFromEntity up the tree, composed together.
bool worldIsCanvas = true Set to false if this entity rebases the coordinate system and is not relative to the canvas (e.g. sub-document boundaries).