File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

POLYPOLYGON

 
Paul Hung
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DEAR ALL:
POLYPOLYGON IS A METHOD TO DRAWING PLOYGON INSIDE ONE POLYGON. How could I do in java?
 
Steve Lovelace
Ranch Hand
Posts: 125
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The basic trick is to subclass JPanel (I'm assuming you're using Swing) and override the paintComponent() method. Your method will use java.awt.Graphics2D.draw(Shape) to render your polypolygon. You could put draw() in a loop and iterate over a collection of polygon edges (java.awt.geom.Line2D), or you could build a java.awt.geom.GeneralPath for each polygon, inner and outer, and then invoke draw() on each one.
 
Craig Wood
Ranch Hand
Posts: 1535
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic