Skip to content

Commit

Permalink
fix adjustImageScaling (cats-oss#502)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tien Dzung committed Sep 20, 2024
1 parent 2d7d61d commit 18bbd10
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,11 @@ private void adjustImageScaling() {
addDistance(textureCords[6], distHorizontal), addDistance(textureCords[7], distVertical),
};
} else {
if (rotation == Rotation.ROTATION_270 || rotation == Rotation.ROTATION_90) {
ratioWidth = ratioWidth + ratioHeight;
ratioHeight = ratioWidth - ratioHeight;
ratioWidth = ratioWidth - ratioHeight;
}
cube = new float[]{
CUBE[0] / ratioHeight, CUBE[1] / ratioWidth,
CUBE[2] / ratioHeight, CUBE[3] / ratioWidth,
Expand Down

0 comments on commit 18bbd10

Please sign in to comment.