|
|
|
|
| Component/s: |
EMF
|
| Affects Version/s: |
1.2.2
|
| Fix Version/s: |
2.0
|
|
|
Found a bug in the EMF output. And the fix is here.
java.lang.ArrayIndexOutOfBoundsException: 4
at org.freehep.graphicsio.emf.EMFGraphics2D.draw(EMFGraphics2D.java:323)
Source Code:
if (shape instanceof CubicCurve2D) {
CubicCurve2D curve = (CubicCurve2D)shape;
writePen((BasicStroke)getStroke(), getColor());
points[0].x = toUnit(curve.getX1());
points[0].y = toUnit(curve.getY1());
points[1].x = toUnit(curve.getCtrlX1());
points[1].y = toUnit(curve.getCtrlY1());
points[2].x = toUnit(curve.getCtrlX2());
points[2].y = toUnit(curve.getCtrlY2());
points[3].x = toUnit(curve.getX2());
points[4].y = toUnit(curve.getY2()); <----- Needs to be changed to 3 not 4.
os.writeTag(new PolyBezier(imageBounds, 4, points)); return;
}
|
|
Description
|
Found a bug in the EMF output. And the fix is here.
java.lang.ArrayIndexOutOfBoundsException: 4
at org.freehep.graphicsio.emf.EMFGraphics2D.draw(EMFGraphics2D.java:323)
Source Code:
if (shape instanceof CubicCurve2D) {
CubicCurve2D curve = (CubicCurve2D)shape;
writePen((BasicStroke)getStroke(), getColor());
points[0].x = toUnit(curve.getX1());
points[0].y = toUnit(curve.getY1());
points[1].x = toUnit(curve.getCtrlX1());
points[1].y = toUnit(curve.getCtrlY1());
points[2].x = toUnit(curve.getCtrlX2());
points[2].y = toUnit(curve.getCtrlY2());
points[3].x = toUnit(curve.getX2());
points[4].y = toUnit(curve.getY2()); <----- Needs to be changed to 3 not 4.
os.writeTag(new PolyBezier(imageBounds, 4, points)); return;
}
|
Show » |
|