Hi Philip,

"philip zuniga" <[EMAIL PROTECTED]> wrote on 05/11/2006 11:14:56 AM:

> A few days ago, I asked how I would be able to set the value of the 
scroll to 
> a certain value, and Thomas (the ever dependeble one), told me that I 
should 
> use the affine transform of the canvas, so, I added the following codes, 

> 
> (x is the value i want for the canvas)
> AffineTransform at = canvas.getRenderingTransform();
> AffineTransform t = AffineTransform.getTranslateInstance(x, 0);
> t.concatenate( at );
> canvas.setRenderingTransform( t );
>   and, ofcourse, what happened is that my canvas got translated x units, 
but 
> the scroll remained in its position. How would I make the horzontal 
scroll to 
> move to the value x?

   It should have moved when the canvas moved. It listens for 
GvtRenderingCompleted events (fired when the rendering transform changes)
and recalculates it's scrollbar positions.

> And another one, my Boss, wants me to create a functionality where I 
would 
> zoom the JSVGCanvas ( I also use the process similar above), but he want 
me to
> keep some of the SVG items in the canvas to remain static (not affected 
by 
> zooming), is this possible? 

   Steiner's answer on this is a pretty good one.
   The other option is to put the zoomy bits in a group
or SVG element and adjust the transform on that group/svg
element rather than adjusting the canvas's rendering transform...
Of course you loose the JSVGScrollPane that way.



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

Reply via email to