Rectangle2D (Graphics2D g) { double x = PaintUtil.alignToInt(JBUIScale.scale(3f), g); double w = PaintUtil.alignToInt(JBUIScale.scale(10f), g); //noinspection SuspiciousNameCombination return new Rectangle2D.Double(x, x, w, w); }