m_textGC = (GdkGC *) NULL;
m_bgGC = (GdkGC *) NULL;
m_cmap = (GdkColormap *) NULL;
+ m_isMemDC = FALSE;
}
wxPaintDC::wxPaintDC( wxWindow *window )
else
m_cmap = gtk_widget_get_colormap( window->m_widget );
- m_isDrawable = TRUE;
+ m_isMemDC = FALSE;
SetUpDC();
}
{
if (!Ok()) return;
- // FIXME: is this right? Causes a segfault on my system and doesn't
- // seem right: wxPaintDC does not inherit from wxMemoryDC
- // if (!m_isDrawable) ((wxMemoryDC*)this)->m_selected.DestroyImage();
+ if (m_isMemDC) ((wxMemoryDC*)this)->m_selected.DestroyImage();
if (m_pen.GetStyle() != wxTRANSPARENT)
{
{
if (!Ok()) return;
- // FIXME: is this right? Causes a segfault on my system and doesn't
- // seem right: wxPaintDC does not inherit from wxMemoryDC
- // if (!m_isDrawable) ((wxMemoryDC*)this)->m_selected.DestroyImage();
+ if (m_isMemDC) ((wxMemoryDC*)this)->m_selected.DestroyImage();
if (m_pen.GetStyle() != wxTRANSPARENT)
{
{
if (!Ok()) return;
- if (!m_isDrawable) ((wxMemoryDC*)this)->m_selected.DestroyImage();
+ if (m_isMemDC) ((wxMemoryDC*)this)->m_selected.DestroyImage();
long xx1 = XLOG2DEV(x1);
long yy1 = YLOG2DEV(y1);
{
if (!Ok()) return;
- if (!m_isDrawable) ((wxMemoryDC*)this)->m_selected.DestroyImage();
+ if (m_isMemDC) ((wxMemoryDC*)this)->m_selected.DestroyImage();
long xx = XLOG2DEV(x);
long yy = YLOG2DEV(y);
{
if (!Ok()) return;
- if (!m_isDrawable) ((wxMemoryDC*)this)->m_selected.DestroyImage();
+ if (m_isMemDC) ((wxMemoryDC*)this)->m_selected.DestroyImage();
if (m_pen.GetStyle() != wxTRANSPARENT)
gdk_draw_point( m_window, m_penGC, XLOG2DEV(x), YLOG2DEV(y) );
{
if (!Ok()) return;
- if (!m_isDrawable) ((wxMemoryDC*)this)->m_selected.DestroyImage();
+ if (m_isMemDC) ((wxMemoryDC*)this)->m_selected.DestroyImage();
if (m_pen.GetStyle() == wxTRANSPARENT) return;
{
if (!Ok()) return;
- if (!m_isDrawable) ((wxMemoryDC*)this)->m_selected.DestroyImage();
+ if (m_isMemDC) ((wxMemoryDC*)this)->m_selected.DestroyImage();
if (m_pen.GetStyle() == wxTRANSPARENT) return;
{
if (!Ok()) return;
- if (!m_isDrawable) ((wxMemoryDC*)this)->m_selected.DestroyImage();
+ if (m_isMemDC) ((wxMemoryDC*)this)->m_selected.DestroyImage();
if (!n) return; // Nothing to draw
GdkPoint *gdkpoints = new GdkPoint[n+1];
{
if (!Ok()) return;
- if (!m_isDrawable) ((wxMemoryDC*)this)->m_selected.DestroyImage();
+ if (m_isMemDC) ((wxMemoryDC*)this)->m_selected.DestroyImage();
int n = lines->Number();
GdkPoint *gdkpoints = new GdkPoint[n];
{
if (!Ok()) return;
- if (!m_isDrawable) ((wxMemoryDC*)this)->m_selected.DestroyImage();
+ if (m_isMemDC) ((wxMemoryDC*)this)->m_selected.DestroyImage();
long xx = XLOG2DEV(x);
long yy = YLOG2DEV(y);
{
if (!Ok()) return;
- if (!m_isDrawable) ((wxMemoryDC*)this)->m_selected.DestroyImage();
+ if (m_isMemDC) ((wxMemoryDC*)this)->m_selected.DestroyImage();
if (radius < 0.0) radius = - radius * ((width < height) ? width : height);
{
if (!Ok()) return;
- if (!m_isDrawable) ((wxMemoryDC*)this)->m_selected.DestroyImage();
+ if (m_isMemDC) ((wxMemoryDC*)this)->m_selected.DestroyImage();
long xx = XLOG2DEV(x);
long yy = YLOG2DEV(y);
if (!icon.Ok()) return;
- if (!m_isDrawable) ((wxMemoryDC*)this)->m_selected.DestroyImage();
+ if (m_isMemDC) ((wxMemoryDC*)this)->m_selected.DestroyImage();
int xx = XLOG2DEV(x);
int yy = YLOG2DEV(y);
{
if (!Ok()) return FALSE;
- if (!m_isDrawable) ((wxMemoryDC*)this)->m_selected.DestroyImage();
+ if (m_isMemDC) ((wxMemoryDC*)this)->m_selected.DestroyImage();
- // CMB 20/5/98: add blitting of bitmaps
- if (source->IsKindOf(CLASSINFO(wxMemoryDC)))
+ if (m_isMemDC)
{
wxMemoryDC* srcDC = (wxMemoryDC*)source;
GdkBitmap* bmap = srcDC->m_selected.GetBitmap();
{
if (!Ok()) return;
- if (!m_isDrawable) ((wxMemoryDC*)this)->m_selected.DestroyImage();
+ if (m_isMemDC) ((wxMemoryDC*)this)->m_selected.DestroyImage();
GdkFont *font = m_font.GetInternalFont( m_scaleY );
{
if (!Ok()) return;
- if (!m_isDrawable) ((wxMemoryDC*)this)->m_selected.DestroyImage();
+ if (m_isMemDC) ((wxMemoryDC*)this)->m_selected.DestroyImage();
- if (m_isDrawable)
+ if (!m_isMemDC)
{
gdk_window_clear( m_window );
}