Versions in this module Expand all Collapse all v0 v0.2.0 Mar 6, 2024 Changes in this version + const Skip + const Unassigned + func Area(poly Path) float64 + func AreaCombined(polygons Paths) float64 + func Int128Mul(lhs, rhs CInt) *big.Int + func Orientation(poly Path) bool + func PointInPolygon(pt *IntPoint, path Path) int + type CInt int64 + func Round(value float64) CInt + func TopX(edge *TEdge, currentY *CInt) CInt + type ClipType int + const CtDifference + const CtIntersection + const CtUnion + const CtXor + type Clipper struct + ReverseSolution bool + StrictlySimple bool + ZFillFunction TZFillCallback + func NewClipper(initOptions InitOptions) *Clipper + func (c *Clipper) AddEdgeToSEL(edge *TEdge) + func (c *Clipper) AddGhostJoin(Op *OutPt, OffPt *IntPoint) + func (c *Clipper) AddJoin(Op1, Op2 *OutPt, OffPt *IntPoint) + func (c *Clipper) AddLocalMaxPoly(e1, e2 *TEdge, pt *IntPoint) + func (c *Clipper) AddLocalMinPoly(e1, e2 *TEdge, pt *IntPoint) *OutPt + func (c *Clipper) AddOutPt(e *TEdge, pt *IntPoint) *OutPt + func (c *Clipper) AddPolyNodeToPaths(polynode *PolyNode, nt NodeType, paths Paths) + func (c *Clipper) AppendPolygon(e1, e2 *TEdge) + func (c *Clipper) BuildIntersectList(topY CInt) + func (c *Clipper) BuildResult() Paths + func (c *Clipper) BuildResult2(polytree *PolyTree) + func (c *Clipper) CleanPolygon(path Path, distance float64) Path + func (c *Clipper) CleanPolygons(polys Paths, distance float64) Paths + func (c *Clipper) ClosedPathsFromPolyTree(polytree *PolyTree) Paths + func (c *Clipper) CopyAELToSEL() + func (c *Clipper) CreateOutRec() *OutRec + func (c *Clipper) DeleteFromAEL(e *TEdge) + func (c *Clipper) DeleteFromSEL(e *TEdge) + func (c *Clipper) DisposeAllPolyPts() + func (c *Clipper) DisposeOutRec(index int) + func (c *Clipper) DisposeScanbeamList() + func (c *Clipper) DistanceFromLineSqrd(pt, ln1, ln2 *IntPoint) float64 + func (c *Clipper) DistanceSqrd(pt1, pt2 *IntPoint) float64 + func (c *Clipper) DoMaxima(e *TEdge) + func (c *Clipper) DoSimplePolygons() + func (c *Clipper) DupOutPt(outPt *OutPt, InsertAfter bool) *OutPt + func (c *Clipper) E2InsertsBeforeE1(e1, e2 *TEdge) bool + func (c *Clipper) EdgesAdjacent(inode *IntersectNode) bool + func (c *Clipper) ExcludeOp(op *OutPt) *OutPt + func (c *Clipper) Execute1(clipType ClipType, subjFillType, clipFillType PolyFillType) (solution Paths, succeeded bool) + func (c *Clipper) Execute2(clipType ClipType, subjFillType, clipFillType PolyFillType) (polytree *PolyTree, succeeded bool) + func (c *Clipper) ExecuteInternal() bool + func (c *Clipper) FirstIsBottomPt(btmPt1, btmPt2 *OutPt) bool + func (c *Clipper) FixHoleLinkage(outRec *OutRec) + func (c *Clipper) FixupFirstLefts1(OldOutRec, NewOutRec *OutRec) + func (c *Clipper) FixupFirstLefts2(OldOutRec, NewOutRec *OutRec) + func (c *Clipper) FixupIntersectionOrder() bool + func (c *Clipper) FixupOutPolygon(outRec *OutRec) + func (c *Clipper) GetBottomPt(pp *OutPt) *OutPt + func (c *Clipper) GetDx(pt1, pt2 *IntPoint) float64 + func (c *Clipper) GetHorzDirection(HorzEdge *TEdge, Dir *Direction, Left, Right *CInt) + func (c *Clipper) GetLowermostRec(outRec1, outRec2 *OutRec) *OutRec + func (c *Clipper) GetMaximaPair(e *TEdge) *TEdge + func (c *Clipper) GetNextInAEL(e *TEdge, direction Direction) *TEdge + func (c *Clipper) GetOutRec(idx int) *OutRec + func (c *Clipper) GetOverlap(a1, a2, b1, b2 CInt, Left, Right *CInt) bool + func (c *Clipper) HorzSegmentsOverlap(seg1a, seg1b, seg2a, seg2b CInt) bool + func (c *Clipper) InsertEdgeIntoAEL(edge, startEdge *TEdge) + func (c *Clipper) InsertLocalMinimaIntoAEL(botY CInt) + func (c *Clipper) InsertScanbeam(Y CInt) + func (c *Clipper) IntersectEdges(e1, e2 *TEdge, pt *IntPoint, protect bool) + func (c *Clipper) IntersectNodeSort(node1, node2 *IntersectNode) int + func (c *Clipper) IntersectPoint(edge1, edge2 *TEdge) (ip *IntPoint) + func (c *Clipper) IsContributing(edge *TEdge) bool + func (c *Clipper) IsEvenOddAltFillType(edge *TEdge) bool + func (c *Clipper) IsEvenOddFillType(edge *TEdge) bool + func (c *Clipper) IsIntermediate(e *TEdge, Y CInt) bool + func (c *Clipper) IsMaxima(e *TEdge, Y CInt) bool + func (c *Clipper) IsMinima(e *TEdge) bool + func (c *Clipper) JoinCommonEdges() + func (c *Clipper) JoinHorz(op1, op1b, op2, op2b *OutPt, Pt *IntPoint, DiscardLeft bool) bool + func (c *Clipper) JoinPoints(j *Join, outRec1, outRec2 *OutRec) bool + func (c *Clipper) Minkowski(pattern, path Path, IsSum, IsClosed bool) Paths + func (c *Clipper) MinkowskiDiff(poly1, poly2 Path) Paths + func (c *Clipper) MinkowskiSum(pattern, path Path, pathIsClosed bool) Paths + func (c *Clipper) MinkowskiSumAll(pattern Path, paths Paths, pathIsClosed bool) Paths + func (c *Clipper) OpenPathsFromPolyTree(polytree *PolyTree) Paths + func (c *Clipper) Param1RightOfParam2(outRec1, outRec2 *OutRec) bool + func (c *Clipper) ParseFirstLeft(FirstLeft *OutRec) *OutRec + func (c *Clipper) PointCount(pts *OutPt) int + func (c *Clipper) PointsAreClose(pt1, pt2 *IntPoint, distSqrd float64) bool + func (c *Clipper) Poly2ContainsPoly1(outPt1, outPt2 *OutPt) bool + func (c *Clipper) PolyTreeToPaths(polytree *PolyTree) Paths + func (c *Clipper) PopScanbeam() CInt + func (c *Clipper) ProcessEdgesAtTopOfScanbeam(topY CInt) + func (c *Clipper) ProcessHorizontal(horzEdge *TEdge, isTopOfScanbeam bool) + func (c *Clipper) ProcessHorizontals(isTopOfScanbeam bool) + func (c *Clipper) ProcessIntersectList() + func (c *Clipper) ProcessIntersections(topY CInt) bool + func (c *Clipper) Reset() + func (c *Clipper) ReversePaths(polys Paths) + func (c *Clipper) ReversePolyPtLinks(pp *OutPt) + func (c *Clipper) SetHoleState(e *TEdge, outRec *OutRec) + func (c *Clipper) SetWindingCount(edge *TEdge) + func (c *Clipper) SetZ(pt *IntPoint, e1, e2 *TEdge) + func (c *Clipper) SimplifyPolygon(poly Path, fillType PolyFillType) Paths + func (c *Clipper) SimplifyPolygons(polys Paths, fillType PolyFillType) Paths + func (c *Clipper) SlopesNearCollinear(pt1, pt2, pt3 *IntPoint, distSqrd float64) bool + func (c *Clipper) SwapPolyIndexes(edge1, edge2 *TEdge) + func (c *Clipper) SwapPositionsInAEL(edge1, edge2 *TEdge) + func (c *Clipper) SwapPositionsInSEL(edge1, edge2 *TEdge) + func (c *Clipper) SwapSides(edge1, edge2 *TEdge) + func (c *Clipper) TranslatePath(path Path, delta *IntPoint) Path + func (c *Clipper) UpdateEdgeIntoAEL(e *TEdge) *TEdge + func (c *Clipper) UpdateOutPtIdxs(outrec *OutRec) + type ClipperBase struct + PreserveCollinear bool + func NewClipperBase() *ClipperBase + func (c *ClipperBase) AddPath(pg Path, polyType PolyType, Closed bool) bool + func (c *ClipperBase) AddPaths(ppg Paths, polyType PolyType, closed bool) bool + func (c *ClipperBase) Clear() + func (c *ClipperBase) DisposeLocalMinimaList() + func (c *ClipperBase) FindNextLocMin(E *TEdge) *TEdge + func (c *ClipperBase) InitEdge(e, eNext, ePrev *TEdge, pt *IntPoint) + func (c *ClipperBase) InitEdge2(e *TEdge, polyType PolyType) + func (c *ClipperBase) InsertLocalMinima(newLm *LocalMinima) + func (c *ClipperBase) IsHorizontal(e *TEdge) bool + func (c *ClipperBase) PointIsVertex(pt *IntPoint, pp *OutPt) bool + func (c *ClipperBase) PointOnLineSegment(pt, linePt1, linePt2 *IntPoint, UseFullRange bool) bool + func (c *ClipperBase) PointOnPolygon(pt *IntPoint, pp *OutPt, UseFullRange bool) bool + func (c *ClipperBase) PopLocalMinima() + func (c *ClipperBase) ProcessBound(E *TEdge, IsClockwise bool) *TEdge + func (c *ClipperBase) Pt2IsBetweenPt1AndPt3(pt1, pt2, pt3 *IntPoint) bool + func (c *ClipperBase) RangeTest(Pt *IntPoint, useFullRange *bool) + func (c *ClipperBase) RemoveEdge(e *TEdge) *TEdge + func (c *ClipperBase) Reset() + func (c *ClipperBase) ReverseHorizontal(e *TEdge) + func (c *ClipperBase) SetDx(e *TEdge) + func (c *ClipperBase) SlopesEqual(e1, e2 *TEdge, UseFullRange bool) bool + func (c *ClipperBase) SlopesEqual3(pt1, pt2, pt3 *IntPoint, UseFullRange bool) bool + func (c *ClipperBase) SlopesEqual4(pt1, pt2, pt3, pt4 *IntPoint, UseFullRange bool) bool + func (c *ClipperBase) Swap(val1, val2 *CInt) + type ClipperException struct + func NewClipperException(s string) *ClipperException + func (e ClipperException) Error() string + type ClipperOffset struct + ArcTolerance float64 + MiterLimit float64 + func NewClipperOffset() *ClipperOffset + func (co *ClipperOffset) AddPath(path Path, joinType JoinType, endType EndType) + func (co *ClipperOffset) AddPaths(paths Paths, joinType JoinType, endType EndType) + func (co *ClipperOffset) Clear() + func (co *ClipperOffset) DoMiter(j, k int, r float64) + func (co *ClipperOffset) DoOffset(delta float64) + func (co *ClipperOffset) DoRound(j, k int) + func (co *ClipperOffset) DoSquare(j, k int) + func (co *ClipperOffset) Execute(delta float64) (solution Paths) + func (co *ClipperOffset) Execute2(delta float64) (solution *PolyTree) + func (co *ClipperOffset) FixOrientations() + func (co *ClipperOffset) GetUnitNormal(pt1, pt2 *IntPoint) *DoublePoint + func (co *ClipperOffset) OffsetPoint(j int, k *int, jointype JoinType) + func (co *ClipperOffset) Round(value float64) CInt + type Direction int + const DLeftToRight + const DRightToLeft + type DoublePoint struct + X float64 + Y float64 + func CopyDoublePoint(dp *DoublePoint) *DoublePoint + func NewDoublePoint(x, y float64) *DoublePoint + type EdgeSide int + const EsLeft + const EsRight + type EndType int + const EtClosedLine + const EtClosedPolygon + const EtOpenButt + const EtOpenRound + const EtOpenSquare + type InitOptions int + const IoNone + const IoPreserveCollinear + const IoReverseSolution + const IoStrictlySimple + type IntPoint struct + X CInt + Y CInt + func NewIntPoint(X, Y CInt) *IntPoint + func NewIntPointFromFloat(x, y float64) *IntPoint + func (a *IntPoint) Equals(b *IntPoint) bool + func (a *IntPoint) NotEqual(b *IntPoint) bool + func (ip *IntPoint) Copy() IntPoint + func (ip *IntPoint) ToDoublePoint() *DoublePoint + func (p IntPoint) String() string + type IntRect struct + func GetBounds(paths Paths) *IntRect + func NewIntRect(l, t, r, b CInt) *IntRect + func (ir *IntRect) Copy() IntRect + type IntersectNode struct + Edge1 *TEdge + Edge2 *TEdge + Pt *IntPoint + func (in *IntersectNode) String() string + type IntersectNodeList []*IntersectNode + func (i IntersectNodeList) Len() int + func (i IntersectNodeList) Less(a, b int) bool + func (i IntersectNodeList) Swap(a, b int) + type Join struct + OffPt *IntPoint + OutPt1 *OutPt + OutPt2 *OutPt + func (j *Join) String() string + type JoinType int + const JtMiter + const JtRound + const JtSquare + type LocalMinima struct + LeftBound *TEdge + Next *LocalMinima + RightBound *TEdge + Y CInt + func (lm *LocalMinima) String() string + type NodeType int + type OutPt struct + Idx int + Next *OutPt + Prev *OutPt + Pt *IntPoint + func (o *OutPt) String() string + type OutRec struct + BottomPt *OutPt + FirstLeft *OutRec + Idx int + IsHole bool + IsOpen bool + PolyNode *PolyNode + Pts *OutPt + type Path []IntPoint + func NewPath() Path + func (p Path) String() string + type Paths []Path + func NewPaths() Paths + func (p Paths) String() string + type PolyFillType int + const PftEvenOdd + const PftNegative + const PftNonZero + const PftPositive + type PolyNode struct + IsOpen bool + func NewPolyNode() *PolyNode + func (pn *PolyNode) AddChild(Child *PolyNode) + func (pn *PolyNode) ChildCount() int + func (pn *PolyNode) Childs() []*PolyNode + func (pn *PolyNode) Contour() Path + func (pn *PolyNode) GetNext() *PolyNode + func (pn *PolyNode) GetNextSiblingUp() *PolyNode + func (pn *PolyNode) IsHole() bool + func (pn *PolyNode) IsHoleNode() bool + func (pn *PolyNode) Parent() *PolyNode + type PolyTree struct + func NewPolyTree() *PolyTree + func (pt *PolyTree) Clear() + func (pt *PolyTree) GetFirst() *PolyNode + func (pt *PolyTree) Total() int + type PolyType int + const PtClip + const PtSubject + type Scanbeam struct + Next *Scanbeam + Y CInt + func (s *Scanbeam) String() string + type TEdge struct + Bot IntPoint + Curr IntPoint + Delta IntPoint + Dx float64 + Next *TEdge + NextInAEL *TEdge + NextInLML *TEdge + NextInSEL *TEdge + OutIdx int + PolyTyp PolyType + Prev *TEdge + PrevInAEL *TEdge + PrevInSEL *TEdge + Side EdgeSide + Top IntPoint + WindCnt int + WindCnt2 int + WindDelta int + func (e *TEdge) String() string + type TZFillCallback interface + ZFill func(bot1, top1, bot2, top2, intersectPt *IntPoint)