Beginning of the rotatePicture method

The rotatePicture method begins in Listing 6.

Listing 6. Beginning of the rotatePicture method.
  private void rotatePicture(double angle){

    //Set up the rotation transform
    rotateTransform = new AffineTransform();
    //Negate the angle for counter-clockwise rotation.
    rotateTransform.rotate(-Math.toRadians(angle),
                           butterflyWidth/2,
                           butterflyHeight/2);

File: bc.htm [Next] [Prev]