projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
--enable-debug shouldn't be in COMMON_CONFIGURE_OPTIONS, it's used for dbg packages...
[wxWidgets.git]
/
src
/
gtk
/
dcmemory.cpp
diff --git
a/src/gtk/dcmemory.cpp
b/src/gtk/dcmemory.cpp
index 3894dd4f2edf4aff2168a8a3bc0f7c11dbc2cef7..b57a4b8aa81223581bb44e9e2584020ff0197eea 100644
(file)
--- a/
src/gtk/dcmemory.cpp
+++ b/
src/gtk/dcmemory.cpp
@@
-1,5
+1,5
@@
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: dcmemory.cpp
+// Name:
src/gtk/
dcmemory.cpp
// Purpose:
// Author: Robert Roebling
// RCS-ID: $Id$
// Purpose:
// Author: Robert Roebling
// RCS-ID: $Id$
@@
-23,7
+23,7
@@
IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxWindowDC)
wxMemoryDC::wxMemoryDC() : wxWindowDC()
{
wxMemoryDC::wxMemoryDC() : wxWindowDC()
{
- m_ok =
FALSE
;
+ m_ok =
false
;
m_cmap = gtk_widget_get_default_colormap();
m_cmap = gtk_widget_get_default_colormap();
@@
-38,7
+38,7
@@
wxMemoryDC::wxMemoryDC() : wxWindowDC()
wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) )
: wxWindowDC()
{
wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) )
: wxWindowDC()
{
- m_ok =
FALSE
;
+ m_ok =
false
;
m_cmap = gtk_widget_get_default_colormap();
m_cmap = gtk_widget_get_default_colormap();
@@
-59,24
+59,17
@@
void wxMemoryDC::SelectObject( const wxBitmap& bitmap )
m_selected = bitmap;
if (m_selected.Ok())
{
m_selected = bitmap;
if (m_selected.Ok())
{
- if (m_selected.GetPixmap())
- {
- m_window = m_selected.GetPixmap();
- }
- else
- {
- m_window = m_selected.GetBitmap();
- }
+ m_window = m_selected.GetPixmap();
m_selected.PurgeOtherRepresentations(wxBitmap::Pixmap);
m_selected.PurgeOtherRepresentations(wxBitmap::Pixmap);
- m_isMemDC =
TRUE
;
+ m_isMemDC =
true
;
SetUpDC();
}
else
{
SetUpDC();
}
else
{
- m_ok =
FALSE
;
+ m_ok =
false
;
m_window = (GdkWindow *) NULL;
}
}
m_window = (GdkWindow *) NULL;
}
}
@@
-85,7
+78,7
@@
void wxMemoryDC::SetPen( const wxPen& penOrig )
{
wxPen pen( penOrig );
if ( m_selected.Ok() &&
{
wxPen pen( penOrig );
if ( m_selected.Ok() &&
- m_selected.Get
Bitmap()
&&
+ m_selected.Get
Depth() == 1
&&
(pen != *wxTRANSPARENT_PEN) )
{
pen.SetColour( pen.GetColour() == *wxWHITE ? *wxBLACK : *wxWHITE );
(pen != *wxTRANSPARENT_PEN) )
{
pen.SetColour( pen.GetColour() == *wxWHITE ? *wxBLACK : *wxWHITE );
@@
-98,7
+91,7
@@
void wxMemoryDC::SetBrush( const wxBrush& brushOrig )
{
wxBrush brush( brushOrig );
if ( m_selected.Ok() &&
{
wxBrush brush( brushOrig );
if ( m_selected.Ok() &&
- m_selected.Get
Bitmap()
&&
+ m_selected.Get
Depth() == 1
&&
(brush != *wxTRANSPARENT_BRUSH) )
{
brush.SetColour( brush.GetColour() == *wxWHITE ? *wxBLACK : *wxWHITE);
(brush != *wxTRANSPARENT_BRUSH) )
{
brush.SetColour( brush.GetColour() == *wxWHITE ? *wxBLACK : *wxWHITE);
@@
-112,7
+105,7
@@
void wxMemoryDC::SetBackground( const wxBrush& brushOrig )
wxBrush brush(brushOrig);
if ( m_selected.Ok() &&
wxBrush brush(brushOrig);
if ( m_selected.Ok() &&
- m_selected.Get
Bitmap()
&&
+ m_selected.Get
Depth() == 1
&&
(brush != *wxTRANSPARENT_BRUSH) )
{
brush.SetColour( brush.GetColour() == *wxWHITE ? *wxBLACK : *wxWHITE );
(brush != *wxTRANSPARENT_BRUSH) )
{
brush.SetColour( brush.GetColour() == *wxWHITE ? *wxBLACK : *wxWHITE );
@@
-123,7
+116,7
@@
void wxMemoryDC::SetBackground( const wxBrush& brushOrig )
void wxMemoryDC::SetTextForeground( const wxColour& col )
{
void wxMemoryDC::SetTextForeground( const wxColour& col )
{
- if ( m_selected.Ok() && m_selected.Get
Bitmap()
)
+ if ( m_selected.Ok() && m_selected.Get
Depth() == 1
)
{
wxWindowDC::SetTextForeground( col == *wxWHITE ? *wxBLACK : *wxWHITE);
}
{
wxWindowDC::SetTextForeground( col == *wxWHITE ? *wxBLACK : *wxWHITE);
}
@@
-135,7
+128,7
@@
void wxMemoryDC::SetTextForeground( const wxColour& col )
void wxMemoryDC::SetTextBackground( const wxColour &col )
{
void wxMemoryDC::SetTextBackground( const wxColour &col )
{
- if (m_selected.Ok() && m_selected.Get
Bitmap()
)
+ if (m_selected.Ok() && m_selected.Get
Depth() == 1
)
{
wxWindowDC::SetTextBackground( col == *wxWHITE ? *wxBLACK : *wxWHITE );
}
{
wxWindowDC::SetTextBackground( col == *wxWHITE ? *wxBLACK : *wxWHITE );
}
@@
-158,5
+151,3
@@
void wxMemoryDC::DoGetSize( int *width, int *height ) const
if (height) (*height) = 0;
}
}
if (height) (*height) = 0;
}
}
-
-