[cairo-commit] cairo/src cairo-win32-surface.c,1.35,1.36
Tim Rowley
commit at pdx.freedesktop.org
Tue Sep 27 13:22:48 PDT 2005
Committed by: tor
Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv3712/src
Modified Files:
cairo-win32-surface.c
Log Message:
* ROADMAP: Note that Bug #4602 (use of 0x0 images
causes win32 backend failure) is now fixed.
* src/cairo-win32-surface.c (_create_dc_and_bitmap):
Avoid creating size-0 bitmap, which fails.
Index: cairo-win32-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-win32-surface.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- cairo-win32-surface.c 19 Sep 2005 21:24:00 -0000 1.35
+++ cairo-win32-surface.c 27 Sep 2005 20:22:46 -0000 1.36
@@ -124,8 +124,8 @@
}
bitmap_info->bmiHeader.biSize = sizeof (BITMAPINFOHEADER);
- bitmap_info->bmiHeader.biWidth = width;
- bitmap_info->bmiHeader.biHeight = - height; /* top-down */
+ bitmap_info->bmiHeader.biWidth = width == 0 ? 1 : width;
+ bitmap_info->bmiHeader.biHeight = height == 0 ? -1 : - height; /* top-down */
bitmap_info->bmiHeader.biSizeImage = 0;
bitmap_info->bmiHeader.biXPelsPerMeter = 72. / 0.0254; /* unused here */
bitmap_info->bmiHeader.biYPelsPerMeter = 72. / 0.0254; /* unused here */
More information about the cairo-commit
mailing list