Class DefaultClipper
java.lang.Object
com.itextpdf.text.pdf.parser.clipper.ClipperBase
com.itextpdf.text.pdf.parser.clipper.DefaultClipper
- All Implemented Interfaces:
Clipper
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.itextpdf.text.pdf.parser.clipper.ClipperBase
ClipperBase.LocalMinima, ClipperBase.Scanbeam
Nested classes/interfaces inherited from interface com.itextpdf.text.pdf.parser.clipper.Clipper
Clipper.ClipType, Clipper.Direction, Clipper.EndType, Clipper.JoinType, Clipper.PolyFillType, Clipper.PolyType, Clipper.ZFillCallback
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Edge
private Clipper.PolyFillType
private Clipper.ClipType
private final List
<DefaultClipper.IntersectNode> private final Comparator
<DefaultClipper.IntersectNode> private static final Logger
private Path.Maxima
protected final List
<Path.OutRec> private final boolean
private ClipperBase.Scanbeam
private Edge
private final boolean
private Clipper.PolyFillType
private boolean
Fields inherited from class com.itextpdf.text.pdf.parser.clipper.ClipperBase
currentLM, hasOpenPaths, minimaList, preserveCollinear, useFullRange
Fields inherited from interface com.itextpdf.text.pdf.parser.clipper.Clipper
PRESERVE_COLINEAR, REVERSE_SOLUTION, STRICTLY_SIMPLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addEdgeToSEL
(Edge edge) private void
addGhostJoin
(Path.OutPt Op, Point.LongPoint OffPt) private void
addJoin
(Path.OutPt Op1, Path.OutPt Op2, Point.LongPoint OffPt) private void
addLocalMaxPoly
(Edge e1, Edge e2, Point.LongPoint pt) private Path.OutPt
addLocalMinPoly
(Edge e1, Edge e2, Point.LongPoint pt) private Path.OutPt
addOutPt
(Edge e, Point.LongPoint pt) private void
appendPolygon
(Edge e1, Edge e2) private void
buildIntersectList
(long topY) private void
buildResult
(Paths polyg) private void
buildResult2
(PolyTree polytree) private void
private Path.OutRec
private void
private void
private boolean
doHorzSegmentsOverlap
(long seg1a, long seg1b, long seg2a, long seg2b) private void
private void
private boolean
boolean
execute
(Clipper.ClipType clipType, Paths solution) boolean
execute
(Clipper.ClipType clipType, Paths solution, Clipper.PolyFillType FillType) boolean
execute
(Clipper.ClipType clipType, Paths solution, Clipper.PolyFillType subjFillType, Clipper.PolyFillType clipFillType) boolean
execute
(Clipper.ClipType clipType, PolyTree polytree) boolean
execute
(Clipper.ClipType clipType, PolyTree polytree, Clipper.PolyFillType FillType) boolean
execute
(Clipper.ClipType clipType, PolyTree polytree, Clipper.PolyFillType subjFillType, Clipper.PolyFillType clipFillType) private boolean
private void
fixupFirstLefts1
(Path.OutRec OldOutRec, Path.OutRec NewOutRec) private void
fixupFirstLefts2
(Path.OutRec OldOutRec, Path.OutRec NewOutRec) private boolean
private void
fixupOutPolygon
(Path.OutRec outRec) private void
fixupOutPolyline
(Path.OutRec outrec) private static void
getHorzDirection
(Edge HorzEdge, Clipper.Direction[] Dir, long[] Left, long[] Right) private Path.OutPt
GetLastOutPt
(Edge e) private Path.OutRec
getOutRec
(int idx) private static boolean
getOverlap
(long a1, long a2, long b1, long b2, long[] Left, long[] Right) private void
insertEdgeIntoAEL
(Edge edge, Edge startEdge) private void
insertLocalMinimaIntoAEL
(long botY) private void
InsertMaxima
(long X) private void
insertScanbeam
(long Y) private void
intersectEdges
(Edge e1, Edge e2, Point.LongPoint pt) private void
intersectPoint
(Edge edge1, Edge edge2, Point.LongPoint[] ipV) private static boolean
isParam1RightOfParam2
(Path.OutRec outRec1, Path.OutRec outRec2) private static int
private void
private static boolean
joinHorz
(Path.OutPt op1, Path.OutPt op1b, Path.OutPt op2, Path.OutPt op2b, Point.LongPoint Pt, boolean DiscardLeft) private boolean
joinPoints
(Path.Join j, Path.OutRec outRec1, Path.OutRec outRec2) private static Paths
static Paths
minkowskiDiff
(Path poly1, Path poly2) static Paths
minkowskiSum
(Path pattern, Path path, boolean pathIsClosed) static Paths
minkowskiSum
(Path pattern, Paths paths, boolean pathIsClosed) private static boolean
poly2ContainsPoly1
(Path.OutPt outPt1, Path.OutPt outPt2) private long
private void
processEdgesAtTopOfScanbeam
(long topY) private void
processHorizontal
(Edge horzEdge) private void
private boolean
processIntersections
(long topY) private void
protected void
reset()
private void
setHoleState
(Edge e, Path.OutRec outRec) private void
setZ
(Point.LongPoint pt, Edge e1, Edge e2) static Paths
simplifyPolygon
(Path poly) static Paths
simplifyPolygon
(Path poly, Clipper.PolyFillType fillType) static Paths
simplifyPolygons
(Paths polys) static Paths
simplifyPolygons
(Paths polys, Clipper.PolyFillType fillType) private void
swapPositionsInAEL
(Edge edge1, Edge edge2) private void
swapPositionsInSEL
(Edge edge1, Edge edge2) private void
updateEdgeIntoAEL
(Edge[] eV) private void
updateOutPtIdxs
(Path.OutRec outrec) private void
updateWindingCount
(Edge edge) Methods inherited from class com.itextpdf.text.pdf.parser.clipper.ClipperBase
addPath, addPaths, clear, isPreserveCollinear, parseFirstLeft, popLocalMinima
-
Field Details
-
polyOuts
-
clipType
-
scanbeam
-
maxima
-
activeEdges
-
sortedEdges
-
intersectList
-
intersectNodeComparer
-
clipFillType
-
subjFillType
-
joins
-
ghostJoins
-
usingPolyTree
private boolean usingPolyTree -
zFillFunction
-
reverseSolution
private final boolean reverseSolution -
strictlySimple
private final boolean strictlySimple -
LOGGER
-
-
Constructor Details
-
DefaultClipper
public DefaultClipper() -
DefaultClipper
public DefaultClipper(int InitOptions)
-
-
Method Details
-
getHorzDirection
private static void getHorzDirection(Edge HorzEdge, Clipper.Direction[] Dir, long[] Left, long[] Right) -
getOverlap
private static boolean getOverlap(long a1, long a2, long b1, long b2, long[] Left, long[] Right) -
isParam1RightOfParam2
-
isPointInPolygon
-
joinHorz
private static boolean joinHorz(Path.OutPt op1, Path.OutPt op1b, Path.OutPt op2, Path.OutPt op2b, Point.LongPoint Pt, boolean DiscardLeft) -
joinPoints
-
minkowski
-
minkowskiDiff
-
minkowskiSum
-
minkowskiSum
-
poly2ContainsPoly1
-
simplifyPolygon
-
simplifyPolygon
-
simplifyPolygons
-
simplifyPolygons
-
insertScanbeam
private void insertScanbeam(long Y) -
InsertMaxima
private void InsertMaxima(long X) -
addEdgeToSEL
-
addGhostJoin
-
addJoin
-
addLocalMaxPoly
-
addLocalMinPoly
-
addOutPt
-
GetLastOutPt
-
appendPolygon
-
buildIntersectList
private void buildIntersectList(long topY) -
buildResult
-
buildResult2
-
copyAELToSEL
private void copyAELToSEL() -
createOutRec
-
deleteFromAEL
-
deleteFromSEL
-
doHorzSegmentsOverlap
private boolean doHorzSegmentsOverlap(long seg1a, long seg1b, long seg2a, long seg2b) -
doMaxima
-
doSimplePolygons
private void doSimplePolygons() -
EdgesAdjacent
-
execute
-
execute
-
execute
-
execute
-
execute
public boolean execute(Clipper.ClipType clipType, Paths solution, Clipper.PolyFillType subjFillType, Clipper.PolyFillType clipFillType) -
execute
public boolean execute(Clipper.ClipType clipType, PolyTree polytree, Clipper.PolyFillType subjFillType, Clipper.PolyFillType clipFillType) -
executeInternal
private boolean executeInternal() -
fixupFirstLefts1
-
fixupFirstLefts2
-
fixupIntersectionOrder
private boolean fixupIntersectionOrder() -
fixupOutPolyline
-
fixupOutPolygon
-
getOutRec
-
insertEdgeIntoAEL
-
insertLocalMinimaIntoAEL
private void insertLocalMinimaIntoAEL(long botY) -
intersectEdges
-
intersectPoint
-
joinCommonEdges
private void joinCommonEdges() -
popScanbeam
private long popScanbeam() -
processEdgesAtTopOfScanbeam
private void processEdgesAtTopOfScanbeam(long topY) -
processHorizontal
-
processHorizontals
private void processHorizontals() -
processIntersections
private boolean processIntersections(long topY) -
processIntersectList
private void processIntersectList() -
reset
protected void reset()- Overrides:
reset
in classClipperBase
-
setHoleState
-
setZ
-
swapPositionsInAEL
-
swapPositionsInSEL
-
updateEdgeIntoAEL
-
updateOutPtIdxs
-
updateWindingCount
-