Results 1 to 2 of 2

Thread: to draw polygon

  1. #1
    andrews is offline VB.NET Forum Fanatic
    .NET Framework
    .NET 4.0
    Join Date
    Nov 2011
    Posts
    112
    Reputation
    69

    to draw polygon

    I have a array of points with coodinates
    (ar can have f.e. 200 points)
    ar(1,0) = 1
    ar(1,1) = 10
    ar(2,0) = 5
    ar(2,1) = 15
    ..
    ..

    where
    point1
    x = 1
    y = 10
    point2
    x = 5
    y = 15


    How can I draw the polygon with these points

    f.e.
    for i = 1 to ar.getupperbounds(0)
    ??
    next

    g.drawpolygon(???

    I can not go from ar to drawpolygon

    Thanks for any response

  2. #2
    jmcilhinney's Avatar
    jmcilhinney is offline VB.NET Forum Moderator
    .NET Framework
    .NET 4.0
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    13,774
    Reputation
    1703
    What do you not understand about what you read in the MSDN documentation for the Graphics.DrawPolygon method? At the very least, you should know that you need to pass a Pen and an array*of Point. What*happened when you did that?

Bookmarks

Posting Permissions

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