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

43 lines (36 sloc) 0.908 kb
<!doctype html>
<html>
<head>
<script src="../build/donatello-min.js" type="text/javascript"></script>
<!--
<script src="../build/donatello-min.js" type="text/javascript"></script>
-->
<script>
var line;
function main() {
var paper = Donatello.paper('paper-div', 20, 20, 600, 600 );
paper.line( 25, 25, 10, 10 );
// test setting attribute during construction
paper.line( 75, 25, 10, 10, { stroke:'red' } );
// test setting attribute
line = paper.line( 125, 25, 10, 10 );
line.attr( { stroke:'blue' } );
// test setting attribute
line = paper.line( 175, 25, 10, 10 );
line.attr( { y:50 } );
// test setting attribute
line = paper.line( 225, 25, 10, 10 );
line.attr( { 'stroke-width':6 } );
}
</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.