added Image.getSubImage
This commit is contained in:
parent
22f52c7d63
commit
829a017d2e
|
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue