Re: [JAVA2D] Path fun (in Re: to both STROKE_CONTROL and GeneralPath expansion)

2002-12-02 Thread Ted Hill
Hi Jim, Thanks for your suggestion/insight to use a combination of Stroke and Area for expanding and contracting Shapes. It looks like this will work well. A follow up question: I will also occasionally need to expand/contract my simple closed polygons by a different amount in X and Y. For

Re: [JAVA2D] Path fun (in Re: to both STROKE_CONTROL and GeneralPath expansion)

2002-12-02 Thread Ted Hill
Hi Jim, I'm trying to implement your suggested technique of using a stroke and areas to expand a shape. I'm experiencing some difficulty at the 'initial corner' even though I've specified a JOIN_MITER. Included is a small test program. Also attaching a jpeg that shows the orig shape in the

Re: [JAVA2D] Caching Colors

2002-12-02 Thread Jim Graham
In normal usage the private paintContext field of the Color object should never be used. The graphics code treats colors specially and simply fills the rectangles with the appropriate color rather than invoking its PaintContext object. But, if anyone ever calls the createContext() method of a

Re: [JAVA2D] Path fun (in Re: to both STROKE_CONTROL and GeneralPath expansion)

2002-12-02 Thread Jim Graham
Hi Ted, Unfortunately the BasicStroke implementation only lets you specify a single linewidth parameter for any direction and it works in user space insofar as it does not take an AffineTransform parameter. The easiest way to do this would be to transform the shape before the stretch operation