/** * Appends a cubic Bezier curve to the current path. The curve shall extend from * the current point to the point <CODE>(x3, y3)</CODE> with the note that the (x3, y3) * point represents two control points. */ public void curveFromTo(float x1, float y1, float x3, float y3) { if (currentPoint == null) { throw new RuntimeException(START_PATH_ERR_MSG); } curveTo(x1, y1, x3, y3, x3, y3); }
/** * Appends a cubic Bezier curve to the current path. The curve shall extend from * the current point to the point <CODE>(x3, y3)</CODE> with the note that the current * point represents two control points. */ public void curveTo(float x2, float y2, float x3, float y3) { if (currentPoint == null) { throw new RuntimeException(START_PATH_ERR_MSG); } curveTo((float) currentPoint.getX(), (float) currentPoint.getY(), x2, y2, x3, y3); }
/** * {@inheritDoc} */ public void invoke(PdfCanvasProcessor processor, PdfLiteral operator, List<PdfObject> operands) { float x2 = ((PdfNumber) operands.get(0)).floatValue(); float y2 = ((PdfNumber) operands.get(1)).floatValue(); float x3 = ((PdfNumber) operands.get(2)).floatValue(); float y3 = ((PdfNumber) operands.get(3)).floatValue(); processor.currentPath.curveTo(x2, y2, x3, y3); } }
/** * {@inheritDoc} */ public void invoke(PdfCanvasProcessor processor, PdfLiteral operator, List<PdfObject> operands) { float x1 = ((PdfNumber) operands.get(0)).floatValue(); float y1 = ((PdfNumber) operands.get(1)).floatValue(); float x2 = ((PdfNumber) operands.get(2)).floatValue(); float y2 = ((PdfNumber) operands.get(3)).floatValue(); float x3 = ((PdfNumber) operands.get(4)).floatValue(); float y3 = ((PdfNumber) operands.get(5)).floatValue(); processor.currentPath.curveTo(x1, y1, x2, y2, x3, y3); } }