[udig-devel] drawPath method in AWTGraphics
andrea antonello
andrea.antonello at gmail.com
Wed May 7 03:05:23 PDT 2008
Hi, in AWTGraphics the method drawPath is not supported.
I added and tested it. Since it is a mini-change, would it be possible
to add it to the current rc?
I would also like to know if anyone knows a better way to handle this,
I couldn't think of a better one. The points have to get out of the
SWT Path and into the AWT Path, so... advices welcome:
public void drawPath(Path path) {
PathData pathData = path.getPathData();
float[] points = pathData.points;
GeneralPath p = new GeneralPath();
p.moveTo(points[0], points[1]);
for (int i = 2; i < points.length; i = i + 2) {
p.lineTo(points[i], points[i + 1]);
}
g.draw(p);
}
Ciao
Andrea
More information about the udig-devel
mailing list