Allow creating wxGraphicsFont without using wxFont.
This is mostly important to allow using wxImage-based wxGraphicsContext without requiring X server connection under Unix: as wxFont can't be used without X server, we needed another way to create wxGraphicsFont in this case. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user