Fix creating sub-bitmap of wxGraphicsBitmap (GDI+)
Retrieved sub-bitmap should have the same pixel format like the source bitmap.
This commit is contained in:
@@ -2869,7 +2869,7 @@ wxGraphicsBitmap wxGDIPlusRenderer::CreateSubBitmap( const wxGraphicsBitmap &bit
|
||||
wxNullGraphicsBitmap, wxS("Invalid bitmap region"));
|
||||
|
||||
wxGraphicsBitmap p;
|
||||
p.SetRefData(new wxGDIPlusBitmapData( this , image->Clone( (REAL) x , (REAL) y , (REAL) w , (REAL) h , PixelFormat32bppPARGB) ));
|
||||
p.SetRefData(new wxGDIPlusBitmapData( this , image->Clone( (REAL) x , (REAL) y , (REAL) w , (REAL) h , image->GetPixelFormat()) ));
|
||||
return p;
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user