Cache thumb bounds
This commit is contained in:
parent
6da5875341
commit
707df2e07d
1 changed files with 1 additions and 0 deletions
|
@ -104,6 +104,7 @@ func (s *Sprite) Draw(screen *ebiten.Image) error {
|
|||
s.thumb = ebiten.NewImage(s.rect.Dx(), s.rect.Dy())
|
||||
}
|
||||
s.thumb.DrawImage(s.img, thumbOp)
|
||||
s.thumbBounds = s.thumb.Bounds()
|
||||
}
|
||||
screen.DrawImage(s.thumb, op)
|
||||
return nil
|
||||
|
|
Loading…
Reference in a new issue