The usual amount of trash over my telephone fixed
Horses everywhere git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -99,23 +99,32 @@ MyCanvas::MyCanvas( wxWindow *parent, const wxWindowID id,
|
||||
dir = wxString("../");
|
||||
#endif
|
||||
|
||||
//#ifdef __WXMOTIF__
|
||||
dir = wxString("../");
|
||||
//#endif
|
||||
|
||||
#ifndef __WXMOTIF__
|
||||
wxImage image( bitmap );
|
||||
image.SaveFile( dir + wxString("test.png"), wxBITMAP_TYPE_PNG );
|
||||
|
||||
#else
|
||||
wxImage image;
|
||||
#endif
|
||||
|
||||
image.LoadFile( dir + wxString("horse.png"), wxBITMAP_TYPE_PNG );
|
||||
image.SetRGB( 0, 0, 250, 0, 0 );
|
||||
image.SetRGB( 1, 0, 100, 100, 100 );
|
||||
image.SetRGB( 2, 0, 250, 250, 250 );
|
||||
my_horse = new wxBitmap( image.ConvertToBitmap() );
|
||||
|
||||
|
||||
#ifndef __WXMOTIF__
|
||||
image.LoadFile( dir + wxString("test.png"), wxBITMAP_TYPE_PNG );
|
||||
my_square = new wxBitmap( image.ConvertToBitmap() );
|
||||
#endif
|
||||
}
|
||||
|
||||
MyCanvas::~MyCanvas()
|
||||
{
|
||||
delete my_horse;
|
||||
#ifndef __WXMOTIF__
|
||||
delete my_square;
|
||||
#endif
|
||||
}
|
||||
|
||||
void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
||||
@@ -123,6 +132,7 @@ void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
||||
wxPaintDC dc( this );
|
||||
PrepareDC( dc );
|
||||
|
||||
#ifndef __WXMOTIF__
|
||||
dc.DrawText( "Loaded image", 30, 100 );
|
||||
if (my_square->Ok()) dc.DrawBitmap( *my_square, 30, 120 );
|
||||
|
||||
@@ -130,7 +140,12 @@ void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
||||
dc.SetBrush( wxBrush( "orange", wxSOLID ) );
|
||||
dc.SetPen( *wxWHITE_PEN );
|
||||
dc.DrawRectangle( 150, 120, 100, 100 );
|
||||
<<<<<<< image.cpp
|
||||
#endif
|
||||
|
||||
=======
|
||||
|
||||
>>>>>>> 1.11
|
||||
if (my_horse->Ok()) dc.DrawBitmap( *my_horse, 30, 240 );
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user