adding simple web2d tests
This commit is contained in:
@@ -71,14 +71,23 @@
|
||||
web2d.peer.Toolkit.init();
|
||||
|
||||
var overflowWorkspace = new web2d.Workspace({fillColor:'green'});
|
||||
overflowWorkspace.setSize("200px", "200px");
|
||||
line1 = new web2d.CurvedLine();
|
||||
overflowWorkspace.setSize("400px", "400px");
|
||||
var line1 = new web2d.CurvedLine();
|
||||
line1.setStyle(web2d.CurvedLine.SIMPLE_LINE);
|
||||
line1.setFrom(200, 200);
|
||||
line1.setTo(100, 100);
|
||||
// line1.setControlPoints({x:150,y:100},{x:150,y:200});
|
||||
line1.setSrcControlPoint(new core.Point(-100,0));
|
||||
line1.setDestControlPoint(new core.Point(100,0));
|
||||
overflowWorkspace.appendChild(line1);
|
||||
|
||||
var line2 = new web2d.CurvedLine();
|
||||
line2.setStyle(web2d.CurvedLine.NICE_LINE);
|
||||
line2.setFrom(0, 0);
|
||||
line2.setTo(150, 90);
|
||||
line2.setSrcControlPoint(new core.Point(100,0));
|
||||
line2.setDestControlPoint(new core.Point(-100,0));
|
||||
overflowWorkspace.appendChild(line2);
|
||||
|
||||
overflowWorkspace.addItAsChildTo($("overflowExample"));
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user