@@ -72,6 +72,9 @@ public class ClipperBridge {
72
72
/**
73
73
* Converts Clipper library {@link PolyTree} abstraction into iText
74
74
* {@link com.itextpdf.kernel.geom.Path} object.
75
+ *
76
+ * @param result {@link PolyTree} object to convert
77
+ * @return resultant {@link com.itextpdf.kernel.geom.Path} object
75
78
*/
76
79
public static com .itextpdf .kernel .geom .Path convertToPath (PolyTree result ) {
77
80
com .itextpdf .kernel .geom .Path path = new com .itextpdf .kernel .geom .Path ();
@@ -104,6 +107,13 @@ public static void addPath(IClipper clipper, com.itextpdf.kernel.geom.Path path,
104
107
* Adds all iText {@link Subpath}s of the iText {@link com.itextpdf.kernel.geom.Path} to the {@link ClipperOffset} object with one
105
108
* note: it doesn't add degenerate subpaths.
106
109
*
110
+ * @param offset the {@link ClipperOffset} object to add all iText {@link Subpath}s that are not degenerated.
111
+ * @param path {@link com.itextpdf.kernel.geom.Path} object, containing the required {@link Subpath}s
112
+ * @param joinType {@link IClipper} join type. The value could be {@link IClipper.JoinType#BEVEL}, {@link IClipper.JoinType#ROUND},
113
+ * {@link IClipper.JoinType#MITER}
114
+ * @param endType {@link IClipper} end type. The value could be {@link IClipper.EndType#CLOSED_POLYGON},
115
+ * {@link IClipper.EndType#CLOSED_LINE}, {@link IClipper.EndType#OPEN_BUTT}, {@link IClipper.EndType#OPEN_SQUARE},
116
+ * {@link IClipper.EndType#OPEN_ROUND}
107
117
* @return {@link java.util.List} consisting of all degenerate iText {@link Subpath}s of the path.
108
118
*/
109
119
public static List <Subpath > addPath (ClipperOffset offset , com .itextpdf .kernel .geom .Path path , IClipper .JoinType joinType , IClipper .EndType endType ) {
@@ -136,6 +146,9 @@ public static List<Subpath> addPath(ClipperOffset offset, com.itextpdf.kernel.ge
136
146
/**
137
147
* Converts list of {@link Point.LongPoint} objects into list of
138
148
* {@link com.itextpdf.kernel.geom.Point} objects.
149
+ *
150
+ * @param points the list of {@link Point.LongPoint} objects to convert
151
+ * @return the resultant list of {@link com.itextpdf.kernel.geom.Point} objects.
139
152
*/
140
153
public static List <com .itextpdf .kernel .geom .Point > convertToFloatPoints (List <Point .LongPoint > points ) {
141
154
List <com .itextpdf .kernel .geom .Point > convertedPoints = new ArrayList <>(points .size ());
@@ -153,6 +166,9 @@ public static List<com.itextpdf.kernel.geom.Point> convertToFloatPoints(List<Poi
153
166
/**
154
167
* Converts list of {@link com.itextpdf.kernel.geom.Point} objects into list of
155
168
* {@link Point.LongPoint} objects.
169
+ *
170
+ * @param points the list of {@link com.itextpdf.kernel.geom.Point} objects to convert
171
+ * @return the resultant list of {@link Point.LongPoint} objects.
156
172
*/
157
173
public static List <Point .LongPoint > convertToLongPoints (List <com .itextpdf .kernel .geom .Point > points ) {
158
174
List <Point .LongPoint > convertedPoints = new ArrayList <>(points .size ());
@@ -276,6 +292,14 @@ static void addContour(com.itextpdf.kernel.geom.Path path, List<Point.LongPoint>
276
292
}
277
293
278
294
/**
295
+ * Adds rectangle path based on array of {@link com.itextpdf.kernel.geom.Point} (internally converting
296
+ * them by {@link #convertToLongPoints}) and adds this path to {@link IClipper} instance.
297
+ *
298
+ * @param clipper {@link IClipper} instance to which the created rectangle path will be added.
299
+ * @param rectVertices an array of {@link com.itextpdf.kernel.geom.Point} which will be internally converted
300
+ * to clipper path and added to the clipper instance.
301
+ * @param polyType either {@link IClipper.PolyType#SUBJECT} or {@link IClipper.PolyType#CLIP} denoting whether added
302
+ * path is a subject of clipping or a part of the clipping polygon.
279
303
* @deprecated use {@link #addPolygonToClipper} instead.
280
304
*/
281
305
@ Deprecated
0 commit comments