question: private static Shape scale ( final Shape currentPolygon , final double xScaleFactor , final double yScaleFactor ) { final Point2D centroid = getCentroid ( currentPolygon ) ; final AffineTransform transform = AffineTransform . getTranslateInstance ( ( 1.0 - xScaleFactor ) * centroid . getX ( ) , ( 1.0 - yScaleFactor ) * centroid . getY ( ) ) ; transform . scale ( xScaleFactor , yScaleFactor ) ; final Shape shape = transform . createTransformedShape ( currentPolygon ) ; return shape ; }
target:  from: eu.hansolo.steelseries.tools.Scaler.java Returns a scaled version of the given shape, calculated by the given scale factor. The scaling will be calculated around the centroid of the shape.