mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
Rename NewTexture -> NewImage
This commit is contained in:
parent
ee61db3478
commit
40c763724f
@ -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)
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user