From: Pablo d'A. <da...@us...> - 2007-05-09 11:52:09
|
Update of /cvsroot/hugin/hugin/src/hugin In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv31419/src/hugin Modified Files: CPImageCtrl.cpp Log Message: use functions compatible with wx 2.6 Index: CPImageCtrl.cpp =================================================================== RCS file: /cvsroot/hugin/hugin/src/hugin/CPImageCtrl.cpp,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -r1.64 -r1.65 --- CPImageCtrl.cpp 8 May 2007 22:21:13 -0000 1.64 +++ CPImageCtrl.cpp 9 May 2007 11:52:05 -0000 1.65 @@ -347,7 +347,8 @@ wxPoint tul = p + wxPoint(l-3,l-3); wxFont font(8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_LIGHT); dc.SetFont(font); - wxSize tSize = dc.GetTextExtent(label); + wxCoord tw, th; + dc.GetTextExtent(label, &tw, &th); if (drawMag) { wxBitmap magBitmap = generateMagBitmap(point, p); @@ -364,7 +365,7 @@ // draw background dc.SetPen(wxPen(wxT("BLACK"), 1, wxSOLID)); dc.SetBrush(wxBrush(bgColor ,wxSOLID)); - dc.DrawRectangle(tul.x, tul.y, tSize.GetWidth()+2*tB, tSize.GetHeight()+2*tB); + dc.DrawRectangle(tul.x, tul.y, tw+2*tB, th+2*tB); // draw number dc.SetTextForeground(textColor); dc.DrawText(label, tul + wxPoint(tB,tB)); @@ -509,11 +510,6 @@ p[2] = ~p[2]; magImg(hw+1, x) = p; } -{ - //vigra::ImageExportInfo exI("/tmp/mag2.tif"); - //vigra::exportImage(srcImageRange(magImg), exI); -} - // paint onto image. return wxBitmap (img); } @@ -555,7 +551,7 @@ return; } wxImage img = imageCacheEntry2wxImage(m_img); - if (!img.IsOk()) { + if (img.GetWidth() == 0) { return; } imageSize = wxSize(img.GetWidth(), img.GetHeight()); |