A "border" for a shape?
I have a GeneralPath that I have constructed from two Arc2D, joining all the ends to make a Shape with two curved sides and two straight sides. I want to ensure it will be distinctive when I display it regardless of the background colours on which the shape is drawn in WHITE, by drawing a BLACK "border" on that Shape: like my white mouse pointer has a black line around it. However I don't want to fill the Shape, I just want an extra layer of line around it.
There is one simple compromise which is to draw the shape with a thick Stroke in black and again with a thinner Stroke in white, but this gives me "borders" on both edges and I only want the black to be visible on the outer edge.
I tried using an AffineTransform to scale and translate a copy of the shape to use as the outline but, possibly because I'm dealing with curves, I can't work out what function of the BasicStroke.getLineWidth (etc.) scaling factor has to be so that the outline appears around the shape, or if the encircling shape I want could actually be the result of an affine transformation of the encircled shape! I have also found it difficult to generate a whole new GeneralPath that just wraps the original one, taking into account the line width of the BasicStroke.
Is the something obvious I'm missing (new in Java 6 maybe?) that would allow me to draw a border around an arbitrary Shape or GeneralPath (or Path2D.Double)?
