Build without 2.2 compatibility
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -211,7 +211,7 @@ bool wxBitmap::LoadFile(const wxString& filename, long type)
|
|||||||
if (!image.LoadFile( filename, type )) return FALSE;
|
if (!image.LoadFile( filename, type )) return FALSE;
|
||||||
if (image.Ok())
|
if (image.Ok())
|
||||||
{
|
{
|
||||||
*this = image.ConvertToBitmap();
|
*this = wxBitmap(image);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else return FALSE;
|
else return FALSE;
|
||||||
@@ -242,7 +242,7 @@ bool wxBitmap::SaveFile(const wxString& filename, int type, const wxPalette *pal
|
|||||||
wxBitmapHandler *handler = FindHandler(type);
|
wxBitmapHandler *handler = FindHandler(type);
|
||||||
|
|
||||||
if ( handler == NULL ) { // try wxImage
|
if ( handler == NULL ) { // try wxImage
|
||||||
wxImage image( *this );
|
wxImage image = this->ConvertToImage();
|
||||||
if (image.Ok()) return image.SaveFile( filename, type );
|
if (image.Ok()) return image.SaveFile( filename, type );
|
||||||
else return FALSE;
|
else return FALSE;
|
||||||
}
|
}
|
||||||
|
@@ -249,7 +249,7 @@ bool wxWindowDC::DoGetPixel( wxCoord x1, wxCoord y1, wxColour *col ) const
|
|||||||
memdc.SelectObject(bitmap);
|
memdc.SelectObject(bitmap);
|
||||||
memdc.Blit(0, 0, 1, 1, (wxDC*) this, x1, y1);
|
memdc.Blit(0, 0, 1, 1, (wxDC*) this, x1, y1);
|
||||||
memdc.SelectObject(wxNullBitmap);
|
memdc.SelectObject(wxNullBitmap);
|
||||||
wxImage image(bitmap);
|
wxImage image = bitmap.ConvertToImage();
|
||||||
col->Set(image.GetRed(0, 0), image.GetGreen(0, 0), image.GetBlue(0, 0));
|
col->Set(image.GetRed(0, 0), image.GetGreen(0, 0), image.GetBlue(0, 0));
|
||||||
return TRUE;
|
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");
|
wxASSERT_MSG( (bitmap.Ok()), "Bad source bitmap in wxWindowDC::Blit");
|
||||||
|
|
||||||
wxImage image(bitmap);
|
wxImage image = bitmap.ConvertToImage();
|
||||||
if (!image.Ok())
|
if (!image.Ok())
|
||||||
{
|
{
|
||||||
sourcePixmap = (Pixmap) bitmap.GetPixmap();
|
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);
|
int scaledH = (int) (bitmap.GetHeight() * scaleY);
|
||||||
|
|
||||||
image = image.Scale(scaledW, scaledH);
|
image = image.Scale(scaledW, scaledH);
|
||||||
scaledBitmap = new wxBitmap(image.ConvertToBitmap());
|
scaledBitmap = new wxBitmap(image);
|
||||||
sourcePixmap = (Pixmap) scaledBitmap->GetPixmap();
|
sourcePixmap = (Pixmap) scaledBitmap->GetPixmap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1279,7 +1279,7 @@ void wxWindowDC::DoDrawRotatedText( const wxString &text, wxCoord x, wxCoord y,
|
|||||||
double y1 = y;
|
double y1 = y;
|
||||||
|
|
||||||
// Create image from the source bitmap after writing the text into it.
|
// 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 minx = roundmin(0, roundmin(x4, roundmin(x2, x3)));
|
||||||
int miny = roundmin(0, roundmin(y4, roundmin(y2, y3)));
|
int miny = roundmin(0, roundmin(y4, roundmin(y2, y3)));
|
||||||
|
Reference in New Issue
Block a user