[cairo] Zero matrix transformation

Behdad Esfahbod behdad at behdad.org
Wed Mar 19 06:55:32 PDT 2008


On Wed, 2008-03-19 at 08:22 -0400, Daniel Kraft wrote:
> 
> I tried to reproduce this, but for me (using the hello-program from
> the 
> FAQ with this scale-statement added) this seems to work.  Using
> numbers 
> between 0 and 1, the writing becomes smaller as I would expect; for 
> using 0, nothing is drawn, as the item states as desired behaviour.

Hi,

Sure, nothing is drawn, but the cairo_scale(cr,0,0) also put the cairo_t
into an unrecoverable error state.  That's the bug that needs to be
fixed.

For example, try:

  cairo_save (cr);
  cairo_scale (cr, 0, 0);
  cairo_restore (cr);

  /* some cairo drawing here */

The drawing should work normally, but currently it doesn't.

Hope that helps, and have fun with cairo!

-- 
behdad
http://behdad.org/

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759



More information about the cairo mailing list