Basic HTML version of Foils prepared 13 July 98

Foil 53 The rotate Method

From Java Academy II:Advanced Java NPAC/ECS Java Academy -- February to April 98. by Tom Scavo


1 Rotate a polygon about the top left-hand corner of its bounding box: public DrawablePolygon rotate( double theta ) { Rectangle r = this.getBounds(); Point p = new Point( r.x, r.y ); return this.rotate( theta, p ); }
2 The above refers to java.awt.Rectangle, not our Rectangle class!

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Nov 28 1998