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