Dmitrij Sakara wrote:
I am also preferring the second solution. Thank you for the idea about a huge background element. But in this case I have some other things that complicates my life. I would like to draw some special symbols (like selection rectangles etc.) on the screen during the drag. It is very nice and easy to add them temporary to the document, but in the case of zoomed image, they looks really ugly (the width of lines is zoomed of course). I need to protect these elements (at least stroke in the style attribute) against zoom. I have no idea how to do this.
You can't protect the elements from zoom, you can 'counter' the effect of zoom by putting the elements in a group and then put an inverse transform on the group. Some things from the SVG DOM like getTransformToElement are very helpful here.
In same time, I can realize drawing of these symbols in the paintComponent method of the JCanvas and in this situation the first solution may be a good option.
Tonny makes a good point that for performance reasons there are significant advantages to doing your drawing in paintComponent because the SVG content will be repainted from an offscreen bitmap rather than having to render the entire document under any modified area.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]