Back to index

plt-scheme  4.2.1
Public Member Functions
os_wxMemoryDC Class Reference
Inheritance diagram for os_wxMemoryDC:
Inheritance graph
[legend]
Collaboration diagram for os_wxMemoryDC:
Collaboration graph
[legend]

List of all members.

Public Member Functions

os_wxMemoryDC CONSTRUCTOR_ARGS (())
 ~os_wxMemoryDC ()
virtual void GetSize (double *w, double *h)
void SelectObject (wxBitmap *bitmap)
wxBitmapGetObject ()
virtual void FreeGetPixelCache (void)

Detailed Description

Definition at line 2810 of file wxs_dc.cxx.


Constructor & Destructor Documentation

Definition at line 2837 of file wxs_dc.cxx.

{
    objscheme_destroy(this, (Scheme_Object *) __gc_external);
}

Here is the call graph for this function:


Member Function Documentation

void wxMemoryDC::FreeGetPixelCache ( void  ) [virtual, inherited]

Definition at line 172 of file MemoryDC.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

wxBitmap * wxMemoryDC::GetObject ( ) [inherited]

Definition at line 153 of file MemoryDC.cc.

{
  return selected;
}

Here is the caller graph for this function:

void wxMemoryDC::GetSize ( double *  w,
double *  h 
) [virtual, inherited]

Definition at line 158 of file MemoryDC.cc.

{
  if (selected) {
    double v;
    v = selected->GetWidth();
    *w = v;
    v = selected->GetHeight();
    *h = v;
  } else {
    *w = 0;
    *h = 0;
  }
}

Here is the call graph for this function:

void wxMemoryDC::SelectObject ( wxBitmap bitmap) [inherited]

Definition at line 62 of file MemoryDC.cc.

{
  if (bitmap == selected)
    return;

  EndSetPixel();

  /* Skip wxMemoryDC, because the bitmap's cache is fine. */
  wxWindowDC::FreeGetPixelCache(); 
#ifdef WX_USE_CAIRO
  ReleaseCairoDev();
#endif

  if (!read_only) {
    /* Bitmap selection memory and safety */
    if (bitmap && bitmap->selectedIntoDC)
      bitmap = NULL;

    if (selected) {
      selected->selectedIntoDC = 0;
      selected->selectedTo = NULL;
#ifdef USE_GL
      if (X->wx_gl) {
       X->gl_cfg = NULL;
       X->wx_gl->Reset(NULL, 0, 0);
      }
#endif      
    }
  } else if (bitmap && bitmap->selectedTo) {
    bitmap->selectedTo->FreeGetPixelCache();
#ifdef WX_USE_CAIRO
    bitmap->selectedTo->ReleaseCairoDev();
#endif
  }

  // free all associated GCs
#ifdef WX_USE_XRENDER
  X->picture = 0;
#endif
  Destroy();
  
  if (bitmap && bitmap->Ok()) {
    // The bitmap must use the display and screen of the application.
    // The drawable is the associated pixmap, width, height and depth
    // will be queried with XGetGeometry.
    wxWindowDC_Xinit *init;
    Pixmap pm;
    init = new wxWindowDC_Xinit;
    init->dpy      = wxAPP_DISPLAY;
    init->scn      = wxAPP_SCREEN;
    pm = GETPIXMAP(bitmap);
    init->drawable = pm;
    Initialize(init);
#ifdef USE_GL
    if (X->wx_gl) {
      int depth;
      depth = bitmap->GetDepth();
      X->gl_cfg = bitmap->gl_cfg;
      X->wx_gl->Reset(bitmap->gl_cfg, (depth == 1) ? 0 : (long)pm, 1);
    }
#endif
    // If another colourmap is associated with the bitmap,
    //  use it instead of the current colourmap.
    if (bitmap->GetColourMap() != current_cmap) {
      wxColourMap *cm;
      cm = bitmap->GetColourMap();
      SetColourMap(cm);
    }
    selected = bitmap;
    if (!read_only) {
      bitmap->selectedIntoDC = -1;
      selected->selectedTo = this;
    }
  } else {
    DRAWABLE = 0;
    WIDTH = HEIGHT = 0;
    selected = NULL;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following file: