Javascript examples for Canvas:Rectangle
Draw a Rectangle in Paper.js?
<html> <head> <!--load paper.js--> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/paper.js/0.10.2/paper-full.js"></script> <script type="text/paperscript" canvas="myCanvas"> var rectangle = new Rectangle(new Point(50, 50), new Point(150, 100)); var path = new Path.Rectangle(rectangle); path.fillColor = '#e9e9ff'; path.selected = true;/*www . j av a2 s .c om*/ </script> </head> <body> <canvas id="myCanvas" resize></canvas> </body> </html>