|
From: Emilien K. <cur...@us...> - 2005-04-12 12:11:29
|
Update of /cvsroot/wxdevcenter/StdPlugin/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14213/src Modified Files: BitmapCtrl.cpp BitmapDocView.cpp Log Message: Change BitmapDocument to use actions. Index: BitmapCtrl.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/src/BitmapCtrl.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** BitmapCtrl.cpp 4 Mar 2005 16:35:16 -0000 1.14 --- BitmapCtrl.cpp 12 Apr 2005 12:10:55 -0000 1.15 *************** *** 29,32 **** --- 29,34 ---- #include <wx/event.h> #include <wx/dcbuffer.h> + #include <wx/listimpl.cpp> + using namespace wxDevCenter; *************** *** 34,37 **** --- 36,40 ---- + #define BMP_ANCHOR_INFLATE_WIDTH 3 *************** *** 66,70 **** void BitmapCtrl::SetBitmap(const wxBitmap& Bmp) { ! m_Bmp = Bmp; SetVirtualSize(m_Bmp.GetWidth(), m_Bmp.GetHeight()); Refresh(); --- 69,73 ---- void BitmapCtrl::SetBitmap(const wxBitmap& Bmp) { ! m_Bmp = Bmp.GetSubBitmap(wxRect(0, 0, Bmp.GetWidth(), Bmp.GetHeight())); SetVirtualSize(m_Bmp.GetWidth(), m_Bmp.GetHeight()); Refresh(); *************** *** 447,450 **** --- 450,454 ---- dc.SelectObject(m_Bmp); dc.DrawBitmap(m_SaveBuffer, m_ptSaveBuffer); + dc.SelectObject(wxNullBitmap); } } *************** *** 453,456 **** void BitmapCtrl::ClearSaveBitmap() { ! m_SaveBuffer = wxBitmap(NULL, 0, 0); } --- 457,460 ---- void BitmapCtrl::ClearSaveBitmap() { ! m_SaveBuffer = wxNullBitmap; } Index: BitmapDocView.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/src/BitmapDocView.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** BitmapDocView.cpp 4 Apr 2005 09:18:30 -0000 1.22 --- BitmapDocView.cpp 12 Apr 2005 12:10:55 -0000 1.23 *************** *** 20,23 **** --- 20,102 ---- using namespace StdPlugin::Bitmap; + + /** Fonction de tracé de ligne dans une bitmap.*/ + void BitmapDrawLine(wxBitmap& bmp, wxPoint pos1, wxPoint pos2, const wxPen& pen) + { + wxLogDebug("BitmapDrawLine %p", &bmp); + wxMemoryDC dc; + dc.SelectObject(bmp); [...1498 lines suppressed...] ! } ! else ! { ! dcTarget.Blit(rect.x, rect.y, rect.width, rect.height, &dcSource, rect.x, rect.y); ! } ! dcTarget.SelectObject(wxNullBitmap); ! dcSource.SelectObject(wxNullBitmap); ! } } *************** *** 1390,1391 **** --- 1670,1673 ---- return MiniView::OnUpdate(); } + + |