JSFiddle - React, Tailwind, and code Playground
by Hooman Askari
HTML
<!DOCTYPE html>
<html>
<head>
<title>
Fabric.js Ellipse strokeDashOffset Property
</title>
<!-- FabricJS CDN -->
<script src=
"https://cdnjs.cloudflare.com/ajax/libs/fabric.js/3.6.2/fabric.min.js">
</script>
</head>
<body>
<h1 style="color: green;">
GeeksforGeeks
</h1>
<h3>
Fabric.js Ellipse strokeDashOffset Property
</h3>
<canvas id="canvas" width="600" height="300"
style="border:1px solid #000000">
</canvas>
<script>
// Initiate a Canvas instance
var canvas = new fabric.Canvas("canvas");
// Initiate a Ellipse instance
var ellipse = new fabric.Ellipse({
rx: 150,
ry: 75,
fill: '',
strokeDashArray: [1000],
strokeDashOffset: 10,
stroke: 'green'
});
// Render the ellipse in canvas
canvas.add(ellipse);
canvas.centerObject(ellipse);
</script>
</body>
</html>