ตัวอย่าง แทคที่ใช้
1 2 | < div id = "container" > </ div > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | var stage = new Kinetic.Stage({ container: 'container' , width: 578, height: 200 }); var layer = new Kinetic.Layer(); var rect = new Kinetic.Rect({ x: 239, // กำหนดแนวแกน x y: 75, // กำหนดแนวแกน y width: 100, // กำหนดความกว้าง height: 50, // กำหนดความสูง fill: 'blue' , // ใส่สีพื้น stroke: 'black' , // กำหนดสีเส้น strokeWidth: 4 // กำหนดขนาดเส้น }); // add the shape to the layer layer.add(rect); // add the layer to the stage stage.add(layer); |
ผลลัพธ์ที่ได้คือ
0 comments:
Post a Comment