Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 94471085c2
Fetching contributors…

Cannot retrieve contributors at this time

39 lines (37 sloc) 0.907 kB
<!doctype html>
<html>
<head>
<script src="../donatello.js" type="text/javascript"></script>
<script src="../text.js" type="text/javascript"></script>
<script>
function main() {
var colors = [
'#717171', '#A71717', '#8AA717', '#34A717', '#17A751', '#17A7A7', '#1751A7', '#3417A7'
];
var paper = Donatello.paper('paper-div', 20, 20, 500, 500 );
paper.attr( {fill:'black'} );
var r = 100;
for( var i=0; i < 8; i ++ ) {
var x = Math.cos( i*Math.PI/4 )*r;
var y = Math.sin( i*Math.PI/4 )*r;
var text = paper.text( 250 + x, 250 + y, "foo", {
'stroke-width': 4*i,
'stroke': colors[i%8],
'color': colors[i%8],
'stroke-style': 'solid'
});
text.rotate( (i*Math.PI/4)*180/Math.PI );
}
}
</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.