In this article, we are going to see how to create a canvas-like polyline using Fabric.js. The canvas means polyline is movable and can be stretched according to requirement. Further, the polyline can be customized when it comes to initial fill color, stroke color, and its coordinates.
Parameters: This function accept two parameters as mentioned above and described below:
- points: It holds the starting and ending coordinates for all the points of the polyline.
- options: It holds the additional options to be applied.
Below example implements the above approach:
Example: This example uses FabricJS to create simple editable polyline canvas.
- PHP | ImagickDraw polyline() Function
- PHP | GmagickDraw polyline() Function
- SVG Polyline element
- Fabric.js Polyline lockUniScaling Property
- Fabric.js Polyline absolutePositioned Property
- Fabric.js Polyline lockScalingX Property
- Fabric.js Polyline lockScalingFlip Property
- Fabric.js Polyline flipY Property
- Fabric.js Polyline fill Property
- Fabric.js Polyline padding Property
- Fabric.js Polyline skewY Property
- Fabric.js Polyline lockScalingY Property
- Fabric.js Polyline lockSkewingY Property
- Fabric.js Polyline stroke Property
- Fabric.js Polyline borderDashArray Property
- How to create a simple editable canvas textbox using Fabric.js?
- How to create a canvas circle using Fabric.js ?
- How to create a canvas ellipse using Fabric.js ?
- How to create a canvas polygon using Fabric.js ?
- How to create a rectangle canvas using Fabric.js ?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.