Skip to main content

Module clip

Module clip 

Source
Expand description

Clip region: an axis-aligned rectangle intersected with zero or more arbitrary path clip regions.

Mirrors SplashClip from splash/SplashClip.h/.cc.

§Sharing semantics

When a Clip is cloned (e.g. for GraphicsState::save), the path-clip scanners are shared via Arc — matching the C++ shared_ptr behaviour. XPathScanner instances are immutable after construction, so sharing across threads and across clone_shared copies is safe: there is no interior mutability in the shared objects.

Structs§

Clip
A clipping region combining an axis-aligned rectangle with an optional stack of arbitrary path clips.

Enums§

ClipResult
Result of a rectangular or span clip test. Matches SplashClipResult.