mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
parent
289129c9e5
commit
3cafb0f6fd
@ -13,25 +13,28 @@
|
||||
// limitations under the License.
|
||||
|
||||
//go:generate go run gen.go
|
||||
//go:generate go run github.com/hajimehoshi/file2byteslice/cmd/file2byteslice@v1.0.0 -input text.png -output text.png.go -package ebitenutil -var textPng
|
||||
|
||||
package ebitenutil
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
_ "embed"
|
||||
"image"
|
||||
_ "image/png"
|
||||
|
||||
"github.com/hajimehoshi/ebiten/v2"
|
||||
)
|
||||
|
||||
//go:embed text.png
|
||||
var text_png []byte
|
||||
|
||||
var (
|
||||
debugPrintTextImage *ebiten.Image
|
||||
debugPrintTextSubImages = map[rune]*ebiten.Image{}
|
||||
)
|
||||
|
||||
func init() {
|
||||
img, _, err := image.Decode(bytes.NewReader(textPng))
|
||||
img, _, err := image.Decode(bytes.NewReader(text_png))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user