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 Tilo Behrmann <Be...@FastGmbh.de> on 2005/11/08 09:01:12 UTC

Painting in JSVGCanvas

Hi everybody,

i have one problem, i hope you can help me. I will draw a point in to the
SCGCanvas per mouse.
My problem is if i lode a SVG-file the Frame is smal then i rezise the Frame
to screen width and then if i paint a point into the the picture becomes
small and the drawing point lies outside of the picture.


to me possibly someone can say which my error is


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


Re: Painting in JSVGCanvas

Posted by th...@kodak.com.
Hi Tilo,

"Tilo Behrmann" <Be...@FastGmbh.de> wrote on 11/08/2005 03:01:12 AM:

> i have one problem, i hope you can help me. I will draw a point in to 
the
> SCGCanvas per mouse.
> My problem is if i lode a SVG-file the Frame is smal then i rezise the 
Frame
> to screen width and then if i paint a point into the the picture becomes
> small and the drawing point lies outside of the picture.

   I am sorry to say that I don't really follow the problem.
However, I would suggest two basic things, first look at 
getViewBoxTransform()
this will tell you the current mapping from the 'viewBox' of the
SVG document to the screen.

   Second you might want to look at overriding setMySize(Dimension d)
which would allow you to prevent the auto-resizing.

   I am unsure why/how the picture resizes when you draw.



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