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] 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

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

2002-11-26 Thread Jim Graham
Ted and Ramón, Using the Area and BasicStroke classes, you can achieve any of the effects that you two have been asking for. Assuming a source Shape object S, and wanting to outsideline, insideline, expand or contract it by N pixels... First get all your variables set up: BasicStroke