mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
parent
dcc98e78e9
commit
940d6b11c8
4
image.go
4
image.go
@ -703,6 +703,10 @@ func (i *Image) DrawRectShader(width, height int, shader *Shader, options *DrawR
|
|||||||
// A sub-image returned by SubImage can be used as a rendering source and a rendering destination.
|
// A sub-image returned by SubImage can be used as a rendering source and a rendering destination.
|
||||||
// If a sub-image is used as a rendering source, the image is used as if it is a small image.
|
// If a sub-image is used as a rendering source, the image is used as if it is a small image.
|
||||||
// If a sub-image is used as a rendering destination, the region being rendered is clipped.
|
// If a sub-image is used as a rendering destination, the region being rendered is clipped.
|
||||||
|
//
|
||||||
|
// Successive uses of multiple various regions as rendering destination might not be efficient,
|
||||||
|
// even though all the underlying images are the same.
|
||||||
|
// It's because such renderings cannot be unified into one internal draw command.
|
||||||
func (i *Image) SubImage(r image.Rectangle) image.Image {
|
func (i *Image) SubImage(r image.Rectangle) image.Image {
|
||||||
i.copyCheck()
|
i.copyCheck()
|
||||||
if i.isDisposed() {
|
if i.isDisposed() {
|
||||||
|
Loading…
Reference in New Issue
Block a user