Ok I have found in curtuto1.cpp
=>
void MyFrame::OnAnyBitmapSave(wxCommandEvent& WXUNUSED(event))
{
// GIF isn't supported (because of the licence)
wxString tmp = wxFileSelector(_T("Save Bitmap (PNG/BMP/JPEG)"),
_T(""),
_T(""),
_T(""),
_T("All files (*.*)|*.*|PNG files (*.png)|*.png|BMP files
(*.bmp)|*.bmp|JPEG files (*.jpeg)|*.jpeg"),
wxSAVE,
this);
if (tmp.IsEmpty())
return;
int dx, dy;
m_canvas->GetClientSize( &dx, &dy );
wxRect rect ( 0,0, dx, dy );
wxBitmap bitmap =
m_canvas->GetCanvasView()->GetDrawer2D()->GetSubBitmap(rect);
wxImage asImage = bitmap.ConvertToImage();
//use extension for type define
if (!asImage.SaveFile(tmp))
{
delete &bitmap;
wxMessageBox(_T("There was a problem saving the image as
bitmap."), _T("Saving Bitmap"), wxOK);
return;
}
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Wxart2d-users_dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev