added Image.getSubImage

This commit is contained in:
DaniTheSkunk 2022-09-18 02:43:11 +02:00
parent 22f52c7d63
commit 829a017d2e
1 changed files with 6 additions and 0 deletions

View File

@ -74,4 +74,10 @@ public class Image {
} }
} }
} }
public Image getSubImage(Recti rect) {
Image img = new Image(rect.getSize());
img.drawImage(this, Vec2i.ZERO, rect);
return img;
}
} }