Donner SVG 0.8.0-pre
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::geode::CheckerboardUnderlayParams Struct Reference

Placement and appearance of a transparency-checkerboard pass over a render target. More...

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

Public Attributes

double devicePixelRatio = 1.0
 Device pixels per logical pixel. Cells are kTransparencyCheckerboardCellLogicalPx logical pixels across regardless of document zoom.
Vector2d originOffsetPx
 Device-pixel offset from the pattern's anchor origin to the target's top-left corner.
double cellSizeLogicalPx = kTransparencyCheckerboardCellLogicalPx
 Cell size in logical pixels.
std::array< float, 4 > darkColor = kTransparencyCheckerboardDarkColor
 RGBA in the 0-1 range for odd cells.
std::array< float, 4 > lightColor = kTransparencyCheckerboardLightColor
 RGBA in the 0-1 range for even cells.
std::optional< CheckerboardScissorPxscissorPx
 Region of the target to draw into; unset covers the whole target.

Detailed Description

Placement and appearance of a transparency-checkerboard pass over a render target.

See also
GeodeCheckerboardPass::draw

Member Data Documentation

◆ cellSizeLogicalPx

double donner::geode::CheckerboardUnderlayParams::cellSizeLogicalPx = kTransparencyCheckerboardCellLogicalPx

Cell size in logical pixels.

◆ darkColor

std::array<float, 4> donner::geode::CheckerboardUnderlayParams::darkColor = kTransparencyCheckerboardDarkColor

RGBA in the 0-1 range for odd cells.

◆ devicePixelRatio

double donner::geode::CheckerboardUnderlayParams::devicePixelRatio = 1.0

Device pixels per logical pixel. Cells are kTransparencyCheckerboardCellLogicalPx logical pixels across regardless of document zoom.

◆ lightColor

std::array<float, 4> donner::geode::CheckerboardUnderlayParams::lightColor = kTransparencyCheckerboardLightColor

RGBA in the 0-1 range for even cells.

◆ originOffsetPx

Vector2d donner::geode::CheckerboardUnderlayParams::originOffsetPx

Device-pixel offset from the pattern's anchor origin to the target's top-left corner.

Zero anchors the pattern at the target's own origin, which is what a window framebuffer wants: the pattern is fixed to the window and the document slides over it. A target that is itself positioned somewhere on screen passes its top-left screen position in device pixels, which reproduces the window-anchored pattern that would have been drawn in the same place. Without it the checkerboard would slide with the document instead of staying put behind it.

◆ scissorPx

std::optional<CheckerboardScissorPx> donner::geode::CheckerboardUnderlayParams::scissorPx

Region of the target to draw into; unset covers the whole target.


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