Skip to main content

overlay_with

Function overlay_with 

Source
pub fn overlay_with(
    subject: &OverlayInput,
    clip: &OverlayInput,
    operation: OverlayOperation,
    fill: FillRule,
    tolerance: Tolerance,
    options: OverlayOptions,
) -> Result<ReportedOverlay, OverlayError>
Expand description

overlay with explicit options; the default options make it overlay exactly.

With OverlayOptions::dropping_degenerate_rings a ring that is too short, has a repeated vertex, or has zero area under the exact ZeroArea rule is left out instead of refusing the overlay, a hole goes with its dropped outer ring, and each such ring is reported in ReportedOverlay::dropped with its operand, polygon, ring, reason and area (#256). Every other fault is refused as by overlay; a self-intersecting ring is never dropped. The overlay of the kept rings is exact as usual, and its evidence counts the kept rings. The rules are in the docs of DropReason and of the degenerate module.