Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] drawPath method in AWTGraphics

> Sure lets do it.  Done :).  I also added fillPath().

Great!


>
>  On 7-May-08, at 12:05 PM, andrea antonello wrote:
>
>
> >
> >
> >
> > 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
> > _______________________________________________
> > User-friendly Desktop Internet GIS (uDig)
> > http://udig.refractions.net
> > http://lists.refractions.net/mailman/listinfo/udig-devel
> >
>
>  _______________________________________________
>  User-friendly Desktop Internet GIS (uDig)
>  http://udig.refractions.net
>  http://lists.refractions.net/mailman/listinfo/udig-devel
>


Back to the top