protected void computeTransformedBounds ( ) { int w = _base . getWidth ( ) ; int h = _base . getHeight ( ) ; Point [ ] points = new Point [ ] { new Point ( 0 , 0 ) , new Point ( w , 0 ) , new Point ( 0 , h ) , new Point ( w , h ) } ; _transform . transform ( points , 0 , points , 0 , 4 ) ; int minX , minY , maxX , maxY ; minX = minY = Integer . MAX_VALUE ; maxX = maxY = Integer . MIN_VALUE ; for ( int ii = 0 ; ii < 4 ; ii ++ ) { minX = Math . min ( minX , points [ ii ] . x ) ; maxX = Math . max ( maxX , points [ ii ] . x ) ; minY = Math . min ( minY , points [ ii ] . y ) ; maxY = Math . max ( maxY , points [ ii ] . y ) ; } _bounds = new Rectangle ( minX , minY , maxX - minX , maxY - minY ) ; }
Compute the bounds of the base Mirage after it has been transformed .