As I interpret the documentation, getY () should return the y-coordinate of the upper left corner of the rectangle; that is, the largest Y coordinate. However, when I call getMaxY () (which is inherited from the RectangularShape class), I return a larger value!
In code:
Path2D bg = polygons.get(polyId2GeoId.get(id));
Rectangle2D bgBox = bg.getBounds2D();
boolean omgwtfbbqrsvp = bgBox.getY()<bgBox.getMaxY();
omgwtfbbqrsvp is true ... What am I missing here?
My x values contain negative idk numbers if that matters. It looks like bgBox.getY () == bgBox.getMinY () (which is not true if getY is top ), but bgBox.getX () == bgBox.getMinX () (this is correct if getX is left ). Height and width are displayed correctly.
Thank!
source
share