Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as JavaScript by sldkfjsduvjk ( 14 years ago )
this.rotate=function(angle)
{
var rad=Math.PI*angle/180;
var sin=Math.sin(rad);
var cos=Math.cos(rad);
//точка относительно которой вертим
var x0=this.transformX;
var y0=this.transformY;
//обходим все узлы
for(var i=0;i<this.points.length;i++)
{
//для каждого узла
with(this.points[i])
{
cp2x=cp1x=x=x0+(x-x0)*cos-(y-y0)*sin;
cp2y=cp1y=y=y0+(x-x0)*sin+(y-y0)*cos;
}
}
}
Revise this Paste