From a4f6fe43c33bd7933645d110ad2719871dab043d Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Tue, 25 Jun 2013 15:11:18 +0000 Subject: [PATCH] support retina display git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74291 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/stc/PlatWX.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index af67c0cdaa..a11ddd82bc 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -211,13 +211,14 @@ void SurfaceImpl::Init(SurfaceID hdc_, WindowID) { 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(); hdc = new wxMemoryDC(); hdcOwned = true; if (width < 1) width = 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); } -- 2.47.2