public void translateRectangle ( Rectangle rect , float dx , float dy ) { float width = rect . getWidth ( ) ; float height = rect . getHeight ( ) ; rect . setLeft ( rect . getLeft ( ) + dx ) ; rect . setBottom ( rect . getBottom ( ) + dy ) ; rect . setRight ( rect . getLeft ( ) + dx + width ) ; rect . setTop ( rect . getBottom ( ) + dy + height ) ; }
Translate this rectangle over the specified following distances .