public class ClipperBridge extends Object
For example:
PolyTree
to Path
Point
to Point.LongPoint
Point.LongPoint
to Point
Modifier and Type | Field and Description |
---|---|
static double |
floatMultiplier
Since the clipper library uses integer coordinates, we should convert our floating point numbers into fixed point numbers by multiplying by this coefficient.
|
Constructor and Description |
---|
ClipperBridge() |
Modifier and Type | Method and Description |
---|---|
static void |
addContour(Path path, List<Point.LongPoint> contour, Boolean close)
Deprecated.
close will be
boolean . Visibility will be changed to internal.
|
static List<Subpath> |
addPath(ClipperOffset offset, Path path, IClipper.JoinType joinType, IClipper.EndType endType)
Adds all iText Subpath s of the iText Path to the ClipperOffset object with one note: it doesn't add degenerate subpaths.
|
static void |
addPath(IClipper clipper, Path path, IClipper.PolyType polyType)
|
static void |
addRectToClipper(IClipper clipper, Point[] rectVertices, IClipper.PolyType polyType) |
static List<Point> |
convertToFloatPoints(List<Point.LongPoint> points)
Converts list of Point.LongPoint objects into list of Point objects.
|
static List<Point.LongPoint> |
convertToLongPoints(List<Point> points)
Converts list of Point objects into list of Point.LongPoint objects.
|
static Path |
convertToPath(PolyTree result)
|
static IClipper.EndType |
getEndType(int lineCapStyle)
Converts iText line cap style constant into the corresponding constant of the Clipper library.
|
static IClipper.PolyFillType |
getFillType(int fillingRule)
Converts iText filling rule constant into the corresponding constant of the Clipper library .
|
static IClipper.JoinType |
getJoinType(int lineJoinStyle)
Converts iText line join style constant into the corresponding constant of the Clipper library.
|
public static double floatMultiplier
public static void addPath(IClipper clipper, Path path, IClipper.PolyType polyType)
clipper
- The IClipper
object.
path
- The Path
object to be added to the IClipper
.
polyType
- See IClipper.PolyType
.
public static List<Subpath> addPath(ClipperOffset offset, Path path, IClipper.JoinType joinType, IClipper.EndType endType)
Subpath
s of the iText Path
to the ClipperOffset
object with one note: it doesn't add degenerate subpaths.
public static List<Point> convertToFloatPoints(List<Point.LongPoint> points)
Point.LongPoint
objects into list of Point
objects.
public static List<Point.LongPoint> convertToLongPoints(List<Point> points)
Point
objects into list of Point.LongPoint
objects.
public static IClipper.JoinType getJoinType(int lineJoinStyle)
lineJoinStyle
- iText line join style constant. See PdfCanvasConstants
public static IClipper.EndType getEndType(int lineCapStyle)
lineCapStyle
- iText line cap style constant. See PdfCanvasConstants
public static IClipper.PolyFillType getFillType(int fillingRule)
fillingRule
- Either PdfCanvasConstants.FillingRule.NONZERO_WINDING
or PdfCanvasConstants.FillingRule.EVEN_ODD
.
@Deprecated public static void addContour(Path path, List<Point.LongPoint> contour, Boolean close)
boolean
. Visibility will be changed to internal.
public static void addRectToClipper(IClipper clipper, Point[] rectVertices, IClipper.PolyType polyType)
Copyright © 1998–2016 iText Group NV. All rights reserved.