For saving and loading, I've managed to write the file properly.  I've
also managed to load the XML as a Document, but I can't cast it to an
SVGDocument.  How do I get an SVGDocument in memory that I can then set
on the JSVGCanvas?

Michael Bishop

-----Original Message-----
From: Thomas DeWeese [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 15, 2005 2:48 PM
To: [email protected]
Subject: Re: Basic SVG management in Batik with white-boarding.

Hi Michael,

Bishop, Michael W. CONTR J9C880 wrote:
> I omit the fill attributes, but my shapes (Ellipses and Rectangles)
are
> being filled with the stroke color.  At least I think so.  The
> background of the canvas is white and the default stroke color is
black.
> When I draw with black, I get a filled-in black rectangle.  If I
change
> the stroke color to red, I get a red rectangle that's filled in with
> black:

    In SVG the default fill is 'black', and the default stroke is
'none'.
You should set 'fill="none"' on the root SVG element if you don't
want your elements filled by default (or you can set it to 'white'
if you want them filled with white - which will look similar on
screen, but may be more the 'intent' of the drawing).

> <rect x="141" y="97" width="191" height="136" stroke="red"
> stroke-opacity="1"></rect>
> 
> Maybe the JSVGCanvas has a white background but the document uses
black
> by default?  Where can you set the background of a document?  Getting
> awfully close here!


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to