I believe GeneralPath is a typical way of describing an arbitrary shape.
In your case, it looks like you will have two lines described with lineTo
and two (the curves) descibed with quadTo
, then call closePath() to represent a closed polygon, something like (just picking convenient coordinates here, you'll probably want something a good deal larger):
GeneralPath polygon =
new GeneralPath(GeneralPath.WIND_EVEN_ODD, 4);
polygon.moveTo(2.0, 1.0);
polygon.lineTo(2.0, 5.0);
polygon.quadTo(1.25, 4.75, 1.0, 4.0);
polygon.lineTo(1.0, 2.0);
polygon.quadTo(1.75, 1.75, 2.0, 1.0);
polygon.closePath();
g.draw(polygon);
Also, check out this tutorial on GeneralPath