Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…SX, fixes #2734
  • Loading branch information...
commit 3ddf7ff28e0876dc395368f11c0dd141199338f0 1 parent ed9336c
Miguel de Icaza migueldeicaza authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/graphics.c
10 src/graphics.c
View
@@ -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.