clipBoxType = GetClipBox (hdc, &rect);
if (clipBoxType == ERROR) {
_cairo_win32_print_gdi_error ("cairo_win32_surface_create");
SetGraphicsMode (hdc, gm);
/* XXX: Can we make a more reasonable guess at the error cause here? */
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
}
It's failing GetClipBox(). 'hdc' is the handle in question. They should also check 'gm' for ERROR. I bet
it's the same error.
Just FYI, I was digging around, and found the "handle is invalid" message source. cairo-win32_ surface. c: 1719:
if (_cairo_ win32_save_ initial_ clip (hdc, surface) != CAIRO_STATUS_ SUCCESS) {
free (surface);
...and in _cairo_ win32_save_ initial_ clip():
gm = GetGraphicsMode (hdc); nsform (hdc, NULL, MWT_IDENTITY);
if (gm == GM_ADVANCED) {
GetWorldTransform (hdc, &saved_xform);
ModifyWorldTra
}
clipBoxType = GetClipBox (hdc, &rect); win32_print_ gdi_error ("cairo_ win32_surface_ create" ); STATUS_ NO_MEMORY) ;
if (clipBoxType == ERROR) {
_cairo_
SetGraphicsMode (hdc, gm);
/* XXX: Can we make a more reasonable guess at the error cause here? */
return _cairo_error (CAIRO_
}
It's failing GetClipBox(). 'hdc' is the handle in question. They should also check 'gm' for ERROR. I bet
it's the same error.