Skip to content

Commit a20b0f8

Browse files
committed
Fix transform origin in getFastBounds()
1 parent 51661db commit a20b0f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/renderedtarget.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,8 +422,8 @@ Rect RenderedTarget::getFastBounds() const
422422
const double textureScale = m_skin->getTextureScale(m_cpuTexture);
423423
const double width = m_cpuTexture.width() * m_size / textureScale;
424424
const double height = m_cpuTexture.height() * m_size / textureScale;
425-
const double originX = m_costume->rotationCenterX() * m_size / textureScale / m_costume->bitmapResolution() - width / 2;
426-
const double originY = -m_costume->rotationCenterY() * m_size / textureScale / m_costume->bitmapResolution() + height / 2;
425+
const double originX = m_costume->rotationCenterX() * m_size / m_costume->bitmapResolution() - width / 2;
426+
const double originY = -m_costume->rotationCenterY() * m_size / m_costume->bitmapResolution() + height / 2;
427427
const double rot = -rotation() * pi / 180;
428428

429429
QPointF topLeft = transformPoint(-width / 2, height / 2, originX, originY, rot);

0 commit comments

Comments
 (0)