Re: [svg-developers] problem regarding transform

2006-07-28 Thread Phi Tran
On 7/27/06, Haritos, James [EMAIL PROTECTED] wrote:


 Hi achio,
 I believe that you can use transform (matrix). The matrix command allows
 you
 to combine all transform commands on a single line. Read about it here:
 http://www.w3.org/TR/SVG/coords.html#TransformAttribute
 http://www.w3.org/TR/SVG/coords.html#TransformAttribute
 :-)

 -Original Message-
 From: svg-developers@yahoogroups.com 
 svg-developers%40yahoogroups.com[mailto:
 svg-developers@yahoogroups.com svg-developers%40yahoogroups.com]
 On Behalf Of achio_84
 Sent: Thursday, 27 July 2006 10:52 AM
 To: svg-developers@yahoogroups.com svg-developers%40yahoogroups.com
 Subject: [svg-developers] problem regarding transform

 Hi all...
 I would like to ask whether it is possible to combine transform (scale)
 and transform (translate) in 1 javascript statement?
 For example:

 shape1.setAttributeNS(null,transform,scale(+scaleLevel+));
 shape1.setAttributeNS(null,transform,translate
 (+positionx+,+positiony+));

 Is there a way to combine both statement stated above to become 1
 statement? Coz after I scale the shape, and translate it, the scale
 change to it default value again... I don't know why

 Regards,
 achio.


 Australia Post is committed to providing our customers with excellent
 service. If we can assist you in any way please telephone 13 13 18 or visit
 our website.

 The information contained in this e-mail communication may be proprietary,
 confidential or legally professionally privileged. It is intended
 exclusively for the individual or entity to which it is addressed. You
 should only read, disclose, re-transmit, copy, distribute, act in reliance
 on or commercialise the information if you are authorised to do so.
 Australia Post does not represent, warrant or guarantee the integrity of
 this e-mail communication has been maintained nor that the communication is
 free of errors, virus or interference.

 If you are not the addressee or intended recipient please notify us by
 replying direct to the sender and then destroy any electronic or paper copy
 of this message. Any views expressed in this e-mail communication are taken
 to be those of the individual sender, except where the sender specifically
 attributes those views to Australia Post and is authorised to do so.

 [Non-text portions of this message have been removed]

  




-- 
Phi - Tran
Hugely increase your speed, saving your band-width with ZipProtocol
plus crystal clear SVG Rendering image at
HTTP://oneplusplus.com


[Non-text portions of this message have been removed]



-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [svg-developers] problem regarding transform

2006-07-28 Thread ddailey
A perhaps easier way to do this is

 transform=translate(-100,-50),scale(1.5)

or in your case:

shape1.setAttributeNS(null,transform,translate(+positionx+,+positiony+),scale(+scaleLevel+));


The trick here is that the transformations are performed from right to left, 
so you may have to do some arithmetic to get things in the right place.

DD

 Hi achio,
 I believe that you can use transform (matrix). The matrix command allows 
 you
 to combine all transform commands on a single line. Read about it here:
 http://www.w3.org/TR/SVG/coords.html#TransformAttribute
 http://www.w3.org/TR/SVG/coords.html#TransformAttribute
 :-)

 Hi all...
 I would like to ask whether it is possible to combine transform (scale)
 and transform (translate) in 1 javascript statement?
 For example:

 shape1.setAttributeNS(null,transform,scale(+scaleLevel+));
 shape1.setAttributeNS(null,transform,translate
 (+positionx+,+positiony+));





-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





RE: [svg-developers] problem regarding transform

2006-07-27 Thread Haritos, James

Hi achio,
I believe that you can use transform (matrix). The matrix command allows you
to combine all transform commands on a single line. Read about it here:
http://www.w3.org/TR/SVG/coords.html#TransformAttribute
http://www.w3.org/TR/SVG/coords.html#TransformAttribute  
:-) 

-Original Message-
From: svg-developers@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of achio_84
Sent: Thursday, 27 July 2006 10:52 AM
To: svg-developers@yahoogroups.com
Subject: [svg-developers] problem regarding transform



Hi all...
I would like to ask whether it is possible to combine transform (scale) 
and transform (translate) in 1 javascript statement? 
For example:

shape1.setAttributeNS(null,transform,scale(+scaleLevel+));
shape1.setAttributeNS(null,transform,translate
(+positionx+,+positiony+));

Is there a way to combine both statement stated above to become 1 
statement? Coz after I scale the shape, and translate it, the scale 
change to it default value again... I don't know why

Regards,
achio.



 



Australia Post is committed to providing our customers with excellent service. 
If we can assist you in any way please telephone 13 13 18 or visit our website.

The information contained in this e-mail communication may be proprietary, 
confidential or legally professionally privileged.  It is intended exclusively 
for the individual or entity to which it is addressed. You should only read, 
disclose, re-transmit, copy, distribute, act in reliance on or commercialise 
the information if you are authorised to do so. Australia Post does not 
represent, warrant or guarantee the integrity of this e-mail communication has 
been maintained nor that the communication is free of errors, virus or 
interference. 

If you are not the addressee or intended recipient please notify us by replying 
direct to the sender and then destroy any electronic or paper copy of this 
message. Any views expressed in this e-mail communication are taken to be those 
of the individual sender, except where the sender specifically attributes those 
views to Australia Post and is authorised to do so.

[Non-text portions of this message have been removed]



-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[svg-developers] problem regarding transform

2006-07-26 Thread achio_84
Hi all...
I would like to ask whether it is possible to combine transform (scale) 
and transform (translate) in 1 javascript statement? 
For example:

shape1.setAttributeNS(null,transform,scale(+scaleLevel+));
shape1.setAttributeNS(null,transform,translate
(+positionx+,+positiony+));

Is there a way to combine both statement stated above to become 1 
statement? Coz after I scale the shape, and translate it, the scale 
change to it default value again... I don't know why

Regards,
achio.





-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [svg-developers] problem regarding transform

2006-07-26 Thread Phi Tran
On 7/26/06, achio_84 [EMAIL PROTECTED] wrote:

   Hi all...
 I would like to ask whether it is possible to combine transform (scale)
 and transform (translate) in 1 javascript statement?
 For example:

 shape1.setAttributeNS(null,transform,scale(+scaleLevel+));
 shape1.setAttributeNS(null,transform,translate
 (+positionx+,+positiony+));




Is there a way to combine both statement stated above to become 1
 statement? Coz after I scale the shape, and translate it, the scale
 change to it default value again... I don't know why

 Regards,
 achio.

  




-- 
Phi - Tran
Hugely increase your speed, saving your band-width with ZipProtocol
plus crystal clear SVG Rendering image at
HTTP://oneplusplus.com


[Non-text portions of this message have been removed]



-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





RE: [svg-developers] problem regarding transform

2006-07-26 Thread Doug Schepers
Hi, achio-

achio_84 wrote:
| 
| Hi all...
| I would like to ask whether it is possible to combine 
| transform (scale) 
| and transform (translate) in 1 javascript statement? 
| For example:
| 
| shape1.setAttributeNS(null,transform,scale(+scaleLevel+));
| shape1.setAttributeNS(null,transform,translate
| (+positionx+,+positiony+));
| 
| Is there a way to combine both statement stated above to become 1 
| statement? Coz after I scale the shape, and translate it, the scale 
| change to it default value again... I don't know why

An attribute value is a string, not a function. Thus, in order to have both
transformations active, you must concatenate them.  

shape1.setAttributeNS(null, transform,scale(+scaleLevel+)
translate(+positionx+,+positiony+));

or, to make it a little more managable 

var transformStr = scale(+scaleLevel+)
translate(+positionx+,+positiony+);
shape1.setAttributeNS(null, transform, transformStr);

These will both end up as e.g.:
circle cx=5 cy=55 r=20 transform=scale(2) translate(100,30) /


Note that you will get different results depending on the order of these
transform commands.  If translate is after scale, you will multiply the
parameters of translate by the parameters of the scale (e.g. in the above
example, it would be the equivalent of doubling the translate parameters, or
the same as saying transform=translate(200,60) scale(2)).

Regards-
Doug



-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





RE: [svg-developers] problem regarding transform

2006-07-26 Thread Haritos, James

Hi achio,
I believe that you can use transform (matrix). The matrix command allows you
to combine all transform commands on a single line. Read about it here:
http://www.w3.org/TR/SVG/coords.html#TransformAttribute
http://www.w3.org/TR/SVG/coords.html#TransformAttribute  
:-) 

-Original Message-
From: svg-developers@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of Doug Schepers
Sent: Thursday, 27 July 2006 12:32 PM
To: svg-developers@yahoogroups.com
Subject: RE: [svg-developers] problem regarding transform



Hi, achio-

achio_84 wrote:
| 
| Hi all...
| I would like to ask whether it is possible to combine 
| transform (scale) 
| and transform (translate) in 1 javascript statement? 
| For example:
| 
| shape1.setAttributeNS(null,transform,scale(+scaleLevel+));
| shape1.setAttributeNS(null,transform,translate
| (+positionx+,+positiony+));
| 
| Is there a way to combine both statement stated above to become 1 
| statement? Coz after I scale the shape, and translate it, the scale 
| change to it default value again... I don't know why

An attribute value is a string, not a function. Thus, in order to have both
transformations active, you must concatenate them. 

shape1.setAttributeNS(null, transform,scale(+scaleLevel+)
translate(+positionx+,+positiony+));

or, to make it a little more managable 

var transformStr = scale(+scaleLevel+)
translate(+positionx+,+positiony+);
shape1.setAttributeNS(null, transform, transformStr);

These will both end up as e.g.:
circle cx=5 cy=55 r=20 transform=scale(2) translate(100,30) /

Note that you will get different results depending on the order of these
transform commands. If translate is after scale, you will multiply the
parameters of translate by the parameters of the scale (e.g. in the above
example, it would be the equivalent of doubling the translate parameters, or
the same as saying transform=translate(200,60) scale(2)).

Regards-
Doug



 



Australia Post is committed to providing our customers with excellent service. 
If we can assist you in any way please telephone 13 13 18 or visit our website.

The information contained in this e-mail communication may be proprietary, 
confidential or legally professionally privileged.  It is intended exclusively 
for the individual or entity to which it is addressed. You should only read, 
disclose, re-transmit, copy, distribute, act in reliance on or commercialise 
the information if you are authorised to do so. Australia Post does not 
represent, warrant or guarantee the integrity of this e-mail communication has 
been maintained nor that the communication is free of errors, virus or 
interference. 

If you are not the addressee or intended recipient please notify us by replying 
direct to the sender and then destroy any electronic or paper copy of this 
message. Any views expressed in this e-mail communication are taken to be those 
of the individual sender, except where the sender specifically attributes those 
views to Australia Post and is authorised to do so.

[Non-text portions of this message have been removed]



-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/