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

Device-aware cubic-to-quadratic approximation for filled paths. More...

#include <algorithm>
#include <cmath>
#include "donner/svg/renderer/geode/GeodeStrokeTolerance.h"
Include dependency graph for GeodeFillTolerance.h:

Namespaces

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

Functions

double donner::geode::FillCubicToleranceFor (const Transform2d &deviceFromLocal)
 Path-local cubic approximation tolerance for the draw-time transform.

Variables

constexpr double donner::geode::kFillCubicDevicePixels = 0.1
 Maximum cubic approximation error in device pixels and at identity scale.
constexpr double donner::geode::kMinFillCubicTolerance = 1e-6
 Bounds approximation work; the device-pixel bound holds through 100,000x scale.

Detailed Description

Device-aware cubic-to-quadratic approximation for filled paths.

Function Documentation

◆ FillCubicToleranceFor()

double donner::geode::FillCubicToleranceFor ( const Transform2d & deviceFromLocal)
inline

Path-local cubic approximation tolerance for the draw-time transform.

Power-of-two scale buckets allow reuse during zoom. Minified paths retain the historical 0.1 tolerance; magnified paths are refined conservatively.

Parameters
deviceFromLocalTransform applied to the encoded path at draw time.