+ XGCValues gcvalues;
+ gcvalues.foreground = BlackPixel (display, DefaultScreen (display));
+ gcvalues.background = WhitePixel (display, DefaultScreen (display));
+ gcvalues.graphics_exposures = False;
+ gcvalues.subwindow_mode = IncludeInferiors;
+ gcvalues.line_width = 1;
+ m_gc = (WXGC) XCreateGC (display, (Drawable)m_pixmap/* RootWindow (display, DefaultScreen (display)) */,
+ GCForeground | GCBackground | GCGraphicsExposures | GCLineWidth | GCSubwindowMode,
+ &gcvalues);
+
+ m_backgroundPixel = gcvalues.background;
+ m_ok = true;
+
+ SetBrush (* wxWHITE_BRUSH);
+ SetPen (* wxBLACK_PEN);
+ }
+ else
+ {
+ m_ok = false;
+ m_pixmap = (WXPixmap) 0;
+ };
+}
+
+void wxMemoryDCImpl::DoGetSize( int *width, int *height ) const
+{
+ if (m_bitmap.Ok())
+ {
+ if (width) (*width) = m_bitmap.GetWidth();
+ if (height) (*height) = m_bitmap.GetHeight();
+ }
+ else
+ {
+ if (width) (*width) = 0;
+ if (height) (*height) = 0;
+ };
+}