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 Hocine Hamadi <sh...@yahoo.fr> on 2006/05/25 11:44:09 UTC

interaction with a group of severals JSVGCanvas

 Hello,
   
  I’m looking for solutions and advices about Batik.
   
  Actually, I’m loading a SVG file in a JSVGCanvas and it is rendered fine.
   
  OS : Windows XP Pro SP2 using eclipse V3.1 with Batik API
   
  But the thing is that I’m trying to use several SVG file and group them into the same object in order to Pan, rotate, Zoom them all together.
   
  For example: 
  -          I load a SVG map in a JSVGCanvas
  -          This JSVGCanvas is added to a JPanel
  -          I need to set several positions on this map with a cross image (svg, jpg ...)
  -          I want them to move, rotate, and zoom all together, not only the SVG map. Actually, the cross has to follow all the actions performed on the map.
   
   
  I don’t know which method to use to perform this.
   
  Here are some methods I thought about :
  - Create a JSVGCanvas for each cross image and add it to the JSVGCanvas map ?
  - Use only 1 Canvas for the map and add my crosses to it ?
   
   
  I look forward to hearing from you.
   
  Cheers.
 

Re : Re : interaction with a group of several JSVGCanvas

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

Hocine Hamadi <sh...@yahoo.fr> wrote on 05/26/2006 12:01:17 PM:

> ok nice, but if I add my jpeg files directly into the SVG file, I think 
there 
> will be a decrease of perfs, because in order to have a good display I 
will 
> have to refresh regularly the map and it takes "many times" to load a 
svg...

   If you set the canvas to be ALWAYS_DYNAMIC then you can modify the 
document's DOM directly (modifications must be done in the UpdateManager's
runnable queue thread - read FAQ). 

   When you add/modify the image element's the canvas will only 
re-render the modified portion of the display.

   Good luck!

> ----- Message d'origine ----
> De : Cameron McCormack <ca...@mcc.id.au>
> Ã? : batik-users@xmlgraphics.apache.org
> Envoyé le : Vendredi, 26 Mai 2006, 11h56mn 52s
> Objet : Re: Re : interaction with a group of severals JSVGCanvas

> Hi Hocine.
> 
> Hocine Hamadi:
> >  Wo do you mean by : "Certainly it would be easier to use the one 
> JSVGCanvas, and add your
> >   crosses into the SVG document"?
> > 
> >  Do I have to fill the SVG file (XML file) with the JPEG Cross? If 
true, how
> can I do that.
> 
> Yes.  You can add ?image? elements that refer to the JPEG file for every
> cross that you want displayed on your map.
> 
> -- 
> Cameron McCormack, http://mcc.id.au/
>     xmpp:heycam@jabber.org  ?  ICQ 26955922  ?  MSN cam@mcc.id.au
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


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


Re : Re : interaction with a group of severals JSVGCanvas

Posted by Hocine Hamadi <sh...@yahoo.fr>.
ok nice, but if I add my jpeg files directly into the SVG file, I think there will be a decrease of perfs, because in order to have a good display I will have to refresh regularly the map and it takes "many times" to load a svg...

----- Message d'origine ----
De : Cameron McCormack <ca...@mcc.id.au>
À : batik-users@xmlgraphics.apache.org
Envoyé le : Vendredi, 26 Mai 2006, 11h56mn 52s
Objet : Re: Re : interaction with a group of severals JSVGCanvas

Hi Hocine.

Hocine Hamadi:
>  Wo do you mean by : "Certainly it would be easier to use the one JSVGCanvas, and add your
>   crosses into the SVG document"?
>  
>  Do I have to fill the SVG file (XML file) with the JPEG Cross? If true, how can I do that.

Yes.  You can add ‘image’ elements that refer to the JPEG file for every
cross that you want displayed on your map.

-- 
Cameron McCormack, http://mcc.id.au/
    xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@mcc.id.au

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





Re: Re : interaction with a group of severals JSVGCanvas

Posted by Cameron McCormack <ca...@mcc.id.au>.
Hi Hocine.

Hocine Hamadi:
>  Wo do you mean by : "Certainly it would be easier to use the one JSVGCanvas, and add your
>   crosses into the SVG document"?
>  
>  Do I have to fill the SVG file (XML file) with the JPEG Cross? If true, how can I do that.

Yes.  You can add ‘image’ elements that refer to the JPEG file for every
cross that you want displayed on your map.

-- 
Cameron McCormack, http://mcc.id.au/
	xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@mcc.id.au

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


Re : interaction with a group of severals JSVGCanvas

Posted by Hocine Hamadi <sh...@yahoo.fr>.
Hi, thanks 
 
 
 
 Wo do you mean by : "Certainly it would be easier to use the one JSVGCanvas, and add your
  crosses into the SVG document"?
 
 Do I have to fill the SVG file (XML file) with the JPEG Cross? If true, how can I do that.
 
 Any advices?
 
 Regards.
 
 
 

----- Message d'origine ----
De : Cameron McCormack <ca...@mcc.id.au>
À : batik-users@xmlgraphics.apache.org
Envoyé le : Jeudi, 25 Mai 2006, 11h26mn 10s
Objet : Re: interaction with a group of severals JSVGCanvas

Hi Hocine.

Hocine Hamadi:
> But the thing is that I’m trying to use several SVG file and group
> them into the same object in order to Pan, rotate, Zoom them all
> together.
>
> For example: 
> - I load a SVG map in a JSVGCanvas
> - This JSVGCanvas is added to a JPanel
> - I need to set several positions on this map with a cross image
>   (svg, jpg ...)
> - I want them to move, rotate, and zoom all together, not only the
>   SVG map. Actually, the cross has to follow all the actions
>   performed on the map.
>    
> I don’t know which method to use to perform this.
>    
> Here are some methods I thought about :
> - Create a JSVGCanvas for each cross image and add it to the
>   JSVGCanvas map ?
> - Use only 1 Canvas for the map and add my crosses to it ?

Certainly it would be easier to use the one JSVGCanvas, and add your
crosses into the SVG document.  Then when the map is panned or zoomed,
the crosses will follow naturally.

-- 
Cameron McCormack, http://mcc.id.au/
    xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@mcc.id.au

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





Re: interaction with a group of severals JSVGCanvas

Posted by Cameron McCormack <ca...@mcc.id.au>.
Hi Hocine.

Hocine Hamadi:
> But the thing is that I’m trying to use several SVG file and group
> them into the same object in order to Pan, rotate, Zoom them all
> together.
>
> For example: 
> - I load a SVG map in a JSVGCanvas
> - This JSVGCanvas is added to a JPanel
> - I need to set several positions on this map with a cross image
>   (svg, jpg ...)
> - I want them to move, rotate, and zoom all together, not only the
>   SVG map. Actually, the cross has to follow all the actions
>   performed on the map.
>    
> I don’t know which method to use to perform this.
>    
> Here are some methods I thought about :
> - Create a JSVGCanvas for each cross image and add it to the
>   JSVGCanvas map ?
> - Use only 1 Canvas for the map and add my crosses to it ?

Certainly it would be easier to use the one JSVGCanvas, and add your
crosses into the SVG document.  Then when the map is panned or zoomed,
the crosses will follow naturally.

-- 
Cameron McCormack, http://mcc.id.au/
	xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@mcc.id.au

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