From 79f1dd05ad302c90eff51ebe7414f17159c619ff Mon Sep 17 00:00:00 2001 From: Mattia Barbon Date: Thu, 5 Sep 2002 20:56:42 +0000 Subject: [PATCH] Build without 2.2 compatibility git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/motif/bitmap.cpp | 4 ++-- src/motif/dcclient.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/motif/bitmap.cpp b/src/motif/bitmap.cpp index fe00dc46fa..bace224758 100644 --- a/src/motif/bitmap.cpp +++ b/src/motif/bitmap.cpp @@ -211,7 +211,7 @@ bool wxBitmap::LoadFile(const wxString& filename, long type) if (!image.LoadFile( filename, type )) return FALSE; if (image.Ok()) { - *this = image.ConvertToBitmap(); + *this = wxBitmap(image); return TRUE; } else return FALSE; @@ -242,7 +242,7 @@ bool wxBitmap::SaveFile(const wxString& filename, int type, const wxPalette *pal wxBitmapHandler *handler = FindHandler(type); if ( handler == NULL ) { // try wxImage - wxImage image( *this ); + wxImage image = this->ConvertToImage(); if (image.Ok()) return image.SaveFile( filename, type ); else return FALSE; } diff --git a/src/motif/dcclient.cpp b/src/motif/dcclient.cpp index efdc2b0a85..202fc3e599 100644 --- a/src/motif/dcclient.cpp +++ b/src/motif/dcclient.cpp @@ -249,7 +249,7 @@ bool wxWindowDC::DoGetPixel( wxCoord x1, wxCoord y1, wxColour *col ) const memdc.SelectObject(bitmap); memdc.Blit(0, 0, 1, 1, (wxDC*) this, x1, y1); memdc.SelectObject(wxNullBitmap); - wxImage image(bitmap); + wxImage image = bitmap.ConvertToImage(); col->Set(image.GetRed(0, 0), image.GetGreen(0, 0), image.GetBlue(0, 0)); return TRUE; } @@ -938,7 +938,7 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord he wxASSERT_MSG( (bitmap.Ok()), "Bad source bitmap in wxWindowDC::Blit"); - wxImage image(bitmap); + wxImage image = bitmap.ConvertToImage(); if (!image.Ok()) { sourcePixmap = (Pixmap) bitmap.GetPixmap(); @@ -949,7 +949,7 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord he int scaledH = (int) (bitmap.GetHeight() * scaleY); image = image.Scale(scaledW, scaledH); - scaledBitmap = new wxBitmap(image.ConvertToBitmap()); + scaledBitmap = new wxBitmap(image); sourcePixmap = (Pixmap) scaledBitmap->GetPixmap(); } } @@ -1279,7 +1279,7 @@ void wxWindowDC::DoDrawRotatedText( const wxString &text, wxCoord x, wxCoord y, double y1 = y; // Create image from the source bitmap after writing the text into it. - wxImage image(src); + wxImage image = src.ConvertToImage(); int minx = roundmin(0, roundmin(x4, roundmin(x2, x3))); int miny = roundmin(0, roundmin(y4, roundmin(y2, y3))); -- 2.45.2