I am working on adding arc with 3 points. I got the basic implementation done but still need to add lots of if-else statements.

It is pretty easy to draw an arc using Cairo with the syntax as:

cairo_arc(cairo* surface, double x, double y, double r, double start, double end)

we need only center point(x,y), radius of the arc (r), start angle (start) and the end angle (end) of the arc.

But it is extremely messy trying to get the coordinates and the angles right. The (0,0) coordinate at the upper left corner makes it more confusing with how the angles come into play while calculating radius and placing the arc in between those 3 points.

Hoping to get this done by tomorrow.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s