1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>Pen Example</title>
-
-
- <script src="../dev-lib/sea.js"></script>
- <script>
- seajs.config({
- base: '../src'
- });
- </script>
- <script src="../dev-lib/exports.js"></script>
- <script src="../dev-lib/dev-start.js"></script>
-
-
-
-
- <script>
- window.onload = function () {
- var paper = new kity.Paper(document.body);
- paper.setWidth(400).setHeight(300);
- var path = new kity.Path();
- path.getDrawer().pipe(function(){
- this.moveTo(10, 10);
- this.lineTo(100, 10);
- this.carcTo(100, 200, 40);
- this.lineTo(10, 200);
- this.close();
- });
- path.stroke(new kity.Pen().pipe(function() {
- this.setWidth(5);
- this.setDashArray([10, 5]);
- this.setLineCap('butt');
- this.setLineJoin('round');
- this.setColor('green');
- }));
- path.fill('none');
- paper.addShape(path);
- };
- </script>
- </head>
- <body>
-
- </body>
- </html>
|