xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Danny Ayers" <danny...@virgilio.it>
Subject SVGGraphics2D & wonderpaths
Date Sat, 13 Apr 2002 20:59:26 GMT
Hi,

Sorry if I'm missing something obvious here (it's been a 13hr session), but
my code seems to have found a wonderfully awful algorithm for converting
from a simple GeneralPath into a <path/>.

The Java2D code goes like this :

path.moveTo(x - CROSS_WIDTH / 2, y - CROSS_HEIGHT / 2); // top left
path.lineTo(x + CROSS_WIDTH / 2, y + CROSS_HEIGHT / 2); // bottom right
path.moveTo(x - CROSS_WIDTH / 2, y + CROSS_HEIGHT / 2); // bottom left
path.lineTo(x + CROSS_WIDTH / 2, y - CROSS_HEIGHT / 2); // top right

An example of the SVG generated through SVGGraphics2D is at
http://www.isacat.net/svg/verbose.svg

Suggestions on general ways of getting this sensible and/or pointers to
related docs would be appreciated - e.g. am I still liable to get this stuff
using a couple of Line2Ds instead?

Cheers,
Danny.

---
Danny Ayers
<stuff> http://www.isacat.net </stuff>


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Mime
View raw message