Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Line Drawing (joining the dots!!)

Line Drawing (joining the dots!!)

Scheduled Pinned Locked Moved C#
graphicsdata-structuresregexquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Paul Griffin
    wrote on last edited by
    #1

    Hi all can anyone tell me if a function exists which draws a line segment or series of line segments which adds each point in the line to an array of points?? It would also have to take into account the width of the line drawn!!! Basically i want to be able to draw a line then click on it and compare the mouse click point against all points in the line for a match?? Any ideas would be great!! Regards, Paul Paul Griffin

    P D 2 Replies Last reply
    0
    • P Paul Griffin

      Hi all can anyone tell me if a function exists which draws a line segment or series of line segments which adds each point in the line to an array of points?? It would also have to take into account the width of the line drawn!!! Basically i want to be able to draw a line then click on it and compare the mouse click point against all points in the line for a match?? Any ideas would be great!! Regards, Paul Paul Griffin

      P Offline
      P Offline
      Philip Fitzsimons
      wrote on last edited by
      #2

      you need to work with GraphicsPath using PathData, look at PathData.Points


      "When the only tool you have is a hammer, a sore thumb you will have."

      1 Reply Last reply
      0
      • P Paul Griffin

        Hi all can anyone tell me if a function exists which draws a line segment or series of line segments which adds each point in the line to an array of points?? It would also have to take into account the width of the line drawn!!! Basically i want to be able to draw a line then click on it and compare the mouse click point against all points in the line for a match?? Any ideas would be great!! Regards, Paul Paul Griffin

        D Offline
        D Offline
        Don_s
        wrote on last edited by
        #3

        Have a look at: Graphics.DrawPolygon();

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups