SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Evangelist ikeo's Avatar
    Join Date
    Oct 2004
    Location
    Austin Texas
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to draw a shape with mouse clicks ...

    I trying to build up to a more complicated problem, but to warm up, I wanted to undertake a simpler project. Having a user use clicks of a mouse to draw a shape.

    I'm pretty good with Javascript and have a solid programming background, so all I need is the logic and key functions I need to do this.

    To repeat, I want the user to click their mouse and have a line drawn from point to point until any of the lines cross and then I want the area in the shape to be selected/colored etc.

    I just need a push in the right direction, so articles links, ideas are welcome.
    Thanks in advance.

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  3. #3
    SitePoint Wizard Pepejeria's Avatar
    Join Date
    Jan 2005
    Location
    Too far up north
    Posts
    1,566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You might wanna check out the canvas tag. It's supported in all modern browsers (no, IE is not a modern browser, though you can simulate canvas).


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
  •