question: public Rectangle2D scale ( Rectangle2D rect ) { Insets insets = getInsets ( ) ; double x = rect . getX ( ) * getScaleX ( ) + insets . left ; double y = rect . getY ( ) * getScaleY ( ) + insets . top ; double w = rect . getWidth ( ) * getScaleX ( ) ; double h = rect . getHeight ( ) * getScaleY ( ) ; return new Rectangle2D . Double ( x , y , w , h ) ; }
target:  Applies any scaling that is in effect for the chart drawing to the given rectangle.