On 01/03/2012 12:41 AM, pielle wrote:
> this is my code:
>                       var PV = new svg.shape.Rect();
>                       var h = data['h'];
>                       var w = data['w'];
>                       PV.setId("PV_"+data['id']);
>                       PV.setWidth(w);
>                       PV.setHeight(h);
>                       PV.setX(parseInt(data['left']));
>                       PV.setY(parseInt(data['top']));
>                       PV.setFill('#0b0bbe');
> till here it's ok.
>
> Try to apply a rotation:
>                       var pvRot = new svg.coords.transform.Rotate(PV, 30, 
> 0,0);
> but nothing happens!!!.
>
> Any help is welcome.

Hi Pielle,

The transformations probably work a bit different from what you would
expect.

The first argument of Translate is an svg element, but it is not the
element that will be transformed. It's only needed when you use matrix
notation, which you most likely won't need. So in your case you can set
it to null.

The correct way to do what you want is as follows:

var pvRot = new svg.coords.transform.Translate(null, 100,100);
PV.setTransform(pvRot);

I hope this helps.

Regards,
Marc

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to