Skip to main content

Module clipper

Module clipper 

Source
Expand description

Public API convenience functions for the Clipper2 library.

Direct port from clipper.h. These functions provide a simple interface for common polygon operations: boolean operations, path offsetting, rect clipping, path simplification, and various geometric utilities.

Functions§

boolean_op_64
Perform a boolean operation on Paths64. Direct port from clipper.h BooleanOp (Paths64 overload).
boolean_op_d
Perform a boolean operation on PathsD. Direct port from clipper.h BooleanOp (PathsD overload).
boolean_op_tree_64
Perform a boolean operation on Paths64 with PolyTree64 output. Direct port from clipper.h BooleanOp (PolyTree64 overload).
boolean_op_tree_d
Perform a boolean operation on PathsD with PolyTreeD output. Direct port from clipper.h BooleanOp (PolyTreeD overload).
check_polytree_fully_contains_children
Check that all children in a PolyTree64 are fully contained by their parents. Direct port from clipper.h CheckPolytreeFullyContainsChildren.
difference_64
Compute the difference of subjects minus clips (Paths64). Direct port from clipper.h Difference.
difference_d
Compute the difference of subjects minus clips (PathsD). Direct port from clipper.h Difference (PathsD overload).
distance
Compute the distance between two points. Direct port from clipper.h Distance.
inflate_paths_64
Inflate (or deflate) paths by a delta amount (Paths64). Direct port from clipper.h InflatePaths.
inflate_paths_d
Inflate (or deflate) paths by a delta amount (PathsD). Direct port from clipper.h InflatePaths (PathsD overload).
intersect_64
Compute the intersection of subjects and clips (Paths64). Direct port from clipper.h Intersect.
intersect_d
Compute the intersection of subjects and clips (PathsD). Direct port from clipper.h Intersect (PathsD overload).
make_path64
Create a Path64 from a flat slice of coordinate pairs [x0, y0, x1, y1, …]. Direct port from clipper.h MakePath.
make_path_d
Create a PathD from a flat slice of coordinate pairs [x0, y0, x1, y1, …]. Direct port from clipper.h MakePathD.
near_collinear
Check if three points are nearly collinear within a tolerance. Direct port from clipper.h NearCollinear.
path_length
Compute the total length of a path. Direct port from clipper.h Length.
poly_tree_to_paths64
Convert a PolyTree64 to a flat list of Paths64. Direct port from clipper.h PolyTreeToPaths64.
poly_tree_to_paths_d
Convert a PolyTreeD to a flat list of PathsD. Direct port from clipper.h PolyTreeToPathsD.
ramer_douglas_peucker
Simplify a path using the Ramer-Douglas-Peucker algorithm. Direct port from clipper.h RamerDouglasPeucker.
ramer_douglas_peucker_paths
Simplify multiple paths using the Ramer-Douglas-Peucker algorithm. Direct port from clipper.h RamerDouglasPeucker (Paths overload).
rect_clip_64
Clip paths to a rectangle (Paths64). Direct port from clipper.h RectClip.
rect_clip_d
Clip paths to a rectangle (PathsD). Direct port from clipper.h RectClip (PathsD overload).
rect_clip_line_64
Clip a single open line to a rectangle (Paths64 output). Direct port from clipper.h RectClipLines (single path overload).
rect_clip_line_d
Clip a single open line to a rectangle (PathsD). Direct port from clipper.h RectClipLines (single PathD overload).
rect_clip_lines_64
Clip open lines to a rectangle (Paths64). Direct port from clipper.h RectClipLines.
rect_clip_lines_d
Clip open lines to a rectangle (PathsD). Direct port from clipper.h RectClipLines (PathsD overload).
rect_clip_path_64
Clip a single path to a rectangle (Paths64 output). Direct port from clipper.h RectClip (single path overload).
rect_clip_path_d
Clip a single path to a rectangle (PathsD). Direct port from clipper.h RectClip (single PathD overload).
simplify_path
Simplify a path by removing vertices that are within epsilon distance of an imaginary line between their neighbors. Direct port from clipper.h SimplifyPath.
simplify_paths
Simplify multiple paths. Direct port from clipper.h SimplifyPaths.
translate_path
Translate all points in a path by (dx, dy). Direct port from clipper.h TranslatePath.
translate_paths
Translate all paths by (dx, dy). Direct port from clipper.h TranslatePaths.
trim_collinear_64
Remove collinear points from a Path64. Direct port from clipper.h TrimCollinear.
trim_collinear_d
Remove collinear points from a PathD (scales to integer for precision). Direct port from clipper.h TrimCollinear (PathD overload).
union_64
Compute the union of subjects and clips (Paths64). Direct port from clipper.h Union.
union_d
Compute the union of subjects and clips (PathsD). Direct port from clipper.h Union (PathsD overload).
union_subjects_64
Compute the union of subjects only (no clips) (Paths64). Direct port from clipper.h Union (subjects-only overload).
union_subjects_d
Compute the union of subjects only (no clips) (PathsD). Direct port from clipper.h Union (subjects-only PathsD overload).
xor_64
Compute the symmetric difference (Xor) of subjects and clips (Paths64). Direct port from clipper.h Xor.
xor_d
Compute the symmetric difference (Xor) of subjects and clips (PathsD). Direct port from clipper.h Xor (PathsD overload).