ClipperBridge { public static IClipper.EndType getEndType(int lineCapStyle) { switch (lineCapStyle) { case PdfCanvasConstants.LineCapStyle.BUTT: return IClipper.EndType.OPEN_BUTT; case PdfCanvasConstants.LineCapStyle.PROJECTING_SQUARE: return IClipper.EndType.OPEN_SQUARE; } return IClipper.EndType.OPEN_ROUND; }  static com.itextpdf.kernel.geom.Path convertToPath(PolyTree result); static void addPath(IClipper clipper, com.itextpdf.kernel.geom.Path path, IClipper.PolyType polyType); static List<Subpath> addPath(ClipperOffset offset, com.itextpdf.kernel.geom.Path path, IClipper.JoinType joinType, IClipper.EndType endType); static List<com.itextpdf.kernel.geom.Point> convertToFloatPoints(List<Point.LongPoint> points); static List<Point.LongPoint> convertToLongPoints(List<com.itextpdf.kernel.geom.Point> points); static IClipper.JoinType getJoinType(int lineJoinStyle); static IClipper.EndType getEndType(int lineCapStyle); static IClipper.PolyFillType getFillType(int fillingRule); static boolean addPolygonToClipper(IClipper clipper, com.itextpdf.kernel.geom.Point[] polyVertices, IClipper.PolyType polyType); static boolean addPolylineSubjectToClipper(IClipper clipper, com.itextpdf.kernel.geom.Point[] lineVertices); @Deprecated static void addRectToClipper(IClipper clipper, com.itextpdf.kernel.geom.Point[] rectVertices, IClipper.PolyType polyType); static double floatMultiplier; }
@Test public void getEndTypeTest() { Assert.assertEquals(EndType.OPEN_BUTT, ClipperBridge.getEndType(LineCapStyle.BUTT)); Assert.assertEquals(EndType.OPEN_SQUARE, ClipperBridge.getEndType(LineCapStyle.PROJECTING_SQUARE)); Assert.assertEquals(EndType.OPEN_ROUND, ClipperBridge.getEndType(LineCapStyle.ROUND)); }