Donner 0.8.0-pre
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
PathOps.h File Reference
#include <cstddef>
#include <cstdint>
#include <span>
#include <string>
#include <vector>
#include "donner/base/FillRule.h"
#include "donner/base/Path.h"
#include "donner/base/Transform.h"
Include dependency graph for PathOps.h:

Classes

struct  donner::PathBooleanInput
 One filled path participating in a boolean operation. More...
struct  donner::PathBooleanOptions
 Limits and tolerances for bounded boolean operations. More...
struct  donner::PathBooleanResult
 Result of ApplyPathBoolean. More...

Namespaces

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

Enumerations

enum class  donner::PathBooleanOp : std::uint8_t {
  donner::Union ,
  donner::Intersect ,
  donner::Difference ,
  donner::Xor
}
 Boolean operation to apply to filled path inputs. More...
enum class  donner::PathBooleanStatus : std::uint8_t {
  donner::Ok ,
  donner::EmptyResult ,
  donner::InvalidInput ,
  donner::TooComplex
}
 Status for a path boolean result. More...

Functions

PathBooleanResult donner::ApplyPathBoolean (PathBooleanOp op, std::span< const PathBooleanInput > inputs, const PathBooleanOptions &options={})
 Apply a filled path boolean operation.

Class Documentation

◆ donner::PathBooleanInput

struct donner::PathBooleanInput

One filled path participating in a boolean operation.

Collaboration diagram for donner::PathBooleanInput:
[legend]
Class Members
FillRule fillRule = FillRule::NonZero Fill rule for path.
Transform2d outputFromPath = Transform2d() Transform into output coordinates.
Path path Source path geometry.

◆ donner::PathBooleanOptions

struct donner::PathBooleanOptions

Limits and tolerances for bounded boolean operations.

Class Members
double geometricTolerance = 1e-6 Geometric comparison tolerance.
size_t maxCurveCount = 100000 Maximum input segment count.
size_t maxIntersections = 100000 Maximum segment intersections.
size_t maxOutputCommands = 200000 Maximum emitted output commands.

◆ donner::PathBooleanResult

struct donner::PathBooleanResult

Result of ApplyPathBoolean.

Collaboration diagram for donner::PathBooleanResult:
[legend]
Class Members
vector< string > diagnostics Compact diagnostic messages.
vector< Path > paths Output paths on success.
PathBooleanStatus status = PathBooleanStatus::Ok Operation status.