X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0a470e5ea537237f0562c3b2182ee293dec36eb3..8a31648287be0ef976f133de2786b137f1e98340:/samples/image/image.cpp diff --git a/samples/image/image.cpp b/samples/image/image.cpp index c35f991737..9002c5b84f 100644 --- a/samples/image/image.cpp +++ b/samples/image/image.cpp @@ -866,10 +866,11 @@ private: wxGraphicsBitmap gb(gc->CreateBitmapFromImage(m_image)); gc->SetFont(*wxNORMAL_FONT, *wxBLACK); - gc->DrawText("Bitmap", 0, HEIGHT/2); gc->DrawBitmap(m_bitmap, 0, 0, WIDTH, HEIGHT); + wxGraphicsFont gf = gc->CreateFont(wxNORMAL_FONT->GetPixelSize().y, ""); + gc->SetFont(gf); gc->DrawText("Graphics bitmap", 0, (3*HEIGHT)/2); gc->DrawBitmap(gb, 0, HEIGHT, WIDTH, HEIGHT); } @@ -943,10 +944,14 @@ void MyFrame::OnThumbnail( wxCommandEvent &WXUNUSED(event) ) return; } + int origWidth = image.GetOptionInt( wxIMAGE_OPTION_ORIGINAL_WIDTH ); + int origHeight = image.GetOptionInt( wxIMAGE_OPTION_ORIGINAL_HEIGHT ); + const long loadTime = sw.Time(); MyImageFrame * const frame = new MyImageFrame(this, filename, image); - wxLogStatus(frame, "Loaded \"%s\" in %ldms", filename, loadTime); + wxLogStatus(frame, "Loaded \"%s\" in %ldms; original size was (%d, %d)", + filename, loadTime, origWidth, origHeight); #else wxLogError( wxT("Couldn't create file selector dialog") ); return;