wxMGL build fixes for current HEAD (and 2.7.2)
ABX
abx at abx.art.pl
Fri Nov 3 09:26:45 PST 2006
Hi!
There is long list of posts unreaded here so I'm not sure about current commit
policy so please take this quick build fix for wxMGL sources:
diff -u -3 -P -r wxWidgets/src/mgl/bitmap.cpp wxW/src/mgl/bitmap.cpp
--- wxWidgets/src/mgl/bitmap.cpp Fri Nov 03 10:34:53 2006
+++ wxW/src/mgl/bitmap.cpp Fri Nov 03 17:36:46 2006
@@ -647,7 +647,8 @@
int w = bitmap->GetWidth(),
h = bitmap->GetHeight();
- mem.SelectObject(*bitmap);
+ wxBitmap bmp(*bitmap);
+ mem.SelectObject(bmp);
tdc = mem.GetMGLDC();
switch (type)
diff -u -3 -P -r wxWidgets/src/mgl/brush.cpp wxW/src/mgl/brush.cpp
--- wxWidgets/src/mgl/brush.cpp Fri Nov 03 10:34:53 2006
+++ wxW/src/mgl/brush.cpp Fri Nov 03 17:42:37 2006
@@ -35,7 +35,8 @@
if ( pix != NULL )
{
- mem.SelectObject(bitmap);
+ wxBitmap bmpPix(bitmap);
+ mem.SelectObject(bmpPix);
dc = mem.GetMGLDC();
wxCurrentDCSwitcher curDC(dc);
dc->beginPixel();
@@ -50,7 +51,8 @@
if ( mask && bitmap.GetMask() )
{
- mem.SelectObject(bitmap.GetMask()->GetBitmap());
+ wxBitmap bmpMask(bitmap.GetMask()->GetBitmap());
+ mem.SelectObject(bmpMask);
dc = mem.GetMGLDC();
wxCurrentDCSwitcher curDC(dc);
dc->beginPixel();
diff -u -3 -P -r wxWidgets/src/mgl/dc.cpp wxW/src/mgl/dc.cpp
--- wxWidgets/src/mgl/dc.cpp Fri Sep 29 10:55:33 2006
+++ wxW/src/mgl/dc.cpp Fri Nov 03 17:48:07 2006
@@ -1091,7 +1091,7 @@
{
wxCHECK_RET( Ok(), wxT("invalid dc") );
- if ( palette == wxNullPalette )
+ if ( palette.IsNull() )
{
if ( m_oldPalette.Ok() )
SetPalette(m_oldPalette);
@@ -1099,7 +1099,10 @@
}
if ( !palette.Ok() ) return;
+#if 0
+ // TODO: reenable when '==' is back
if ( m_palette == palette ) return;
+#endif
m_oldPalette = m_palette;
m_palette = palette;
diff -u -3 -P -r wxWidgets/src/mgl/pen.cpp wxW/src/mgl/pen.cpp
--- wxWidgets/src/mgl/pen.cpp Fri Nov 03 10:34:53 2006
+++ wxW/src/mgl/pen.cpp Fri Nov 03 17:55:19 2006
@@ -38,7 +38,11 @@
// we intentionally don't compare m_hPen fields here
return m_style == data.m_style &&
m_width == data.m_width &&
+#if 0
+ // pixpattern24_t is struct { uchar p[8][8][3]; }
+ // so operator '==' is not clear
m_pixPattern == data.m_pixPattern &&
+#endif
m_capStyle == data.m_capStyle &&
m_joinStyle == data.m_joinStyle &&
m_colour == data.m_colour &&
More information about the wx-dev
mailing list