Skip to content

Commit

Permalink
Fixes y position when changing src.h
Browse files Browse the repository at this point in the history
  • Loading branch information
nobbele committed May 23, 2021
1 parent 69e4ce3 commit 535c188
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/graphics/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,8 @@ impl Drawable for Image {
let new_dest = mint::Point2 {
x: dest.x - rotation.sin() * f32::from(self.height),
y: dest.y + f32::from(self.height()) * scale.y
- (1.0 - rotation.cos()) * f32::from(self.height),
- (1.0 - rotation.cos()) * f32::from(self.height)
- (1.0 - param.src.h) * f32::from(self.height),
};
let new_offset = mint::Point2 {
x: offset.x,
Expand Down

0 comments on commit 535c188

Please sign in to comment.