ebitenutil: Refactoring: Remove debugPrintRenderTarget

This commit is contained in:
Hajime Hoshi 2018-02-27 03:13:58 +09:00
parent adbd0db765
commit deed56f971

View File

@ -24,8 +24,7 @@ import (
)
type debugPrintState struct {
textImage *ebiten.Image
debugPrintRenderTarget *ebiten.Image
textImage *ebiten.Image
}
var defaultDebugPrintState = &debugPrintState{}
@ -86,10 +85,6 @@ func (d *debugPrintState) DebugPrint(r *ebiten.Image, str string) {
img := assets.CreateTextImage()
d.textImage, _ = ebiten.NewImageFromImage(img, ebiten.FilterNearest)
}
if d.debugPrintRenderTarget == nil {
width, height := 256, 256
d.debugPrintRenderTarget, _ = ebiten.NewImage(width, height, ebiten.FilterNearest)
}
d.drawText(r, str, 1, 1, color.NRGBA{0x00, 0x00, 0x00, 0x80})
d.drawText(r, str, 0, 0, color.NRGBA{0xff, 0xff, 0xff, 0xff})
}