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 ClipperBase
ClipperBase.LocalMinima, ClipperBase.ScanbeamNested classes/interfaces inherited from interface Clipper
Clipper.ClipType, Clipper.Direction, Clipper.EndType, Clipper.JoinType, Clipper.PolyFillType, Clipper.PolyType, Clipper.ZFillCallback -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Edgeprivate Clipper.PolyFillTypeprivate Clipper.ClipTypeprivate final List<DefaultClipper.IntersectNode> private final Comparator<DefaultClipper.IntersectNode> private static final Loggerprivate Path.Maximaprotected final List<Path.OutRec> private final booleanprivate ClipperBase.Scanbeamprivate Edgeprivate final booleanprivate Clipper.PolyFillTypeprivate booleanFields inherited from class ClipperBase
currentLM, hasOpenPaths, minimaList, preserveCollinear, useFullRangeFields inherited from interface Clipper
PRESERVE_COLINEAR, REVERSE_SOLUTION, STRICTLY_SIMPLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddEdgeToSEL(Edge edge) private voidaddGhostJoin(Path.OutPt Op, Point.LongPoint OffPt) private voidaddJoin(Path.OutPt Op1, Path.OutPt Op2, Point.LongPoint OffPt) private voidaddLocalMaxPoly(Edge e1, Edge e2, Point.LongPoint pt) private Path.OutPtaddLocalMinPoly(Edge e1, Edge e2, Point.LongPoint pt) private Path.OutPtaddOutPt(Edge e, Point.LongPoint pt) private voidappendPolygon(Edge e1, Edge e2) private voidbuildIntersectList(long topY) private voidbuildResult(Paths polyg) private voidbuildResult2(PolyTree polytree) private voidprivate Path.OutRecprivate voidprivate voidprivate booleandoHorzSegmentsOverlap(long seg1a, long seg1b, long seg2a, long seg2b) private voidprivate voidprivate booleanbooleanexecute(Clipper.ClipType clipType, Paths solution) booleanexecute(Clipper.ClipType clipType, Paths solution, Clipper.PolyFillType FillType) booleanexecute(Clipper.ClipType clipType, Paths solution, Clipper.PolyFillType subjFillType, Clipper.PolyFillType clipFillType) booleanexecute(Clipper.ClipType clipType, PolyTree polytree) booleanexecute(Clipper.ClipType clipType, PolyTree polytree, Clipper.PolyFillType FillType) booleanexecute(Clipper.ClipType clipType, PolyTree polytree, Clipper.PolyFillType subjFillType, Clipper.PolyFillType clipFillType) private booleanprivate voidfixupFirstLefts1(Path.OutRec OldOutRec, Path.OutRec NewOutRec) private voidfixupFirstLefts2(Path.OutRec OldOutRec, Path.OutRec NewOutRec) private booleanprivate voidfixupOutPolygon(Path.OutRec outRec) private voidfixupOutPolyline(Path.OutRec outrec) private static voidgetHorzDirection(Edge HorzEdge, Clipper.Direction[] Dir, long[] Left, long[] Right) private Path.OutPtGetLastOutPt(Edge e) private Path.OutRecgetOutRec(int idx) private static booleangetOverlap(long a1, long a2, long b1, long b2, long[] Left, long[] Right) private voidinsertEdgeIntoAEL(Edge edge, Edge startEdge) private voidinsertLocalMinimaIntoAEL(long botY) private voidInsertMaxima(long X) private voidinsertScanbeam(long Y) private voidintersectEdges(Edge e1, Edge e2, Point.LongPoint pt) private voidintersectPoint(Edge edge1, Edge edge2, Point.LongPoint[] ipV) private static booleanisParam1RightOfParam2(Path.OutRec outRec1, Path.OutRec outRec2) private static intprivate voidprivate static booleanjoinHorz(Path.OutPt op1, Path.OutPt op1b, Path.OutPt op2, Path.OutPt op2b, Point.LongPoint Pt, boolean DiscardLeft) private booleanjoinPoints(Path.Join j, Path.OutRec outRec1, Path.OutRec outRec2) private static Pathsstatic PathsminkowskiDiff(Path poly1, Path poly2) static PathsminkowskiSum(Path pattern, Path path, boolean pathIsClosed) static PathsminkowskiSum(Path pattern, Paths paths, boolean pathIsClosed) private static booleanpoly2ContainsPoly1(Path.OutPt outPt1, Path.OutPt outPt2) private longprivate voidprocessEdgesAtTopOfScanbeam(long topY) private voidprocessHorizontal(Edge horzEdge) private voidprivate booleanprocessIntersections(long topY) private voidprotected voidreset()private voidsetHoleState(Edge e, Path.OutRec outRec) private voidsetZ(Point.LongPoint pt, Edge e1, Edge e2) static PathssimplifyPolygon(Path poly) static PathssimplifyPolygon(Path poly, Clipper.PolyFillType fillType) static PathssimplifyPolygons(Paths polys) static PathssimplifyPolygons(Paths polys, Clipper.PolyFillType fillType) private voidswapPositionsInAEL(Edge edge1, Edge edge2) private voidswapPositionsInSEL(Edge edge1, Edge edge2) private voidupdateEdgeIntoAEL(Edge[] eV) private voidupdateOutPtIdxs(Path.OutRec outrec) private voidupdateWindingCount(Edge edge) Methods inherited from class 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:
resetin classClipperBase
-
setHoleState
-
setZ
-
swapPositionsInAEL
-
swapPositionsInSEL
-
updateEdgeIntoAEL
-
updateOutPtIdxs
-
updateWindingCount
-