paper.js/examples/Scripts/strokeJoin.html

47 lines
No EOL
1.4 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Example</title>
<script type="text/javascript">var loadBase = '../../'</script>
<script type="text/javascript" src="../../lib/load.js"></script>
<script type="text/javascript" src="../../src/load.js"></script>
<script type="text/paperscript" canvas="canvas">
var path = new Path([100, 150], [150, 200], [200, 150]);
path.strokeColor = 'black';
path.strokeWidth = 30;
path.strokeJoin = 'round';
var path = new Path([240, 150], [290, 200], [340, 150]);
path.strokeColor = 'black';
path.strokeWidth = 30;
path.strokeJoin = 'bevel';
var path = new Path([380, 150], [430, 200], [480, 150]);
path.strokeColor = 'black';
path.strokeWidth = 30;
path.strokeJoin = 'miter';
var path = new Path([100, 250], [150, 300], [200, 250]);
path.strokeColor = 'black';
path.strokeWidth = 30;
path.strokeJoin = 'round';
path.strokeCap = 'round';
var path = new Path([240, 250], [290, 300], [340, 250]);
path.strokeColor = 'black';
path.strokeWidth = 30;
path.strokeJoin = 'bevel';
path.strokeCap = 'square';
var path = new Path([380, 250], [430, 300], [480, 250]);
path.strokeColor = 'black';
path.strokeWidth = 30;
path.strokeJoin = 'miter';
path.strokeCap = 'butt';
console.log(path.segments);
</script>
</head>
<body>
<canvas id='canvas' width=1024 height=768></canvas>
</body>