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 Shamjith K V <sh...@yahoo.co.uk> on 2006/07/03 09:23:36 UTC

Re: Problem in making a Horizontal Ruler for SVG Image -- Plz help

Dear Thomas,

Thankyou so much for your advice.
The scale is working fine. Yes it was in screen pixels.
I did it by getting the width through  rendering transform of
the JSVGCanvas, as you said.
And regarding the    JSVGComponent.setRecenterOnResize(false);  issue
it is still centering the image soon after it is rendered.
I have tried setRecenterOnResize(false) and then resizing the canvas using setBounds()  soon after the rendering  is completed, but it didnt work.
Can you suggest me a wayout.

Thanks and Regards,
Shamjith


thomas.deweese@kodak.com wrote: Hi Shamjith,

Shamjith K V  wrote on 06/14/2006 01:14:15 AM:

> I am trying to implement an svg viewer.
> I also want to display a horizontal ruler (the scale value can be in 
> centimeter or inch) for that viewer. 
> Some can anybody please tell me how to get the width of the svg image 
> dynamically upon zooming.

   The width of the document where?  In screen pixels?
   Depending on exactly what you want you basically need to project the
document width/height through the rendering transform of the Canvas
(getRenderingTransform).

> Also how to disable the centering of the rendered image before resize.
> Thanks and regards,

   JSVGComponent.setRecenterOnResize(false);


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



 		
---------------------------------
 All New Yahoo! Mail – Tired of Vi@gr@! come-ons? Let our SpamGuard protect you.

Re: Problem in making a Horizontal Ruler for SVG Image -- Plz help

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

Shamjith K V <sh...@yahoo.co.uk> wrote on 07/03/2006 03:23:36 AM:

> And regarding the JSVGComponent.setRecenterOnResize(false);  issue
> it is still centering the image soon after it is rendered.

   Perhaps we are misunderstanding what you mean by centering the
image on resize.  Can you describe in more detail what behavior you
are seeing that you don't like and what behavior you want to see?

> I have tried setRecenterOnResize(false) and then resizing the canvas 
using 
> setBounds()  soon after the rendering  is completed, but it didnt work.
> Can you suggest me a wayout.



> thomas.deweese@kodak.com wrote:
> Hi Shamjith,
> 
> Shamjith K V wrote on 06/14/2006 01:14:15 AM:
> 
> > I am trying to implement an svg viewer.
> > I also want to display a horizontal ruler (the scale value can be in 
> > centimeter or inch) for that viewer. 
> > Some can anybody please tell me how to get the width of the svg image 
> > dynamically upon zooming.
> 
> The width of the document where? In screen pixels?
> Depending on exactly what you want you basically need to project the
> document width/height through the rendering transform of the Canvas
> (getRenderingTransform).
> 
> > Also how to disable the centering of the rendered image before resize.
> > Thanks and regards,
> 
> JSVGComponent.setRecenterOnResize(false);
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgrraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org

> 
>  All New Yahoo! Mail ? Tired of Vi@gr@! come-ons? Let our SpamGuard 
protect you.

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