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 Jof Gronning <Jo...@Telus.com> on 2002/04/05 01:03:59 UTC

svg - Graphics Editor - How to manipulate screen objects?

 
I am in the process of developing a Graphics Editor and trying to find the
best way to
detect mouse events on the screen.

I need to implement functions such as:
Select, Move, Add, Delete, screen objects such as lines, circles etc.

1) Where can I put my Mouse listener (which object).

2) Is the best way to display from an svg file and then use 2D to manipulate
(Select, Move etc)
or is it better to go via DOM and manipulate the DOM tree.

This is not a Web application and will be running on Win2K.

I appreciate any help and suggestions you may have for me.. example source
code?

Regards



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


RE: svg - Graphics Editor - How to manipulate screen objects?

Posted by Thierry Kormann <tk...@ilog.fr>.
> I'm a little confused here - are you talking about drawing in a 
> browser, or
> a standalone Java app?

both.

Thierry.


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


RE: svg - Graphics Editor - How to manipulate screen objects?

Posted by Danny Ayers <da...@virgilio.it>.
I'm a little confused here - are you talking about drawing in a browser, or
a standalone Java app?

Danny.


>-----Original Message-----
>From: Thierry Kormann [mailto:tkormann@ilog.fr]
>Sent: 16 April 2002 09:54
>To: batik-dev@xml.apache.org
>Subject: RE: svg - Graphics Editor - How to manipulate screen objects?
>
>
>
>> I am in the process of developing a Graphics Editor and trying
>to find the
>> best way to
>> detect mouse events on the screen.
>>
>> I need to implement functions such as:
>> Select, Move, Add, Delete, screen objects such as lines, circles etc.
>>
>> 1) Where can I put my Mouse listener (which object).
>>
>> 2) Is the best way to display from an svg file and then use 2D to
>> manipulate
>> (Select, Move etc)
>> or is it better to go via DOM and manipulate the DOM tree.
>
>I would recommend to use the SVG DOM for your manipulation.
>
>The SVG DOM is our model and the repaint will work properly if you
>are using
>the DOM to manipulate your SVG content.
>
>For MouseEvent, use a regular DOM EventListener. In an authoring tool
>context, the capture phase might be really useful (provide a way
>to override
>the user behavior defined in the SVG document you are currently editing).
>
>Thierry.
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
>For additional commands, e-mail: batik-dev-help@xml.apache.org
>


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


RE: svg - Graphics Editor - How to manipulate screen objects?

Posted by Thierry Kormann <tk...@ilog.fr>.
> I am in the process of developing a Graphics Editor and trying to find the
> best way to
> detect mouse events on the screen.
>
> I need to implement functions such as:
> Select, Move, Add, Delete, screen objects such as lines, circles etc.
>
> 1) Where can I put my Mouse listener (which object).
>
> 2) Is the best way to display from an svg file and then use 2D to
> manipulate
> (Select, Move etc)
> or is it better to go via DOM and manipulate the DOM tree.

I would recommend to use the SVG DOM for your manipulation.

The SVG DOM is our model and the repaint will work properly if you are using
the DOM to manipulate your SVG content.

For MouseEvent, use a regular DOM EventListener. In an authoring tool
context, the capture phase might be really useful (provide a way to override
the user behavior defined in the SVG document you are currently editing).

Thierry.



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