manually aligning textures to avoid rounding issues
This commit is contained in:
parent
8ecff64b4a
commit
e4ffc3f074
@ -255,10 +255,13 @@ class QskTextureNodePrivate final : public QSGGeometryNodePrivate
|
|||||||
|
|
||||||
const qreal ratio = window->effectiveDevicePixelRatio();
|
const qreal ratio = window->effectiveDevicePixelRatio();
|
||||||
|
|
||||||
const QRectF scaledRect( rect.x(), rect.y(),
|
const qreal x = int( rect.x() / ratio ) * ratio;
|
||||||
rect.width() / ratio, rect.height() / ratio );
|
const qreal y = int( rect.y() / ratio ) * ratio;
|
||||||
|
const qreal w = rect.width() / ratio;
|
||||||
|
const qreal h = rect.height() / ratio;
|
||||||
|
|
||||||
QSGGeometry::updateTexturedRectGeometry( &geometry, scaledRect, r );
|
QSGGeometry::updateTexturedRectGeometry(
|
||||||
|
&geometry, QRectF( x, y, w, h ), r );
|
||||||
}
|
}
|
||||||
|
|
||||||
QSGGeometry geometry;
|
QSGGeometry geometry;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user