-// Create a DC representing the whole screen
-wxScreenDC::wxScreenDC()
-{
- m_display = wxGetDisplay();
- Display* display = (Display*) m_display;
-
- if (sm_overlayWindow)
- {
- m_pixmap = sm_overlayWindow;
- m_deviceOriginX = - sm_overlayWindowX;
- m_deviceOriginY = - sm_overlayWindowY;
- }
- else
- m_pixmap = (WXPixmap) RootWindow(display, DefaultScreen(display));
-
- 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 = XCreateGC (display, RootWindow (display, DefaultScreen (display)),
- GCForeground | GCBackground | GCGraphicsExposures | GCLineWidth | GCSubwindowMode,
- &gcvalues);
-
- m_backgroundPixel = (int) gcvalues.background;
- m_ok = TRUE;
-}