int h = getHeight();
int w = getWidth();
float a = (float) Math.hypot(h, w);
Float path = new java.awt.geom.Path2D.Float();
path.moveTo(0, 0);
path.lineTo(w, 0);
path.lineTo(0, h);
path.closePath();
path.moveTo(W, W);
path.lineTo(W, h - W * (a + h) / w);
path.lineTo(w - W * (a + w) / h, W);