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

Maps a target pixel position p to source texel coordinates as texel = linear * (p - anchor) + fraction + whole, where linear is the single-precision linear part of the inverse transform, fraction lies in [0, 1) and whole is an integer texel offset. More...

#include "donner/svg/renderer/geode/GeodeAnchoredSampling.h"

Public Attributes

std::array< float, 4 > linear {}
 x and y terms of the texel x coordinate, then of the texel y coordinate.
std::array< float, 2 > fraction {}
 Fractional texel coordinate of the anchor, each component in [0, 1).
Vector2i whole = Vector2i::Zero()
 Whole texel coordinate of the anchor.
Vector2i anchor = Vector2i::Zero()
 Target pixel the mapping is relative to.

Detailed Description

Maps a target pixel position p to source texel coordinates as texel = linear * (p - anchor) + fraction + whole, where linear is the single-precision linear part of the inverse transform, fraction lies in [0, 1) and whole is an integer texel offset.

The shader evaluates only linear * (p - anchor) + fraction in single precision; the whole part is added as an integer.

Member Data Documentation

◆ anchor

Vector2i donner::geode::AnchoredTexelRows::anchor = Vector2i::Zero()

Target pixel the mapping is relative to.

◆ fraction

std::array<float, 2> donner::geode::AnchoredTexelRows::fraction {}

Fractional texel coordinate of the anchor, each component in [0, 1).

◆ linear

std::array<float, 4> donner::geode::AnchoredTexelRows::linear {}

x and y terms of the texel x coordinate, then of the texel y coordinate.

◆ whole

Vector2i donner::geode::AnchoredTexelRows::whole = Vector2i::Zero()

Whole texel coordinate of the anchor.


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