git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17002
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if (!image.LoadFile( filename, type )) return FALSE;
if (image.Ok())
{
if (!image.LoadFile( filename, type )) return FALSE;
if (image.Ok())
{
- *this = image.ConvertToBitmap();
+ *this = wxBitmap(image);
return TRUE;
}
else return FALSE;
return TRUE;
}
else return FALSE;
wxBitmapHandler *handler = FindHandler(type);
if ( handler == NULL ) { // try wxImage
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;
}
if (image.Ok()) return image.SaveFile( filename, type );
else return FALSE;
}
memdc.SelectObject(bitmap);
memdc.Blit(0, 0, 1, 1, (wxDC*) this, x1, y1);
memdc.SelectObject(wxNullBitmap);
memdc.SelectObject(bitmap);
memdc.Blit(0, 0, 1, 1, (wxDC*) this, x1, y1);
memdc.SelectObject(wxNullBitmap);
+ wxImage image = bitmap.ConvertToImage();
col->Set(image.GetRed(0, 0), image.GetGreen(0, 0), image.GetBlue(0, 0));
return TRUE;
}
col->Set(image.GetRed(0, 0), image.GetGreen(0, 0), image.GetBlue(0, 0));
return TRUE;
}
wxASSERT_MSG( (bitmap.Ok()), "Bad source bitmap in wxWindowDC::Blit");
wxASSERT_MSG( (bitmap.Ok()), "Bad source bitmap in wxWindowDC::Blit");
+ wxImage image = bitmap.ConvertToImage();
if (!image.Ok())
{
sourcePixmap = (Pixmap) bitmap.GetPixmap();
if (!image.Ok())
{
sourcePixmap = (Pixmap) bitmap.GetPixmap();
int scaledH = (int) (bitmap.GetHeight() * scaleY);
image = image.Scale(scaledW, scaledH);
int scaledH = (int) (bitmap.GetHeight() * scaleY);
image = image.Scale(scaledW, scaledH);
- scaledBitmap = new wxBitmap(image.ConvertToBitmap());
+ scaledBitmap = new wxBitmap(image);
sourcePixmap = (Pixmap) scaledBitmap->GetPixmap();
}
}
sourcePixmap = (Pixmap) scaledBitmap->GetPixmap();
}
}
double y1 = y;
// Create image from the source bitmap after writing the text into it.
double y1 = y;
// Create image from the source bitmap after writing the text into it.
+ wxImage image = src.ConvertToImage();
int minx = roundmin(0, roundmin(x4, roundmin(x2, x3)));
int miny = roundmin(0, roundmin(y4, roundmin(y2, y3)));
int minx = roundmin(0, roundmin(x4, roundmin(x2, x3)));
int miny = roundmin(0, roundmin(y4, roundmin(y2, y3)));