Rename At -> DrawImageAt

This commit is contained in:
Hajime Hoshi 2014-12-26 03:00:40 +09:00
parent f2fbd991d2
commit cdc84567ca
6 changed files with 7 additions and 7 deletions

View File

@ -59,7 +59,7 @@ func (d *debugPrintState) drawText(rt *ebiten.Image, str string, x, y int, c col
b := float64(cc.B) / math.MaxUint16
a := float64(cc.A) / math.MaxUint16
clr := ebiten.ScaleColor(r, g, b, a)
op := ebiten.At(x+1, y)
op := ebiten.DrawImageAt(x+1, y)
op.DstParts = dsts
op.SrcParts = srcs
op.ColorMatrix = &clr

View File

@ -50,7 +50,7 @@ func update(screen *ebiten.Image) error {
}
for i := 0; i < 10; i++ {
clr := ebiten.ScaleColor(1.0, 1.0, 1.0, 0.5)
op := ebiten.At(15+int(float64(i)*diff), 20)
op := ebiten.DrawImageAt(15+int(float64(i)*diff), 20)
op.ColorMatrix = &clr
if err := tmpRenderTarget.DrawImage(ebitenImage, op); err != nil {
return err
@ -59,7 +59,7 @@ func update(screen *ebiten.Image) error {
screen.Fill(color.NRGBA{0x00, 0x00, 0x80, 0xff})
for i := 0; i < 10; i++ {
op := ebiten.At(0, int(float64(i)*diff))
op := ebiten.DrawImageAt(0, int(float64(i)*diff))
if err := screen.DrawImage(tmpRenderTarget, op); err != nil {
return err
}

View File

@ -152,7 +152,7 @@ func drawBlocks(r *ebiten.Image, images *Images, blocks [][]BlockType, x, y int)
}
}
blocksImage := images.GetImage("blocks")
op := ebiten.At(x, y)
op := ebiten.DrawImageAt(x, y)
op.SrcParts = srcs
op.DstParts = dsts
r.DrawImage(blocksImage, op)

View File

@ -66,7 +66,7 @@ func drawTitleBackground(r *ebiten.Image, images *Images, c int) {
dx := (-c / 4) % imageWidth
dy := (c / 4) % imageHeight
op := ebiten.At(dx, dy)
op := ebiten.DrawImageAt(dx, dy)
op.SrcParts = srcs
op.DstParts = dsts
r.DrawImage(backgroundImage, op)

View File

@ -45,7 +45,7 @@ func Update(screen *ebiten.Image) error {
clr := ebiten.ScaleColor(1.0, 0.25, 0.25, 1.0)
theta := 2.0 * math.Pi * float64(count%60) / 60.0
clr.Concat(ebiten.RotateHue(theta))
op := ebiten.At(mx, my)
op := ebiten.DrawImageAt(mx, my)
op.ColorMatrix = &clr
canvasRenderTarget.DrawImage(brushRenderTarget, op)
}

View File

@ -209,7 +209,7 @@ type DrawImageOptions struct {
ColorMatrix *ColorMatrix
}
func At(x, y int) *DrawImageOptions {
func DrawImageAt(x, y int) *DrawImageOptions {
geo := TranslateGeometry(float64(x), float64(y))
return &DrawImageOptions{
GeometryMatrix: &geo,