Hi,
Am 06.11.2015 um 04:58 schrieb Ryan Holmes:
> Also, please be aware that I don't actually have a Retina display and don't know how to emulate one.
Emulation is possible but cumbersome to set up. See
http://www.tonymacx86.com/mavericks-laptop-support/133254-adding-using-hidpi-custom-resolutions.html
> 1) Is there a way to fix the blurred images? This program uses a lot of
> 16x16 and 24x24 png files that are sourced from 32x32 or 64x64 png files
> - these are loaded as images, converted to bitmaps, and then displayed.
> We have no control over the source of these images. Would it be
> sufficient to just ship with the high-quality versions and use
> wx.Image.Scale()? Would that fix the DPI issue?
Scale() will not fix the blurriness because it scales in the virtual
coordinate system (which is half the actual display resolution). I
believe wxWidgets has since had some updates that will make it use @2x
versions of the images if present, but it seems these updates are not
yet available to wxPython. I'm not sure if it's currently possible to
have crisp images on HiDPI displays using wxPython, I've not found a
solution so far.
> 2) The text that is still blurry (in the left-hand list, the tabs, in
> the gauges to the right, etc) is because this is text that is drawn onto
> custom widgets, which are basically bitmaps that are constructed using a
> MemoryDC. The initial bitmap is defined with a certain resolution, and I
> am not sure how to define the DPI / how to fix this (perhaps defining a
> large resolution and scaling down?)
I had similar problems with blurry text on custom widgets in my
application and solved it in most instances simply by using a wx.PaintDC
instead of a wx.BufferedPaintDC. Some of my widgets still need
wx.MemoryDC or other forms of buffering, so the text is still blurry there.
--
Florian Höch