Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

62 lines (56 sloc) 1.888 kB
<!doctype html>
<html>
<head>
<script src="../donatello.js" type="text/javascript"></script>
<script src="../experimental.js" type="text/javascript"></script>
<script>
/**
* Kitchen sink drawing method for smoke test.
*/
function main() {
// var paper = new Donatello('paper-div', 20, 20, 300, 300 );
var paper = Donatello.paper('paper-div', 20, 20, 300, 300 );
var circle = paper.circle( 20, 20, 10 );
var pgram = paper.pgram( 150, 100, 10, 10, 25 );
var ellipse = paper.ellipse( 60, 20, 50, 25 );
var line = paper.line( 50, 50, 10, 10 );
var line2 = paper.line( 50, 60, 10, 10 );
// line2.setStrokeWidth( 1 );
// example of a nested set of objects
var rect = paper.rect( 30, 100, 100, 100, {'fill':'green',stroke:'red','stroke-width':5} );
// rect.attr( {'backgroundColor': 'green'} );
rect.rotate( 20 );
rect.attr( {'boxShadow': '4px 4px 4px 2px #000'} );
var rect2 = rect.rect( 5, 5, 10, 10 );
rect2.attr( {'backgroundColor': 'red'} );
var line2 = paper.line( 100, 75, -10, 10 );
var line2 = paper.line( 100, 75, -10, -10 );
var line2 = paper.line( 100, 75, 10, -10 );
var line2 = paper.line( 150, 75, 10, 0 );
var line2 = paper.line( 150, 75, 0, 10 );
var line2 = paper.line( 150, 75, -10, 0 );
var line2 = paper.line( 150, 75, 0, -10 );
var txt = paper.text( 200, 200, 'blah' );
var img = paper.image( 200, 220, 30, 20, 'http://www.google.com/intl/en_com/images/srpr/logo3w.png' );
var path = paper.path( 0, 0, 500, 500, [
// svg path commands
["M", 100, 20 ],
["L", 200, 160 ],
["Q", 230, 200, 250, 120 ],
["C", 290, -40, 300, 200, 400, 150 ],
["L", 500, 90 ]
] );
var arc = paper.arc( 250, 20, 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.