<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Arial; font-size: 10pt; color: #000000'>Hi,<br><br>I'm new to cairo and I'm trying to draw a smooth curve between using an array of points.<br><br>Say I have an array with (x,y) coordinates as: POS_T pos = {{0.0, 0.0}, {1.0,1.0}, {1.5, 2.0}, {0.5, 3.0}, {0.0, 4.0}}; <br><br>So basically, a half round 'circle'. I've been looking in cairo docs but the closest thing I get to is the cairo_curve_to but for that it requires control points. How is it determined? I want a simple smooth line but using Bezier algorithm requires additional data to make it happen. Is that correct?<br><br>Or can I simply use curve_line_to and then interpolate this? currently the code looks like this for line:<br><br><span style="font-family: courier new,courier,monaco,monospace,sans-serif;">...<br> for(uint32_t i = 0; i < boundary; i=i++)</span><br style="font-family: courier new,courier,monaco,monospace,sans-serif;"><span style="font-family: courier new,courier,monaco,monospace,sans-serif;"> {</span><br style="font-family: courier new,courier,monaco,monospace,sans-serif;"><span style="font-family: courier new,courier,monaco,monospace,sans-serif;"> cairo_move_to(cr, station->coverage[i].x, station->coverage[i].y);</span><br style="font-family: courier new,courier,monaco,monospace,sans-serif;"><br style="font-family: courier new,courier,monaco,monospace,sans-serif;"><span style="font-family: courier new,courier,monaco,monospace,sans-serif;">// cairo_line_to(cr,</span><br style="font-family: courier new,courier,monaco,monospace,sans-serif;"><span style="font-family: courier new,courier,monaco,monospace,sans-serif;">// station->coverage[(i+1) % boundary].x,</span><br style="font-family: courier new,courier,monaco,monospace,sans-serif;"><span style="font-family: courier new,courier,monaco,monospace,sans-serif;">// station->coverage[(i+1) % boundary].y);</span><br style="font-family: courier new,courier,monaco,monospace,sans-serif;"><br style="font-family: courier new,courier,monaco,monospace,sans-serif;"><span style="font-family: courier new,courier,monaco,monospace,sans-serif;"> cairo_curve_to(cr,</span><br style="font-family: courier new,courier,monaco,monospace,sans-serif;"><span style="font-family: courier new,courier,monaco,monospace,sans-serif;"> station->coverage[i].x, </span><br style="font-family: courier new,courier,monaco,monospace,sans-serif;"><span style="font-family: courier new,courier,monaco,monospace,sans-serif;"> station->coverage[(i].y,</span><br style="font-family: courier new,courier,monaco,monospace,sans-serif;"><span style="font-family: courier new,courier,monaco,monospace,sans-serif;"> station->coverage[i+1].x,</span><br style="font-family: courier new,courier,monaco,monospace,sans-serif;"><span style="font-family: courier new,courier,monaco,monospace,sans-serif;"> station->coverage[i+1].y,</span><br style="font-family: courier new,courier,monaco,monospace,sans-serif;"><span style="font-family: courier new,courier,monaco,monospace,sans-serif;"> station->coverage[i+2].x,</span><br style="font-family: courier new,courier,monaco,monospace,sans-serif;"><span style="font-family: courier new,courier,monaco,monospace,sans-serif;"> station->coverage[i+2].y);</span><br style="font-family: courier new,courier,monaco,monospace,sans-serif;"><span style="font-family: courier new,courier,monaco,monospace,sans-serif;"> }</span><br style="font-family: courier new,courier,monaco,monospace,sans-serif;"><br style="font-family: courier new,courier,monaco,monospace,sans-serif;"><span style="font-family: courier new,courier,monaco,monospace,sans-serif;"> cairo_set_line_width (cr, 1.5);</span><br style="font-family: courier new,courier,monaco,monospace,sans-serif;"><span style="font-family: courier new,courier,monaco,monospace,sans-serif;"> cairo_stroke(cr);</span><br style="font-family: courier new,courier,monaco,monospace,sans-serif;"><br style="font-family: courier new,courier,monaco,monospace,sans-serif;"><span style="font-family: courier new,courier,monaco,monospace,sans-serif;"> cairo_destroy(cr);</span><br style="font-family: courier new,courier,monaco,monospace,sans-serif;"><br style="font-family: courier new,courier,monaco,monospace,sans-serif;"><br>Any help would be appreciated. Thanks.<br>Indy<br><br></div></body></html>