Compute the dimensions of the new Picture object

The code in Listing 5

Listing 5. Compute the dimensions of the new Picture object.

    Rectangle2D rectangle2D = 
           pic.getTransformEnclosingRect(rotateTransform); 
 
    int resultWidth = (int)(rectangle2D.getWidth()); 
    int resultHeight = (int)(rectangle2D.getHeight()); 
File: bn.htm [Next] [Prev]