Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Patch from Alex to expose GdipCreateFromHDC at least for Bitmaps on O…

…SX, fixes #2734
  • Loading branch information...
commit 851dea0c79bf26ab3a42ef953617ab5684801e8e 1 parent dc733e8
@migueldeicaza migueldeicaza authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/graphics.c
View
10 src/graphics.c
@@ -208,8 +208,6 @@ gdip_metafile_graphics_new (GpMetafile *metafile)
return result;
}
-#ifdef CAIRO_HAS_XLIB_SURFACE
-
// coverity[+alloc : arg-*1]
GpStatus
GdipCreateFromHDC (void *hDC, GpGraphics **graphics)
@@ -233,7 +231,8 @@ GdipCreateFromHDC (void *hDC, GpGraphics **graphics)
if (clone->type == gtMemoryBitmap)
return GdipGetImageGraphicsContext (clone->image, graphics);
-
+
+#ifdef CAIRO_HAS_XLIB_SURFACE
XGetGeometry (clone->display, clone->drawable, &root,
&x, &y, &w, &h, &border_w, &depth);
@@ -255,6 +254,9 @@ GdipCreateFromHDC (void *hDC, GpGraphics **graphics)
(*graphics)->display = clone->display;
return Ok;
+#endif
+
+ return NotImplemented;
}
GpStatus
@@ -263,8 +265,6 @@ GdipCreateFromHWND (void *hwnd, GpGraphics **graphics)
return NotImplemented;
}
-#endif
-
#ifdef CAIRO_HAS_QUARTZ_SURFACE
// coverity[+alloc : arg-*3]
GpStatus
Please sign in to comment.
Something went wrong with that request. Please try again.