Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Filling polygons.

 
Michael Boehm
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using the Graphics class I am drawing some polygons. Some of these I fill. The polygons are to be drawn with black and I want to fill them with a different color. Problem now is along one boundary line in the polygon, the bounding line will "disappear in steps" after filling with different color. The boundary will now have color alternating between black which the polygon was drawn with and the filling color. This makes it look like a "broken" polygon with incomplete boundary. How can this be fixed ? Here is an attempt to illustrate how it look: ______......_____......_____ where .... is the filling color.
 
Michael Boehm
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok. I thought I could not fill a polygon untill it was frawn ! Filling the polygon before drawing it with a color different from the fill color solves this.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Glad you figured it out :)
 
Campbell Ritchie
Sheriff
Posts: 48406
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to our Swing forum.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic