Hi Philipp,
I actually get the same
effect when I try to transform the whole group by just scaling the <g>
tag.
When I go through the
list of child elements and scale one by one I don’t get the effect. But I
really think that scaling the group through the <g> tag would be more
efficient…
Dominik Steiner
Dipl-Ing. Informationstechnik (BA)
GIGATRONIK
Gesellschaft für Automobil-
elektronikentwicklung mbH
Taunusstr. 21
80807 München
Telefon +49 (0) 89 / 353 96 80-70
Telefax +49 (0) 89 / 353 96 80-99
mailto:[EMAIL PROTECTED]
www.gigatronik.com
Von: philip zuniga
[mailto:[EMAIL PROTECTED]
Gesendet: Montag, 15. Mai 2006
06:47
An: [email protected]
Betreff: Re: Some questions on the
JSVGScrollPane
Yes, they were both good suggestions. the next question is when I zoom
the canvas, the objects that i want to remain static are not affected by the
zooming but, they move, this is caused by the zooming of the canvas, but how
would I offset the movement of the items?
On 5/13/06, [EMAIL PROTECTED]
<[EMAIL PROTECTED] >
wrote:
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]