bernhard: thuban/Extensions/svgexport/test test_svgmapwriter.py, 1.9, 1.10
Bernhard Reiter
bernhard at intevation.de
Tue Dec 7 12:49:16 CET 2004
On Tue, Dec 07, 2004 at 12:44:59PM +0100, Bernhard Reiter wrote:
> On Tue, Dec 07, 2004 at 12:37:52PM +0100, Bernhard Herzog wrote:
> > cvs at intevation.de writes:
> >
> > > + def test_drawbezier(self):
> > > + '''Test DrawSpline (which actually draws bezier curves).'''
> > > + data = ('<path style="stroke-linejoin:round; stroke:#ff00ff; '
> > > + 'stroke-width:3; stroke-linecap:round; fill:none" '
> > > + 'meta="Object:test; Label:nothing" d="M 10 10 '
> > > + 'C 15 12 15 8.0 20 10"/>')
> > > + dc.DrawSpline([ Point(10, 10),
> > > + Point(15, 12),
> > > + Point(15, 8.0),
> > > + Point(20, 10) ])
> >
> > Looking at the DrawSpline code in wxWidgets, it seems that the
> > coordinates of the spline do not translate directly to the coordinates
> > of the control points of a cubic bezier curve as you assume here.
>
> Ah, thanks for noticing this.
> So it is broken until I understand this better and can fix it.
>
> > Rather a cubic bezier curve derived in some other fashion from the
> > parameters to DrawSpline. The docs say that the algorithm was taken
> > from XFig, so I'd assume it's what XFig <= 3.1 calls interpolated
> > splines.
The wx docs also say that
DrawSpline takes only three coordinates, but
Thuban/UI/classifier.py gives four arguments.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20041207/7a654748/attachment.bin
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)