[cairo] crasher

John McCutchan ttb at tentacle.dhs.org
Sat Mar 19 16:24:18 PST 2005


On Sun, 2005-03-20 at 01:15 +0100, Øyvind Kolås wrote:
> On Sat, 19 Mar 2005 19:02:09 -0500, John McCutchan <ttb at tentacle.dhs.org> wrote:
> > Yo,
> > 
> > This simple program crashes cairo. Am I doing something wrong or what?
> 
> >  /* snip */
> >         while (1)       {
> >                         cairo_scale (cr, 400, 16);
> >                         cairo_set_line_width (cr, 0.04);
> >                         cairo_move_to (cr, 0.0, 0.0);
> >  /* snip */
> >                         cairo_close_path (cr);
> >                         cairo_stroke (cr);
> >         }
> > /* snip */
> 
> The reason this program crashes is that you are zooming in 400% , 16%
> for each iteration, if your intention is just to repeatedly draw the
> same figure, you would have to add a cairo_save(cr);
> cairo_restore(cr); pair around the drawing commands.

Thanks for the heads up, but I still don't think cairo should crash
because the developer is dumb.

-- 
John McCutchan <ttb at tentacle.dhs.org>



More information about the cairo mailing list