double width = result2.getX() * scale - result.getX() * scale;
double height = result2.getY() * scale - result.getY() * scale;
- Rectangle2D translated = new Rectangle2D.Double(x, y, width, Math.abs(height));
+ Rectangle2D translated = new Rectangle2D.Double(x, y - Math.abs(height), width, Math.abs(height));
g2d.draw(translated);
}