mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
examples: Temporary compile error fix
This commit is contained in:
parent
0d1d6cfd85
commit
522ec0c1bf
@ -19,9 +19,8 @@ package common
|
|||||||
import (
|
import (
|
||||||
"image"
|
"image"
|
||||||
"image/color"
|
"image/color"
|
||||||
"image/draw"
|
//"image/draw"
|
||||||
"math"
|
"math"
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/hajimehoshi/ebiten"
|
"github.com/hajimehoshi/ebiten"
|
||||||
"github.com/hajimehoshi/ebiten/examples/common/internal/assets"
|
"github.com/hajimehoshi/ebiten/examples/common/internal/assets"
|
||||||
@ -92,14 +91,13 @@ func (f *Font) DrawText(rt *ebiten.Image, str string, ox, oy, scale int, c color
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *Font) DrawTextOnImage(rt draw.Image, str string, ox, oy int) {
|
/*func (f *Font) DrawTextOnImage(rt draw.Image, str string, ox, oy int) {
|
||||||
parts := &fontImageParts{str, f}
|
|
||||||
for i := 0; i < parts.Len(); i++ {
|
for i := 0; i < parts.Len(); i++ {
|
||||||
dx0, dy0, dx1, dy1 := parts.Dst(i)
|
dx0, dy0, dx1, dy1 := parts.Dst(i)
|
||||||
sx0, sy0, _, _ := parts.Src(i)
|
sx0, sy0, _, _ := parts.Src(i)
|
||||||
draw.Draw(rt, image.Rect(dx0+ox, dy0+oy, dx1+ox, dy1+oy), f.origImage, image.Pt(sx0, sy0), draw.Over)
|
draw.Draw(rt, image.Rect(dx0+ox, dy0+oy, dx1+ox, dy1+oy), f.origImage, image.Pt(sx0, sy0), draw.Over)
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
func (f *Font) DrawTextWithShadow(rt *ebiten.Image, str string, x, y, scale int, clr color.Color) {
|
func (f *Font) DrawTextWithShadow(rt *ebiten.Image, str string, x, y, scale int, clr color.Color) {
|
||||||
f.DrawText(rt, str, x+1, y+1, scale, color.NRGBA{0, 0, 0, 0x80})
|
f.DrawText(rt, str, x+1, y+1, scale, color.NRGBA{0, 0, 0, 0x80})
|
||||||
|
Loading…
Reference in New Issue
Block a user