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

Render pipeline and draw pass for the transparency checkerboard (fullscreen triangle). More...

#include <array>
#include <cstdint>
#include <optional>
#include "donner/base/Vector2.h"
#include "donner/gpu/Device.h"
#include "donner/gpu/shader/programs/Checkerboard.h"
Include dependency graph for GeodeCheckerboardPipeline.h:

Classes

struct  donner::geode::CheckerboardScissorPx
 Device-pixel sub-rectangle of the target a checkerboard pass is confined to. More...
struct  donner::geode::CheckerboardUnderlayParams
 Placement and appearance of a transparency-checkerboard pass over a render target. More...
class  donner::geode::GeodeCheckerboardPipeline
 Caches the compiled render pipeline that draws the transparency checkerboard behind see-through document regions, plus its bind group layout. More...
class  donner::geode::GeodeCheckerboardPass
 Draws the transparency checkerboard over a Geode-owned render target. More...

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.

Variables

constexpr double donner::geode::kTransparencyCheckerboardCellLogicalPx = 16.0
 Appearance of the transparency checkerboard drawn behind see-through document pixels.
constexpr std::array< float, 4 > donner::geode::kTransparencyCheckerboardDarkColor
 RGBA in the 0-1 range for odd cells.
constexpr std::array< float, 4 > donner::geode::kTransparencyCheckerboardLightColor
 RGBA in the 0-1 range for even cells.

Detailed Description

Render pipeline and draw pass for the transparency checkerboard (fullscreen triangle).

Variable Documentation

◆ kTransparencyCheckerboardCellLogicalPx

double donner::geode::kTransparencyCheckerboardCellLogicalPx = 16.0
inlineconstexpr

Appearance of the transparency checkerboard drawn behind see-through document pixels.

Shared by every presentation path so the same document lands on identical cells. The size is in logical pixels, so the pattern is anchored to device pixels and never scales with document zoom.

◆ kTransparencyCheckerboardDarkColor

std::array<float, 4> donner::geode::kTransparencyCheckerboardDarkColor
inlineconstexpr
Initial value:
= {
40.0f / 255.0f, 40.0f / 255.0f, 40.0f / 255.0f, 1.0f}

RGBA in the 0-1 range for odd cells.

◆ kTransparencyCheckerboardLightColor

std::array<float, 4> donner::geode::kTransparencyCheckerboardLightColor
inlineconstexpr
Initial value:
= {
60.0f / 255.0f, 60.0f / 255.0f, 60.0f / 255.0f, 1.0f}

RGBA in the 0-1 range for even cells.