File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Crack showing between polygons Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Crack showing between polygons" Watch "Crack showing between polygons" New topic

Crack showing between polygons

colin shuker
Ranch Hand

Joined: Apr 11, 2005
Posts: 750
Hi, I'm trying to draw 2 quadrilatrials, that share 2 corners and an egde.

I also want to smooth edges, so I use ANTIALIASING turned on, but this has the effect of showing a crack between the polygons.
The crack dissapears if I turn off ANTIALISAING, but I really don't want to do that.
Is there any way around this (without moving the corner points a pixel or two to hide the gap) ??

Code is shown below

Class Main

class Drawer

Darryl Burke

Joined: May 03, 2008
Posts: 5115

Is there any way around this

Calling both fillPolygon and drawPolygon may take care of it.

luck, db
There are no new questions, but there may be new answers.
colin shuker
Ranch Hand

Joined: Apr 11, 2005
Posts: 750
Thanks, I tried that before but it didn't help much.

But I tried it again using VALUE_STROKE_PURE, and that fixes it, so I'll go and try it out on chess pieces now, thanks
I agree. Here's the link:
subject: Crack showing between polygons
It's not a secret anymore!