[cairo] [Win32] Why does Win32 surface return NULL for invalid format?

Behdad Esfahbod behdad at behdad.org
Wed May 23 17:34:19 PDT 2007

On Fri, 2007-05-18 at 19:53 -0400, Kouhei Sutou wrote:
> Hi,
> cairo_win32_surface_create_with_ddb() returns NULL when
> passed format is not CAIRO_FORMAT_RGB24. I think
> cairo_win32_surface_create_with_ddb() should return nil
> surface that has CAIRO_STATUS_INVALID_FORMAT status like
> cairo_image_surface_create().

You are right.  Moreover, _cairo_win32_print_gdi_error() should not
print anything to stderr.

Anyone with win32 willing to fix these?

> Thanks,
> --
> kou


"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