You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Alice Cavallo <me...@media.mit.edu> on 2004/10/15 20:01:20 UTC
Drawing in a JSVGCanvas
Hello all,
I created one class that extends JSVGCanvas in order to trace an SVG
image displayed on the canvas.
I have created my own PaintComponent and other paint methods. It is
not working. The LoadSVGCanvas that I wrote is doing nothing at the
movement of the mouse. Basically I replicated what I had implemented
for a regular class that extends JPanel.
Am I using the wrong class? Is there any other JSVG* class that should
be used for the purpose of loading an image and also drawing on top of it?
Thank you so much,
Alice
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org
Re: Drawing in a JSVGCanvas
Posted by Tonny Kohar <to...@kiyut.com>.
Hi,
> I created one class that extends JSVGCanvas in order to trace an SVG
> image displayed on the canvas.
>
> I have created my own PaintComponent and other paint methods. It is
> not working. The LoadSVGCanvas that I wrote is doing nothing at the
> movement of the mouse. Basically I replicated what I had implemented
> for a regular class that extends JPanel.
Did you register the mouse with the component through mouseListener?
> Am I using the wrong class? Is there any other JSVG* class that should
> be used for the purpose of loading an image and also drawing on top of it?
I think JSVGCanvas is fine. However, there is parent Object of
JSVGCanvas if you might interest:
- JSVGComponent
- JGVTComponent
Regards
Tonny Kohar
--
Sketsa
SVG Graphics Editor
http://www.kiyut.com
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org
Re: Drawing in a JSVGCanvas
Posted by Thomas DeWeese <Th...@Kodak.com>.
Alice Cavallo wrote:
> I created one class that extends JSVGCanvas in order to trace an SVG
> image displayed on the canvas.
>
> I have created my own PaintComponent and other paint methods. It is
> not working.
What's not working, your method isn't called, you don't see
your drawing, it doesn't compile?
> The LoadSVGCanvas that I wrote is doing nothing at the
> movement of the mouse.
Why are you loading the canvas on mouse move?
> Basically I replicated what I had implemented
> for a regular class that extends JPanel.
My first guess would be you are drawing before the SVG
content is drawn rather than after.
> Am I using the wrong class? Is there any other JSVG* class that should
> be used for the purpose of loading an image and also drawing on top of it?
No I think you are using the correct class, but I suspect that you
are not overriding the methods properly.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org