Remove the use of awt.Dimension which is not available on JavaME/Andriod. The new methods aren't super clean but are not used elsewhere in the library. Note the new API for shifting lines up with the return value of getMinMax which getRectangle2D was previously boxing.