dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: JavaScript Photoshop drawing lines

  1. #1
    Join Date
    Mar 2011
    Posts
    1

    JavaScript Photoshop drawing lines

    Hi, I was wondering how to draw a straight line from 2 coordinates using JavaScript. Thanks

  2. #2
    Join Date
    Feb 2011
    Location
    israel
    Posts
    157
    well, you can do that with html 5 canvas like that:
    HTML Code:
    <canvas width="70" height="70" >
    </canvas>
    <script>
    var c=document.getElementsByTagName('canvas').item(0);
    var cxt=c.getContext("2d");
    cxt.moveTo(0,0);
    cxt.lineTo(70,50);
    cxt.stroke();
    </script>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles