Skip to content

Commit

Permalink
image: fix image scaling s/win.height/win.width
Browse files Browse the repository at this point in the history
  • Loading branch information
rockorager committed Jul 20, 2024
1 parent 53374f4 commit 22fab6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Image.zig
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ pub fn draw(self: Image, win: Window, opts: DrawOptions) !void {
// Does the image require horizontal scaling?
else if (!fit_x and fit_y)
p_opts.size = .{
.cols = win.height,
.cols = win.width,
}
else if (!fit_x and !fit_y) {
const diff_x = self.width - win_width_pix;
Expand Down

0 comments on commit 22fab6f

Please sign in to comment.