Rename NewTextureFromFile -> NewImageFromFile

This commit is contained in:
Hajime Hoshi 2014-12-21 02:59:00 +09:00
parent 3a9a7fed87
commit d774c19581
5 changed files with 5 additions and 5 deletions

View File

@ -22,7 +22,7 @@ import (
"os"
)
func NewTextureFromFile(path string, filter ebiten.Filter) (*ebiten.Image, image.Image, error) {
func NewImageFromFile(path string, filter ebiten.Filter) (*ebiten.Image, image.Image, error) {
file, err := os.Open(path)
if err != nil {
return nil, nil, err

View File

@ -72,7 +72,7 @@ func (g *Game) Update(r *ebiten.RenderTarget) error {
func main() {
g := new(Game)
var err error
g.ebitenTexture, _, err = ebitenutil.NewTextureFromFile("images/ebiten.png", ebiten.FilterNearest)
g.ebitenTexture, _, err = ebitenutil.NewImageFromFile("images/ebiten.png", ebiten.FilterNearest)
if err != nil {
log.Fatal(err)
}

View File

@ -67,7 +67,7 @@ func (g *Game) Update(r *ebiten.RenderTarget) error {
func main() {
g := new(Game)
var err error
g.gophersTexture, _, err = ebitenutil.NewTextureFromFile("images/gophers.jpg", ebiten.FilterNearest)
g.gophersTexture, _, err = ebitenutil.NewImageFromFile("images/gophers.jpg", ebiten.FilterNearest)
if err != nil {
log.Fatal(err)
}

View File

@ -47,7 +47,7 @@ func (g *Game) Update(r *ebiten.RenderTarget) error {
func main() {
g := new(Game)
var err error
g.gophersTexture, _, err = ebitenutil.NewTextureFromFile("images/gophers.jpg", ebiten.FilterNearest)
g.gophersTexture, _, err = ebitenutil.NewImageFromFile("images/gophers.jpg", ebiten.FilterNearest)
if err != nil {
log.Fatal(err)
}

View File

@ -55,7 +55,7 @@ func (g *Game) Update(r *ebiten.RenderTarget) error {
func main() {
g := new(Game)
var err error
g.gophersTexture, _, err = ebitenutil.NewTextureFromFile("images/gophers.jpg", ebiten.FilterNearest)
g.gophersTexture, _, err = ebitenutil.NewImageFromFile("images/gophers.jpg", ebiten.FilterNearest)
if err != nil {
log.Fatal(err)
}