aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Java2D linestyle issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Java2D linestyle issue" Watch "Java2D linestyle issue" New topic
Author

Java2D linestyle issue

Geronimo M. Hernandez
Greenhorn

Joined: Mar 16, 2009
Posts: 7
Hello,

I built some shapes which I draw in a preview panel.
Beside the preview panel is a form, where the user can change line-width, colors and so on.
Shape border is painted by draw(shape) and the filling of the shape is a separate task. Each one can be disabled separately.

I tried all cap- and join-styles, but I found no way to draw the shape that it looks like expected.
I attached 2 pictures to show, what I mean.
The preview pane has 2 shapes, and the buttons below the preview are RoundRectangle2D, where the user can change corner radius as well.

Any hint is welcome.

kind regards

Gero



[Thumbnail for J2D-Butt-Miter.png]


[Thumbnail for J2D-Square-Bevel.png]

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java2D linestyle issue
 
Similar Threads
I'm Requested to Develop a Drawing Program
How to bring a shape to front/back?
Storing objects polymorphically in a Figure array
drawing on a JPanel without erasing the underlying drawings
Please help - Need advice