Skip to content

Commit 8728225

Browse files
committed
fix bigtexture scaled drawing
1 parent ccac3ca commit 8728225

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/Renderer/BigTexture.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ BigTexture::~BigTexture() {
4747
}
4848

4949
void BigTexture::Draw(Rectangle source, Rectangle dest) {
50-
float scaleX = source.width / dest.width;
51-
float scaleY = source.height / dest.height;
50+
float scaleX = dest.width / source.width;
51+
float scaleY = dest.height / source.height;
5252
Box sourceBox(Vector(source.x, source.y), source.width, source.height);
5353
for (int i = 0; i < m_Regions.size(); ++i){
5454
Box sourceIntersect = sourceBox.GetIntersection(m_Regions[i]);

0 commit comments

Comments
 (0)