explain why we only consider integers right now
This commit is contained in:
parent
a04a87bcec
commit
53b2aba558
@ -271,6 +271,8 @@ void FrameSvgItem::componentComplete()
|
||||
|
||||
void FrameSvgItem::updateDevicePixelRatio()
|
||||
{
|
||||
//devicepixelratio is always set integer in the svg, so needs at least 192dpi to double up.
|
||||
//(it needs to be integer to have lines contained inside a svg piece to keep being pixel aligned)
|
||||
m_frameSvg->setDevicePixelRatio(qMax((qreal)1.0, floor(m_units.devicePixelRatio())));
|
||||
}
|
||||
|
||||
|
@ -187,6 +187,8 @@ qreal SvgItem::implicitHeight() const
|
||||
void SvgItem::updateDevicePixelRatio()
|
||||
{
|
||||
if (m_svg) {
|
||||
//devicepixelratio is always set integer in the svg, so needs at least 192dpi to double up.
|
||||
//(it needs to be integer to have lines contained inside a svg piece to keep being pixel aligned)
|
||||
m_svg.data()->setDevicePixelRatio(qMax((qreal)1.0, floor(m_units.devicePixelRatio())));
|
||||
}
|
||||
}
|
||||
|
@ -663,6 +663,8 @@ Svg::~Svg()
|
||||
void Svg::setDevicePixelRatio(qreal ratio)
|
||||
{
|
||||
//be completely integer for now
|
||||
//devicepixelratio is always set integer in the svg, so needs at least 192dpi to double up.
|
||||
//(it needs to be integer to have lines contained inside a svg piece to keep being pixel aligned)
|
||||
if (floor(d->devicePixelRatio) == floor(ratio)) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user