• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java2D linestyle issue

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
J2D-Butt-Miter.png
[Thumbnail for J2D-Butt-Miter.png]
Cap-style BUTT and join-style MITER
J2D-Square-Bevel.png
[Thumbnail for J2D-Square-Bevel.png]
Cap-style SQUARE and join-style BEVEL
 
reply
    Bookmark Topic Watch Topic
  • New Topic