missing paint device metrics added

This commit is contained in:
Uwe Rathmann 2021-12-09 17:22:52 +01:00
parent be16e74336
commit b0cbb4f9e4

View File

@ -430,7 +430,7 @@ QPaintEngine* QskGraphic::paintEngine() const
int QskGraphic::metric( PaintDeviceMetric deviceMetric ) const int QskGraphic::metric( PaintDeviceMetric deviceMetric ) const
{ {
int value; int value = 0;
switch ( deviceMetric ) switch ( deviceMetric )
{ {
@ -472,9 +472,18 @@ int QskGraphic::metric( PaintDeviceMetric deviceMetric ) const
value = qRound( metric( PdmHeight ) * 25.4 / metric( PdmDpiY ) ); value = qRound( metric( PdmHeight ) * 25.4 / metric( PdmDpiY ) );
break; break;
} }
default: case PdmDevicePixelRatio:
value = 0; {
value = 1.0;
break;
}
case PdmDevicePixelRatioScaled:
{
value = metric( PdmDevicePixelRatio ) * devicePixelRatioFScale();
break;
}
} }
return value; return value;
} }