xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edison Too" <edison...@yahoo.com.sg>
Subject RE: Modified Stroke
Date Sun, 22 Jul 2001 07:01:04 GMT
Hi,

I'm not sure if this will answer your question cos' I may not understand
your question very well.

If you are using GraphicsNode, it does not work in the same way as using
java.awt.Graphics to draw a Shape. That is why there is no such this as the
'current' stroke. You have to set the stroke of the GraphicsNode and that
will be used each time it is painted. You can do this in the following way.

If your shape has an outline, but no fill, create a new StrokeShapePainter
and call the ShapeNode's SetShapePainter() with this FillShapePainter. You
can specify the stroke and paint of the stroke in the Constructor.

If your shape has only fill, no outline, use FillShapePainter.

If your shape has both fill and outline, create one each of
StrokeShapePainter and FillShapePainter. Create a CompositeShapePainter and
use AddShapePainter() to add both to it. Then set the ShapeNode to use the
CompositeShapePainter.

Hope this answers your question.

Cheers,
Edison

> -----Original Message-----
> From: Eli Gordon [mailto:eli_gordon@hotmail.com]
> Sent: Saturday, July 21, 2001 2:29 AM
> To: batik-users@xml.apache.org
> Subject: Modified Stroke
>
>
> I don't know whether this is normal behaviour or not, but I've run into a
> problem with GraphicsNode's paint() method not preserving my Graphic's
> current Stroke. I've worked around it by just saving the stroke and
> re-applying it when the paint() method is finished, but it seems
> to me that
> the GraphicsNode should handle that internally.
>
> Thanks,
>
> -Eli


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------------------------------------------------
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