public UPath toUPath() { final UPath result = new UPath(); boolean start = true; for (CubicCurve2D.Double bez : beziers) { if (start) { result.add(new double[] {bez.x1, bez.y1}, USegmentType.SEG_MOVETO); start = false; } result.add( new double[] {bez.ctrlx1, bez.ctrly1, bez.ctrlx2, bez.ctrly2, bez.x2, bez.y2}, USegmentType.SEG_CUBICTO); } return result; }
public void arcTo( double rx, double ry, double x_axis_rotation, double large_arc_flag, double sweep_flag, double x, double y) { add( new double[] {rx, ry, x_axis_rotation, large_arc_flag, sweep_flag, x, y}, USegmentType.SEG_ARCTO); // lineTo(x, y); }
public UPath getUPath(FontRenderContext frc) { final UPath result = new UPath(); final PathIterator path = getPathIteratorCharacter(frc); final double coord[] = new double[6]; while (path.isDone() == false) { final int code = path.currentSegment(coord); result.add(coord, USegmentType.getByCode(code)); path.next(); } return result; }
public void quadTo(double ctrlx, double ctrly, double x2, double y2) { add(new double[] {ctrlx, ctrly, ctrlx, ctrly, x2, y2}, USegmentType.SEG_CUBICTO); }
public void cubicTo( double ctrlx1, double ctrly1, double ctrlx2, double ctrly2, double x2, double y2) { add(new double[] {ctrlx1, ctrly1, ctrlx2, ctrly2, x2, y2}, USegmentType.SEG_CUBICTO); }
public void lineTo(double x, double y) { add(new double[] {x, y}, USegmentType.SEG_LINETO); }
public void moveTo(double x, double y) { add(new double[] {x, y}, USegmentType.SEG_MOVETO); }
public void arcTo(Point2D pt, double radius, double large_arc_flag, double sweep_flag) { add( new double[] {radius, radius, 0, large_arc_flag, sweep_flag, pt.getX(), pt.getY()}, USegmentType.SEG_ARCTO); // lineTo(x, y); }