mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
parent
c116481d33
commit
e725c7ee78
@ -53,8 +53,8 @@ func drawEbitenText(screen *ebiten.Image) {
|
||||
path.MoveTo(80, 20)
|
||||
path.LineTo(80, 70)
|
||||
path.LineTo(100, 70)
|
||||
path.QuadraticCurveTo(150, 57.5, 100, 45)
|
||||
path.QuadraticCurveTo(150, 32.5, 100, 20)
|
||||
path.QuadTo(150, 57.5, 100, 45)
|
||||
path.QuadTo(150, 32.5, 100, 20)
|
||||
|
||||
// I
|
||||
path.MoveTo(140, 20)
|
||||
@ -154,7 +154,7 @@ func drawWave(screen *ebiten.Image, counter int) {
|
||||
cpx1, cpy1 := x, y
|
||||
cpx0 += 30
|
||||
cpx1 -= 30
|
||||
path.BezierCurveTo(cpx0, cpy0, cpx1, cpy1, x, y)
|
||||
path.CubicTo(cpx0, cpy0, cpx1, cpy1, x, y)
|
||||
}
|
||||
path.LineTo(screenWidth, screenHeight)
|
||||
path.LineTo(0, screenHeight)
|
||||
|
@ -72,7 +72,7 @@ func nseg(x0, y0, x1, y1 float32) int {
|
||||
return int(math.Ceil(float64(dist)))
|
||||
}
|
||||
|
||||
func (p *Path) QuadraticCurveTo(cpx, cpy, x, y float32) {
|
||||
func (p *Path) QuadTo(cpx, cpy, x, y float32) {
|
||||
c := p.cur
|
||||
num := nseg(c.X, c.Y, x, y)
|
||||
for t := float32(0.0); t <= 1; t += 1.0 / float32(num) {
|
||||
@ -82,7 +82,7 @@ func (p *Path) QuadraticCurveTo(cpx, cpy, x, y float32) {
|
||||
}
|
||||
}
|
||||
|
||||
func (p *Path) BezierCurveTo(cp0x, cp0y, cp1x, cp1y, x, y float32) {
|
||||
func (p *Path) CubicTo(cp0x, cp0y, cp1x, cp1y, x, y float32) {
|
||||
c := p.cur
|
||||
num := nseg(c.X, c.Y, x, y)
|
||||
for t := float32(0.0); t <= 1; t += 1.0 / float32(num) {
|
||||
|
Loading…
Reference in New Issue
Block a user