p.p1.x= (int) (Math.cos(Math.PI/2)* ( p.p1.x - p.p1.x ) - Math.sin(Math.PI/2) * ( p.p1.y - p.p1.y )+p.p1.x);
p.p1.y= (int) (Math.cos(Math.PI/2)* ( p.p1.y - p.p1.y ) - Math.sin(Math.PI/2) * ( p.p1.x - p.p1.x )+p.p1.y );
p.p2.x= (int) (Math.cos(Math.PI / 2)* ( p.p2.x - p.p1.x) - Math.sin(Math.PI / 2) * ( p.p2.y - p.p1.y)+ p.p2.x );
p.p2.y= (int) (Math.cos(Math.PI / 2)* ( p.p2.y - p.p1.y) + Math.sin( Math.PI / 2) * ( p.p2.x - p.p1.x)+p.p2.y );
p.p3.x= (int) (Math.cos(Math.PI/2)* ( p.p3.x - p.p1.x) - Math.sin( Math.PI/2) * ( p.p3.y - p.p1.y )+ p.p3.x );
p.p3.y= (int) (Math.cos(Math.PI/2)* ( p.p3.y - p.p1.y ) + Math.sin(Math.PI/2) * ( p.p3.x - p.p1.x )+p.p3.y );
p.p4.x= (int) (Math.cos(Math.PI/2)* ( p.p4.x - p.p1.x) - Math.sin(Math.PI/2) * ( p.p4.y - p.p1.y ) + p.p4.x);
p.p4.y= (int) (Math.cos(Math.PI/2)* ( p.p4.y - p.p1.y ) + Math.sin(Math.PI/2) * ( p.p4.x - p.p1.x )+ p.p4.y ); |