|
From: Emilien K. <cur...@us...> - 2005-08-24 16:27:34
|
Update of /cvsroot/wxdevcenter/StdPlugin/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10807/src Modified Files: BitmapDocView.cpp Log Message: Link creation bitmap size to the "new bitmap" dialog box data. Fill created bitmap in white. Index: BitmapDocView.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/src/BitmapDocView.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** BitmapDocView.cpp 24 Aug 2005 10:55:34 -0000 1.28 --- BitmapDocView.cpp 24 Aug 2005 16:27:25 -0000 1.29 *************** *** 9,14 **** #include <wxDevCenter/StdPlugin/BitmapDocView.h> - #include <wxDevCenter/StdPlugin/BitmapProp.h> - #include <wxDevCenter/FileSystem.h> #include <wxDevCenter/DocView.h> --- 9,12 ---- *************** *** 359,362 **** --- 357,368 ---- ////////////////////////////////////////////////////////////////////// + // Remplit la bitmap avec la couleur de fond. + bool action::Create::Do() + { + BitmapDrawRectangle(m_pDoc->GetBitmap(), wxRect(wxPoint(0,0), m_pDoc->GetBitmapSize()), *wxTRANSPARENT_PEN, *wxWHITE_BRUSH); + return true; + } + + /** *************** *** 591,595 **** BitmapDocument::BitmapDocument(): ! ActionDocument() { m_strName = wxT("NewBitmap"); --- 597,602 ---- BitmapDocument::BitmapDocument(): ! ActionDocument(), ! m_BmpProp(wxSize(640, 480)) { m_strName = wxT("NewBitmap"); *************** *** 606,609 **** --- 613,617 ---- } m_Bmp = wxBitmap(Img); + m_BmpProp.SetSize(wxSize(m_Bmp.GetWidth(), m_Bmp.GetHeight())); return true; } *************** *** 635,643 **** BitmapPropertiesDialog Dialog(NULL, -1, wxT("New bitmap")); ! Dialog.ShowModal(); ! m_Bmp.Create(40, 40, 24); ! ClearCommands(); ! Do(new action::Create(this)); return true; } --- 643,655 ---- BitmapPropertiesDialog Dialog(NULL, -1, wxT("New bitmap")); ! Dialog.SetProperties(m_BmpProp); ! if(Dialog.ShowModal()==wxID_OK) ! { ! m_BmpProp = Dialog.GetProperties(); ! m_Bmp.Create(m_BmpProp.GetSize().x, m_BmpProp.GetSize().y, 24); ! ClearCommands(); ! Do(new action::Create(this)); ! } return true; } |