Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

50 lines (42 sloc) 1.182 kb
<!doctype html>
<html>
<head>
<script src="../donatello.js" type="text/javascript"></script>
<script src="../rect.js" type="text/javascript"></script>
<script src="../circle.js" type="text/javascript"></script>
<!--
<script src="../build/donatello-min.js" type="text/javascript"></script>
-->
<script>
var circle;
function main() {
var paper = Donatello.paper('paper-div', 20, 20, 600, 600 );
// test positioning:
// rect should mark center of circle
rect = paper.rect( 25, 25, 1, 1 );
paper.circle( 25, 25, 20 );
// test setting attribute during construction
paper.circle( 75, 25, 20, { stroke:'red' } );
// test setting attribute
circle = paper.circle( 125, 25, 20 );
circle.attr( { stroke:'blue' } );
// test setting attribute
circle = paper.circle( 175, 25, 20 );
circle.attr( { y:50 } );
// test setting attribute
circle = paper.circle( 225, 25, 20 );
circle.attr( { 'stroke-width':16, stroke:'red' } );
circle = paper.circle( 225, 25, 20 );
}
</script>
<style>
#paper-div {
border: 1px solid black
}
</style>
</head>
<body onload='main();'>
<div id="paper-div">
</div>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.