@@ -94,6 +94,16 @@ public class ClipperBridge {
94
94
/// <see cref="iText.Kernel.Geom.Path"/>
95
95
/// object.
96
96
/// </summary>
97
+ /// <param name="result">
98
+ ///
99
+ /// <see cref="PolyTree"/>
100
+ /// object to convert
101
+ /// </param>
102
+ /// <returns>
103
+ /// resultant
104
+ /// <see cref="iText.Kernel.Geom.Path"/>
105
+ /// object
106
+ /// </returns>
97
107
public static Path ConvertToPath ( PolyTree result ) {
98
108
Path path = new Path ( ) ;
99
109
PolyNode node = result . GetFirst ( ) ;
@@ -145,6 +155,44 @@ public static void AddPath(Clipper clipper, Path path, PolyType polyType) {
145
155
/// object with one
146
156
/// note: it doesn't add degenerate subpaths.
147
157
/// </summary>
158
+ /// <param name="offset">
159
+ /// the
160
+ /// <see cref="ClipperOffset"/>
161
+ /// object to add all iText
162
+ /// <see cref="iText.Kernel.Geom.Subpath"/>
163
+ /// s that are not degenerated.
164
+ /// </param>
165
+ /// <param name="path">
166
+ ///
167
+ /// <see cref="iText.Kernel.Geom.Path"/>
168
+ /// object, containing the required
169
+ /// <see cref="iText.Kernel.Geom.Subpath"/>
170
+ /// s
171
+ /// </param>
172
+ /// <param name="joinType">
173
+ ///
174
+ /// <see cref="Clipper"/>
175
+ /// join type. The value could be
176
+ /// <see cref="JoinType.BEVEL"/>
177
+ /// ,
178
+ /// <see cref="JoinType.ROUND"/>
179
+ /// ,
180
+ /// <see cref="JoinType.MITER"/>
181
+ /// </param>
182
+ /// <param name="endType">
183
+ ///
184
+ /// <see cref="Clipper"/>
185
+ /// end type. The value could be
186
+ /// <see cref="EndType.CLOSED_POLYGON"/>
187
+ /// ,
188
+ /// <see cref="EndType.CLOSED_LINE"/>
189
+ /// ,
190
+ /// <see cref="EndType.OPEN_BUTT"/>
191
+ /// ,
192
+ /// <see cref="EndType.OPEN_SQUARE"/>
193
+ /// ,
194
+ /// <see cref="EndType.OPEN_ROUND"/>
195
+ /// </param>
148
196
/// <returns>
149
197
///
150
198
/// <see cref="System.Collections.IList{E}"/>
@@ -182,6 +230,16 @@ public static IList<Subpath> AddPath(ClipperOffset offset, Path path, JoinType j
182
230
/// <see cref="iText.Kernel.Geom.Point"/>
183
231
/// objects.
184
232
/// </summary>
233
+ /// <param name="points">
234
+ /// the list of
235
+ /// <see cref="IntPoint"/>
236
+ /// objects to convert
237
+ /// </param>
238
+ /// <returns>
239
+ /// the resultant list of
240
+ /// <see cref="iText.Kernel.Geom.Point"/>
241
+ /// objects.
242
+ /// </returns>
185
243
public static IList < Point > ConvertToFloatPoints ( IList < IntPoint > points ) {
186
244
IList < Point > convertedPoints = new List < Point > ( points . Count ) ;
187
245
foreach ( IntPoint point in points ) {
@@ -197,6 +255,16 @@ public static IList<Point> ConvertToFloatPoints(IList<IntPoint> points) {
197
255
/// <see cref="IntPoint"/>
198
256
/// objects.
199
257
/// </summary>
258
+ /// <param name="points">
259
+ /// the list of
260
+ /// <see cref="iText.Kernel.Geom.Point"/>
261
+ /// objects to convert
262
+ /// </param>
263
+ /// <returns>
264
+ /// the resultant list of
265
+ /// <see cref="IntPoint"/>
266
+ /// objects.
267
+ /// </returns>
200
268
public static IList < IntPoint > ConvertToLongPoints ( IList < Point > points ) {
201
269
IList < IntPoint > convertedPoints = new List < IntPoint > ( points . Count ) ;
202
270
foreach ( Point point in points ) {
@@ -382,6 +450,35 @@ internal static void AddContour(Path path, IList<IntPoint> contour, bool close)
382
450
}
383
451
}
384
452
453
+ /// <summary>
454
+ /// Adds rectangle path based on array of
455
+ /// <see cref="iText.Kernel.Geom.Point"/>
456
+ /// (internally converting
457
+ /// them by
458
+ /// <see cref="ConvertToLongPoints(System.Collections.Generic.IList{E})"/>
459
+ /// ) and adds this path to
460
+ /// <see cref="Clipper"/>
461
+ /// instance.
462
+ /// </summary>
463
+ /// <param name="clipper">
464
+ ///
465
+ /// <see cref="Clipper"/>
466
+ /// instance to which the created rectangle path will be added.
467
+ /// </param>
468
+ /// <param name="rectVertices">
469
+ /// an array of
470
+ /// <see cref="iText.Kernel.Geom.Point"/>
471
+ /// which will be internally converted
472
+ /// to clipper path and added to the clipper instance.
473
+ /// </param>
474
+ /// <param name="polyType">
475
+ /// either
476
+ /// <see cref="PolyType.SUBJECT"/>
477
+ /// or
478
+ /// <see cref="PolyType.CLIP"/>
479
+ /// denoting whether added
480
+ /// path is a subject of clipping or a part of the clipping polygon.
481
+ /// </param>
385
482
[ System . ObsoleteAttribute ( @"use AddPolygonToClipper(Clipper, iText.Kernel.Geom.Point[], PolyType) instead."
386
483
) ]
387
484
public static void AddRectToClipper ( Clipper clipper , Point [ ] rectVertices , PolyType polyType ) {
0 commit comments