support retina display
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74291 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
ead8d60c3d
commit
a4f6fe43c3
@ -211,13 +211,14 @@ void SurfaceImpl::Init(SurfaceID hdc_, WindowID) {
|
|||||||
hdc = (wxDC*)hdc_;
|
hdc = (wxDC*)hdc_;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SurfaceImpl::InitPixMap(int width, int height, Surface *WXUNUSED(surface_), WindowID) {
|
void SurfaceImpl::InitPixMap(int width, int height, Surface *WXUNUSED(surface_), WindowID winid) {
|
||||||
Release();
|
Release();
|
||||||
hdc = new wxMemoryDC();
|
hdc = new wxMemoryDC();
|
||||||
hdcOwned = true;
|
hdcOwned = true;
|
||||||
if (width < 1) width = 1;
|
if (width < 1) width = 1;
|
||||||
if (height < 1) height = 1;
|
if (height < 1) height = 1;
|
||||||
bitmap = new wxBitmap(width, height);
|
bitmap = new wxBitmap();
|
||||||
|
bitmap->CreateScaled(width, height,wxBITMAP_SCREEN_DEPTH,((wxWindow*)winid)->GetContentScaleFactor());
|
||||||
((wxMemoryDC*)hdc)->SelectObject(*bitmap);
|
((wxMemoryDC*)hdc)->SelectObject(*bitmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user