Point2D last = path.getCurrentPoint(); double x0 = last.getX(); double y0 = last.getY();
@Override public void execute(Path2D.Double path, Context ctx){ double rx = ctx.getValue(wr); double ry = ctx.getValue(hr); double ooStart = ctx.getValue(stAng) / OOXML_DEGREE; double ooExtent = ctx.getValue(swAng) / OOXML_DEGREE; // skew the angles for AWT output double awtStart = convertOoxml2AwtAngle(ooStart, rx, ry); double awtSweep = convertOoxml2AwtAngle(ooStart+ooExtent, rx, ry)-awtStart; // calculate the inverse angle - taken from the (reversed) preset definition double radStart = Math.toRadians(ooStart); double invStart = Math.atan2(rx * Math.sin(radStart), ry * Math.cos(radStart)); Point2D pt = path.getCurrentPoint(); // calculate top/left corner double x0 = pt.getX() - rx * Math.cos(invStart) - rx; double y0 = pt.getY() - ry * Math.sin(invStart) - ry; Arc2D arc = new Arc2D.Double(x0, y0, 2 * rx, 2 * ry, awtStart, awtSweep, Arc2D.OPEN); path.append(arc, true); }
return; Point2D last = path.getCurrentPoint();
return; Point2D last = path.getCurrentPoint();
Point2D last = path.getCurrentPoint(); double x0 = last.getX(); double y0 = last.getY();
public void addToPath(java.awt.geom.Path2D.Double path, XDGFShape parent) { Point2D last = path.getCurrentPoint();
return; Point2D last = path.getCurrentPoint();
@Override public void execute(Path2D.Double path, Context ctx){ double rx = ctx.getValue(wr); double ry = ctx.getValue(hr); double ooStart = ctx.getValue(stAng) / OOXML_DEGREE; double ooExtent = ctx.getValue(swAng) / OOXML_DEGREE; // skew the angles for AWT output double awtStart = convertOoxml2AwtAngle(ooStart, rx, ry); double awtSweep = convertOoxml2AwtAngle(ooStart+ooExtent, rx, ry)-awtStart; // calculate the inverse angle - taken from the (reversed) preset definition double radStart = Math.toRadians(ooStart); double invStart = Math.atan2(rx * Math.sin(radStart), ry * Math.cos(radStart)); Point2D pt = path.getCurrentPoint(); // calculate top/left corner double x0 = pt.getX() - rx * Math.cos(invStart) - rx; double y0 = pt.getY() - ry * Math.sin(invStart) - ry; Arc2D arc = new Arc2D.Double(x0, y0, 2 * rx, 2 * ry, awtStart, awtSweep, Arc2D.OPEN); path.append(arc, true); }
return; Point2D last = path.getCurrentPoint();
public void addToPath(java.awt.geom.Path2D.Double path, XDGFShape parent) { Point2D last = path.getCurrentPoint();