Documentation ¶
Index ¶
- Constants
- 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
- type ClipType
- type 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
- 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
- type 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
- type DoublePoint
- type EdgeSide
- type EndType
- type InitOptions
- type IntPoint
- type IntRect
- type IntersectNode
- type IntersectNodeList
- type Join
- type JoinType
- type LocalMinima
- type NodeType
- type OutPt
- type OutRec
- type Path
- type Paths
- type PolyFillType
- type PolyNode
- func (pn *PolyNode) AddChild(Child *PolyNode)
- func (pn *PolyNode) ChildCount() int
- 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
- type PolyType
- type Scanbeam
- type TEdge
- type TZFillCallback
Constants ¶
const ( Skip int = -2 Unassigned int = -1 )
Variables ¶
This section is empty.
Functions ¶
func AreaCombined ¶
func Orientation ¶
func PointInPolygon ¶
returns 0 if false, +1 if true, -1 if pt ON polygon boundary See "The Point in Polygon Problem for Arbitrary Polygons" by Hormann & Agathos http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.88.5498&rep=rep1&type=pdf
Types ¶
type Clipper ¶
type Clipper struct { ClipperBase ZFillFunction TZFillCallback ReverseSolution, StrictlySimple bool // contains filtered or unexported fields }
func NewClipper ¶
func NewClipper(initOptions InitOptions) *Clipper
func (*Clipper) AddEdgeToSEL ¶
func (*Clipper) AddGhostJoin ¶
func (*Clipper) AddLocalMaxPoly ¶
func (*Clipper) AddLocalMinPoly ¶
func (*Clipper) AddPolyNodeToPaths ¶
func (*Clipper) AppendPolygon ¶
func (*Clipper) BuildIntersectList ¶
func (*Clipper) BuildResult ¶
func (*Clipper) BuildResult2 ¶
func (*Clipper) CleanPolygon ¶
distance = proximity in units/pixels below which vertices will be stripped. Default ~= sqrt(2) so when adjacent vertices or semi-adjacent vertices have both x & y coords within 1 unit, then the second vertex will be stripped. default distance=1.415
func (*Clipper) CleanPolygons ¶
------------------------------------------------------------------------------ default distance = 1.415
func (*Clipper) ClosedPathsFromPolyTree ¶
func (*Clipper) CopyAELToSEL ¶
func (c *Clipper) CopyAELToSEL()
func (*Clipper) CreateOutRec ¶
func (*Clipper) DeleteFromAEL ¶
func (*Clipper) DeleteFromSEL ¶
func (*Clipper) DisposeAllPolyPts ¶
func (c *Clipper) DisposeAllPolyPts()
func (*Clipper) DisposeOutRec ¶
func (*Clipper) DisposeScanbeamList ¶
func (c *Clipper) DisposeScanbeamList()
func (*Clipper) DistanceFromLineSqrd ¶
func (*Clipper) DistanceSqrd ¶
func (*Clipper) DoSimplePolygons ¶
func (c *Clipper) DoSimplePolygons()
func (*Clipper) E2InsertsBeforeE1 ¶
func (*Clipper) EdgesAdjacent ¶
func (c *Clipper) EdgesAdjacent(inode *IntersectNode) bool
func (*Clipper) Execute1 ¶
func (c *Clipper) Execute1(clipType ClipType, subjFillType, clipFillType PolyFillType) (solution Paths, succeeded bool)
func (*Clipper) Execute2 ¶
func (c *Clipper) Execute2(clipType ClipType, subjFillType, clipFillType PolyFillType) (polytree *PolyTree, succeeded bool)
func (*Clipper) ExecuteInternal ¶
func (*Clipper) FirstIsBottomPt ¶
func (*Clipper) FixHoleLinkage ¶
func (*Clipper) FixupFirstLefts1 ¶
func (*Clipper) FixupFirstLefts2 ¶
func (*Clipper) FixupIntersectionOrder ¶
func (*Clipper) FixupOutPolygon ¶
func (*Clipper) GetBottomPt ¶
func (*Clipper) GetHorzDirection ¶
func (*Clipper) GetLowermostRec ¶
func (*Clipper) GetMaximaPair ¶
func (*Clipper) GetOverlap ¶
func (*Clipper) HorzSegmentsOverlap ¶
func (*Clipper) InsertEdgeIntoAEL ¶
func (*Clipper) InsertLocalMinimaIntoAEL ¶
func (*Clipper) InsertScanbeam ¶
func (*Clipper) IntersectEdges ¶
default protect=false
func (*Clipper) IntersectNodeSort ¶
func (c *Clipper) IntersectNodeSort(node1, node2 *IntersectNode) int
func (*Clipper) IntersectPoint ¶
func (*Clipper) IsContributing ¶
func (*Clipper) IsEvenOddAltFillType ¶
func (*Clipper) IsEvenOddFillType ¶
func (*Clipper) JoinCommonEdges ¶
func (c *Clipper) JoinCommonEdges()
func (*Clipper) MinkowskiDiff ¶
func (*Clipper) MinkowskiSum ¶
func (*Clipper) MinkowskiSumAll ¶
func (*Clipper) OpenPathsFromPolyTree ¶
func (*Clipper) Param1RightOfParam2 ¶
func (*Clipper) ParseFirstLeft ¶
func (*Clipper) PointCount ¶
func (*Clipper) PointsAreClose ¶
func (*Clipper) Poly2ContainsPoly1 ¶
func (*Clipper) PolyTreeToPaths ¶
func (*Clipper) PopScanbeam ¶
func (*Clipper) ProcessEdgesAtTopOfScanbeam ¶
func (*Clipper) ProcessHorizontal ¶
func (*Clipper) ProcessHorizontals ¶
func (*Clipper) ProcessIntersectList ¶
func (c *Clipper) ProcessIntersectList()
func (*Clipper) ProcessIntersections ¶
func (*Clipper) ReversePaths ¶
func (*Clipper) ReversePolyPtLinks ¶
func (*Clipper) SetHoleState ¶
func (*Clipper) SetWindingCount ¶
func (*Clipper) SimplifyPolygon ¶
func (c *Clipper) SimplifyPolygon(poly Path, fillType PolyFillType) Paths
------------------------------------------------------------------------------ SimplifyPolygon functions ... Convert self-intersecting polygons into simple polygons ------------------------------------------------------------------------------ default fillType = PftEvenOdd
func (*Clipper) SimplifyPolygons ¶
func (c *Clipper) SimplifyPolygons(polys Paths, fillType PolyFillType) Paths
default fillType = PftEvenOdd
func (*Clipper) SlopesNearCollinear ¶
func (*Clipper) SwapPolyIndexes ¶
func (*Clipper) SwapPositionsInAEL ¶
func (*Clipper) SwapPositionsInSEL ¶
func (*Clipper) UpdateEdgeIntoAEL ¶
func (*Clipper) UpdateOutPtIdxs ¶
type ClipperBase ¶
type ClipperBase struct { PreserveCollinear bool // contains filtered or unexported fields }
func NewClipperBase ¶
func NewClipperBase() *ClipperBase
func (*ClipperBase) AddPath ¶
func (c *ClipperBase) AddPath(pg Path, polyType PolyType, Closed bool) bool
func (*ClipperBase) AddPaths ¶
func (c *ClipperBase) AddPaths(ppg Paths, polyType PolyType, closed bool) bool
func (*ClipperBase) Clear ¶
func (c *ClipperBase) Clear()
func (*ClipperBase) DisposeLocalMinimaList ¶
func (c *ClipperBase) DisposeLocalMinimaList()
func (*ClipperBase) FindNextLocMin ¶
func (c *ClipperBase) FindNextLocMin(E *TEdge) *TEdge
func (*ClipperBase) InitEdge ¶
func (c *ClipperBase) InitEdge(e, eNext, ePrev *TEdge, pt *IntPoint)
func (*ClipperBase) InitEdge2 ¶
func (c *ClipperBase) InitEdge2(e *TEdge, polyType PolyType)
func (*ClipperBase) InsertLocalMinima ¶
func (c *ClipperBase) InsertLocalMinima(newLm *LocalMinima)
func (*ClipperBase) IsHorizontal ¶
func (c *ClipperBase) IsHorizontal(e *TEdge) bool
func (*ClipperBase) PointIsVertex ¶
func (c *ClipperBase) PointIsVertex(pt *IntPoint, pp *OutPt) bool
func (*ClipperBase) PointOnLineSegment ¶
func (c *ClipperBase) PointOnLineSegment(pt, linePt1, linePt2 *IntPoint, UseFullRange bool) bool
func (*ClipperBase) PointOnPolygon ¶
func (c *ClipperBase) PointOnPolygon(pt *IntPoint, pp *OutPt, UseFullRange bool) bool
func (*ClipperBase) PopLocalMinima ¶
func (c *ClipperBase) PopLocalMinima()
func (*ClipperBase) ProcessBound ¶
func (c *ClipperBase) ProcessBound(E *TEdge, IsClockwise bool) *TEdge
func (*ClipperBase) Pt2IsBetweenPt1AndPt3 ¶
func (c *ClipperBase) Pt2IsBetweenPt1AndPt3(pt1, pt2, pt3 *IntPoint) bool
func (*ClipperBase) RangeTest ¶
func (c *ClipperBase) RangeTest(Pt *IntPoint, useFullRange *bool)
func (*ClipperBase) RemoveEdge ¶
func (c *ClipperBase) RemoveEdge(e *TEdge) *TEdge
func (*ClipperBase) Reset ¶
func (c *ClipperBase) Reset()
func (*ClipperBase) ReverseHorizontal ¶
func (c *ClipperBase) ReverseHorizontal(e *TEdge)
func (*ClipperBase) SetDx ¶
func (c *ClipperBase) SetDx(e *TEdge)
func (*ClipperBase) SlopesEqual ¶
func (c *ClipperBase) SlopesEqual(e1, e2 *TEdge, UseFullRange bool) bool
func (*ClipperBase) SlopesEqual3 ¶
func (c *ClipperBase) SlopesEqual3(pt1, pt2, pt3 *IntPoint, UseFullRange bool) bool
func (*ClipperBase) SlopesEqual4 ¶
func (c *ClipperBase) SlopesEqual4(pt1, pt2, pt3, pt4 *IntPoint, UseFullRange bool) bool
func (*ClipperBase) Swap ¶
func (c *ClipperBase) Swap(val1, val2 *CInt)
type ClipperException ¶
type ClipperException struct {
// contains filtered or unexported fields
}
func NewClipperException ¶
func NewClipperException(s string) *ClipperException
func (ClipperException) Error ¶
func (e ClipperException) Error() string
type ClipperOffset ¶
type ClipperOffset struct { ArcTolerance float64 MiterLimit float64 // contains filtered or unexported fields }
func NewClipperOffset ¶
func NewClipperOffset() *ClipperOffset
func (*ClipperOffset) AddPath ¶
func (co *ClipperOffset) AddPath(path Path, joinType JoinType, endType EndType)
func (*ClipperOffset) AddPaths ¶
func (co *ClipperOffset) AddPaths(paths Paths, joinType JoinType, endType EndType)
func (*ClipperOffset) Clear ¶
func (co *ClipperOffset) Clear()
func (*ClipperOffset) DoMiter ¶
func (co *ClipperOffset) DoMiter(j, k int, r float64)
func (*ClipperOffset) DoOffset ¶
func (co *ClipperOffset) DoOffset(delta float64)
func (*ClipperOffset) DoRound ¶
func (co *ClipperOffset) DoRound(j, k int)
func (*ClipperOffset) DoSquare ¶
func (co *ClipperOffset) DoSquare(j, k int)
func (*ClipperOffset) Execute ¶
func (co *ClipperOffset) Execute(delta float64) (solution Paths)
func (*ClipperOffset) Execute2 ¶
func (co *ClipperOffset) Execute2(delta float64) (solution *PolyTree)
func (*ClipperOffset) FixOrientations ¶
func (co *ClipperOffset) FixOrientations()
func (*ClipperOffset) GetUnitNormal ¶
func (co *ClipperOffset) GetUnitNormal(pt1, pt2 *IntPoint) *DoublePoint
func (*ClipperOffset) OffsetPoint ¶
func (co *ClipperOffset) OffsetPoint(j int, k *int, jointype JoinType)
func (*ClipperOffset) Round ¶
func (co *ClipperOffset) Round(value float64) CInt
type DoublePoint ¶
func CopyDoublePoint ¶
func CopyDoublePoint(dp *DoublePoint) *DoublePoint
func NewDoublePoint ¶
func NewDoublePoint(x, y float64) *DoublePoint
type InitOptions ¶
type InitOptions int
InitOptions that can be passed to the constructor ...
const ( IoNone InitOptions = 0 IoReverseSolution InitOptions = 1 IoStrictlySimple InitOptions = 2 IoPreserveCollinear InitOptions = 4 )
type IntPoint ¶
func NewIntPoint ¶
func NewIntPointFromFloat ¶
func (*IntPoint) Equals ¶
The == operator, which will also compare Z values if they exist, is usually used instead of this one. This may be a problem when using Z values.
func (*IntPoint) ToDoublePoint ¶
func (ip *IntPoint) ToDoublePoint() *DoublePoint
type IntersectNode ¶
func (*IntersectNode) String ¶
func (in *IntersectNode) String() string
type IntersectNodeList ¶
type IntersectNodeList []*IntersectNode
func (IntersectNodeList) Len ¶
func (i IntersectNodeList) Len() int
func (IntersectNodeList) Less ¶
func (i IntersectNodeList) Less(a, b int) bool
func (IntersectNodeList) Swap ¶
func (i IntersectNodeList) Swap(a, b int)
type LocalMinima ¶
type LocalMinima struct { Y CInt LeftBound, RightBound *TEdge Next *LocalMinima }
func (*LocalMinima) String ¶
func (lm *LocalMinima) String() string
type PolyFillType ¶
type PolyFillType int
By far the most widely used winding rules for polygon filling are EvenOdd & NonZero (GDI, GDI+, XLib, OpenGL, Cairo, AGG, Quartz, SVG, Gr32) Others rules include Positive, Negative and ABS_GTR_EQ_TWO (only in OpenGL) see http://glprogramming.com/red/chapter11.html
const ( PftEvenOdd PolyFillType = iota PftNonZero PftPositive PftNegative )
type PolyNode ¶
type PolyNode struct { IsOpen bool // contains filtered or unexported fields }
func NewPolyNode ¶
func NewPolyNode() *PolyNode
func (*PolyNode) ChildCount ¶
func (*PolyNode) GetNextSiblingUp ¶
func (*PolyNode) IsHoleNode ¶
type PolyTree ¶
type PolyTree struct { PolyNode // contains filtered or unexported fields }
func NewPolyTree ¶
func NewPolyTree() *PolyTree
type TEdge ¶
type TEdge struct {
Bot, Curr, Top, Delta IntPoint
Dx float64
PolyTyp PolyType
Side EdgeSide
WindDelta int //1 or -1 depending on winding direction
WindCnt int
WindCnt2 int //winding count of the opposite polytype
OutIdx int
Next, Prev, NextInLML, NextInAEL *TEdge
PrevInAEL, NextInSEL, PrevInSEL *TEdge
}
type TZFillCallback ¶
type TZFillCallback interface {
ZFill(bot1, top1, bot2, top2, intersectPt *IntPoint)
}