I don't know Scala, but in Java 2D, the Graphics2D object can fill or draw the outline of any Shape object. For some arbitrary shape you would define it with GeneralPath object, such as:
GeneralPath path = new GeneralPath();
path.lineTo(10, 10);
path.lineTo(0, 10);
path.lineTo(0, 0);
graphics.setColor(Color.RED);
graphics.fill(path);
The GeneralPath object also has methods for drawing bezier curves and quads, so you would draw the path and then choose to fill or draw the outline of it.
locka
2010-09-07 10:57:40