image: fix image scaling s/win.height/win.width

This commit is contained in:
Tim Culverhouse 2024-07-20 14:02:31 -05:00
parent 53374f4f09
commit 22fab6f38b

View file

@ -118,7 +118,7 @@ pub fn draw(self: Image, win: Window, opts: DrawOptions) !void {
// Does the image require horizontal scaling? // Does the image require horizontal scaling?
else if (!fit_x and fit_y) else if (!fit_x and fit_y)
p_opts.size = .{ p_opts.size = .{
.cols = win.height, .cols = win.width,
} }
else if (!fit_x and !fit_y) { else if (!fit_x and !fit_y) {
const diff_x = self.width - win_width_pix; const diff_x = self.width - win_width_pix;