From 40c763724faa337ac843370a127a140e97fde367 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 21 Dec 2014 02:29:04 +0900 Subject: [PATCH] Rename NewTexture -> NewImage --- ebitenutil/debugprint.go | 2 +- ebitenutil/texture.go | 2 +- example/blocks/blocks/textures.go | 2 +- gamecontext.go | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ebitenutil/debugprint.go b/ebitenutil/debugprint.go index 402eea53f..2bb65d450 100644 --- a/ebitenutil/debugprint.go +++ b/ebitenutil/debugprint.go @@ -66,7 +66,7 @@ func (d *debugPrintState) DebugPrint(r *ebiten.RenderTarget, str string) { if err != nil { panic(err) } - d.textTexture, err = ebiten.NewTexture(img, ebiten.FilterNearest) + d.textTexture, err = ebiten.NewImage(img, ebiten.FilterNearest) if err != nil { panic(err) } diff --git a/ebitenutil/texture.go b/ebitenutil/texture.go index c2fdd963e..96c3583ee 100644 --- a/ebitenutil/texture.go +++ b/ebitenutil/texture.go @@ -32,7 +32,7 @@ func NewTextureFromFile(path string, filter ebiten.Filter) (*ebiten.Texture, ima if err != nil { return nil, nil, err } - texture, err := ebiten.NewTexture(img, filter) + texture, err := ebiten.NewImage(img, filter) if err != nil { return nil, nil, err } diff --git a/example/blocks/blocks/textures.go b/example/blocks/blocks/textures.go index 3fe33a426..681d5c62a 100644 --- a/example/blocks/blocks/textures.go +++ b/example/blocks/blocks/textures.go @@ -81,7 +81,7 @@ func (t *Textures) loopMain() { if err != nil { panic(err) } - id, err := ebiten.NewTexture(img, ebiten.FilterNearest) + id, err := ebiten.NewImage(img, ebiten.FilterNearest) if err != nil { panic(err) } diff --git a/gamecontext.go b/gamecontext.go index ad88bf0b2..cdf7d107e 100644 --- a/gamecontext.go +++ b/gamecontext.go @@ -52,7 +52,7 @@ func NewRenderTarget(width, height int, filter Filter) (*RenderTarget, error) { return currentUI.newRenderTarget(width, height, glFilter(filter)) } -// NewTexture returns a new Texture. -func NewTexture(img image.Image, filter Filter) (*Texture, error) { +// NewImage returns a new image. +func NewImage(img image.Image, filter Filter) (*Texture, error) { return currentUI.newTexture(img, glFilter(filter)) }