Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
52 lines (45 sloc) 1.18 KB
<!doctype html>
<html>
<head>
<title>Arc</title>
<script src="../donatello.js" type="text/javascript"></script>
<script src="../rect.js" type="text/javascript"></script>
<script src="../arc.js" type="text/javascript"></script>
<!--
<script src="../build/donatello-min.js" type="text/javascript"></script>
-->
<script>
/**
*/
var arc;
function main() {
var paper = Donatello.paper('paper-div', 20, 20, 600, 600 );
// test positioning:
// rect should mark center of arc
rect = paper.rect( 25, 25, 1, 1 );
arc = paper.arc( 25, 25, 20, 0, 150 );
arc.node().id = 'test1';
// test setting attribute during construction
arc = paper.arc( 75, 25, 20, 0, 150, { stroke:'red' } );
// test setting attribute
arc = paper.arc( 125, 25, 20, 0, 150 );
arc.attr( { stroke:'blue' } );
// test setting attribute
arc = paper.arc( 175, 25, 20, 0, 150 );
arc.attr( { t1:50 } );
// test setting attribute
arc = paper.arc( 225, 25, 20, 0, 150 );
arc.attr( { 'stroke-width':3 } );
}
</script>
<style>
#paper-div {
border: 1px solid black
}
</style>
</head>
<body onload='main();'>
<div id="paper-div">
</div>
</body>
</html>