Make objects move in Cairo
<p>I need to use Cairo to make geometric formulas move through the screen.</p>

<p>How does one "move" objects (like circles) in Cairo? I did try <code>cairo_translate(cr, x, y)</code> function but it seems to change the referential for all the objects and I don't know how to produce de "movement". In other frameworks I would increment the <code>x</code> value and change the speed with an appropriate <code>clock()</code> function to control FPS's, then I would paint the drawing area background and draw the object with new coordinates.</p>

<p>But I don't know how to produce this with Cairo and all documentation I can find does not mention how this is done.</p>

<p>This is the code I have:</p>

<pre><code>genRandVector(numOfBalls);

/* creates big ball */
cairo_set_line_width(cr, 5);
cairo_set_source_rgb(cr, 0, 0, 0);
cairo_arc(cr, balls_MAP[0].x, balls_MAP[0].y, CONF.big_rad, 0, 2 * M_PI);

cairo_stroke_preserve(cr);
cairo_set_source_rgb(cr, 0.9, 0.9, 0.9);

cairo_fill(cr);

/* creates other balls */
int i;
cairo_close_path(cr);
cairo_set_source_rgb(cr, 0, 0, 0);

for(i = 1; i &lt; numOfBalls; i++) {

    cairo_arc(cr, balls_MAP[i].x, balls_MAP[i].y, CONF.small_rad, 0, 2 * M_PI);
    cairo_stroke_preserve(cr);

    cairo_fill(cr);
    cairo_close_path(cr);
}
</code></pre>

<p>And my circles are still. I would like to make all of them move randomly. I just don't know how to make them "move".</p>