Skip to content

Commit

Permalink
Fix Image.cropRect
Browse files Browse the repository at this point in the history
  • Loading branch information
skejeton committed Jul 7, 2024
1 parent 313cc00 commit d824977
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/umka
3 changes: 2 additions & 1 deletion umka/image.um
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ fn (i: ^Image) cropRect*(r: rect::Rect) {
th::__error("image is invalid")
}

umth_image_crop(i^, r.getPos(), r.getEnd())
dm := i.getDims()
umth_image_crop(i^, r.getPos().div(dm), r.getEnd().div(dm))
}

fn umth_image_crop_quad(img: Image, q: ^th::Quad)
Expand Down

0 comments on commit d824977

Please sign in to comment.