Pranav Patel
Pranav Patel

Reputation: 154

Draw Circle Canvas instead of Rect fabric.js

I want to draw canvas in Circle, as currently my canvas is creating in rectangle and all the objects are drawing inside, I want to make the area in circle and than all the objects can be drawn inside the circle. can any one have the answer?

Upvotes: 0

Views: 846

Answers (1)

markE
markE

Reputation: 105015

You can use CSS to collapse all 4 borders of your canvas into a circle with:

#yourCanvasID { border-radius:50%; }

After that you are in charge of drawing your shapes only inside the circular canvas.

Upvotes: 1

Related Questions