[vlc-devel] [PATCH 4/4] Qt: set proper vout size on hidpi setups
lin.aaa.lin at gmail.com
Sun Aug 7 12:48:48 CEST 2016
2016-08-07 11:54 GMT+03:00 Jean-Baptiste Kempf <jb at videolan.org>:
> This cannot be correct. A pixel is a pixel for the video output.
Problem is that we can't go deeper far from that, w and h here are
from Qt's coordinate system. devicePixelRatioF is our only chance to
roughly estimate how much real pixels do we have. I.e multiply widget
size by ratio to find out real pixels or divide vout size by ratio to
get virtual pixels.
Indeed, it is possible to get proper transformation matrix from the
depth of Qt (through paintEngine()->painter()->deviceTransform()), but
that's risky, as it is intended to be used from inside of paint event
and no guaranty that any of this chain will be available somewhere
else. Moreover, somebody already overrode paintEngine() to return null
pointer, there should've been reasons to do that.
More information about the vlc-devel