×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jul 2004
    Posts
    45

    How to fill polygon like in the fillPolygon method

    In the ordinary graphics class, there is the fillPolygon method. Since this is not available in MIDP1.0, is there some other way I can do this? The problem is that if I make my own fillPolygon method, I don't know how to color the pixels in the polygon, since there is no direct access to pixels in MIDP1.0.

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    I haven't tried it but there is this:
    http://sourceforge.net/projects/jmicropolygon

    Also, if you're using Nokia devices you could use the com.nokia.mid.ui.DirectGraphics class, it has polygon filling methods.

    shmoove

  3. #3
    Registered User
    Join Date
    Jul 2004
    Posts
    45
    Thanks, I downloaded it and tested it. It works, but there is a strange bug in it. If any of the points in the polygons are outside of the screen, an ArrayIndexOutOfBoundsException is thrown
    from fillPolygon.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •