You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by wo...@free.fr on 2005/06/30 08:27:09 UTC

help me please

i want to do a clipping into a svg document and save this clipping in an another
svg document.
i can do svg to svg but do a clipping i can't arrive
Someone can help me, giving me a example

thanks ,PETER , wolfyp64@free.fr


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


Re: help me please

Posted by Thomas DeWeese <Th...@Kodak.com>.
Hi Peter,

wolfyp64@free.fr wrote:
> i want to do a clipping into a svg document and save this clipping in an another
> svg document.
> i can do svg to svg but do a clipping i can't arrive
> Someone can help me, giving me a example

    I think you should be able to simply use the Graphics2D.clip
call on the SVGGraphics2D instance.  This should 'clip' any
SVG element's that lie entirely outside the clip region.  However
it will not do "true" clipping to that rectangle.  So for example
if you had a detailed map of the US and you had zoomed in on a city.
Assuming each state was  drawn as a separate path.  This approach to
clipping should avoid including the outline of all the other states
but rather than "simplifying" the boundary of the shown state to a
simple rectangle (the only geometry needed to fill the visible region).
Also things like roads might trail 'off' the canvas quite a ways
rather than being truly clipped to the given rectangle.

    This may or may not help with your situation.

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