Hi Selva,

Selva <[EMAIL PROTECTED]> wrote on 09/18/2006 01:10:56 AM:

> >   It looks to me like your calculation of the zoomOut transform is
> > wrong (it always goes to the top/left corner).  This doesn't appear 
> > to be a problem with the scrollbars, just your calculation of how
> > to update the rendering transform.

> But after changed like this, i am zooming out the document to large 
scale.
> After that i am moving the horizontal and vertical scroll bars to left 
and
> bottom corners. Now if i tried to zoom out using "zoomout" button, 
document
> translation is not proper. ScrollBars are supposed to stay in left and
> bottom corners and document must display the corresponding translated
> document. But here it is not translating properly. 

   But this is just a problem with your calculation of rendering 
transform.

> This is zooming out only the viewable portion not at all translating the
> document based on the zoomed out size. 

   Right because a zoom w/o any translate keeps the upper left hand corner
'pinned' so when you zoom out your upper left corner stays the same but
the amount across and down increases so it now shows content past the
old right and bottom edges.

> If i change the scroll bar position,
> i can able to view the proper document which i supposed to view. This
> problem is happening with the following code as well which is in 
JSVGCanvas.

   Sure but the JSVGCanvas doesn't make any attempt to limit viewing to 
the viewBox.  That is the default view but if you want to pan beyond 
that, go ahead.  The JSVGScrollPane is designed to allow this as well
(the scroll bars won't let you go outside of the viewBox (it's against 
the design of scrollbars) but if you find yourself outside the viewbox 
the scrollbars will still work).

> Please let me know if i didn't give enough information about my problem 
and
> how to calculate the translate transform for zoomout. 

   It sounds like you have requirements that are specific to your 
application that is using Batik.  It is important to separate problems
with your application from problems with Batik.  Nothing I have seen
indicates a problem with any component of Batik.

   I would suggest that you check the results of your updated transform
to see if the right/bottom edge of the viewBox lies within the displayed
area of the canvas.  If so you should translate the rendering transform
until the right and bottom edge of the viewBox is aligned with the
right and bottom edge of the canvas.  The JSVGScrollPane has the code
to map the viewBox to screen coords to make this check (take a look
at setScrollPosition and/or resizeScrollBars).


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to