mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
graphics: Change the definition of isSubImage
This commit is contained in:
parent
75a0d109be
commit
8f133c443e
5
image.go
5
image.go
@ -154,7 +154,7 @@ func (i *Image) isDisposed() bool {
|
||||
}
|
||||
|
||||
func (i *Image) isSubImage() bool {
|
||||
return i.bounds != nil
|
||||
return i.original != nil
|
||||
}
|
||||
|
||||
// Clear resets the pixels of the image into 0.
|
||||
@ -605,7 +605,8 @@ func (img *Image) Set(x, y int, clr color.Color) {
|
||||
|
||||
func (i *Image) resolvePixelsToSet(draw bool) {
|
||||
if i.isSubImage() {
|
||||
i = i.original
|
||||
i.original.resolvePixelsToSet(draw)
|
||||
return
|
||||
}
|
||||
|
||||
if i.pixelsToSet == nil {
|
||||
|
Loading…
Reference in New Issue
Block a user