gg/ox/circle.go

32 lines
464 B
Go
Raw Normal View History

2024-05-28 11:24:12 +03:00
package ox
import (
"github.com/hajimehoshi/ebiten/v2/vector"
)
2024-05-28 11:24:12 +03:00
import "surdeus.su/core/gg"
type Circle struct {
2024-05-28 11:24:12 +03:00
ObjectImpl
gg.Transform
Visibility
Colority
Antialiasity
Layer
2024-01-18 06:06:27 +03:00
Radius Float
}
func (circle *Circle) Draw(c *Context) []EVertex {
2024-01-18 06:06:27 +03:00
rPos := circle.Position().Apply(c.Camera.RealMatrix())
vector.DrawFilledCircle(
c.Image,
float32(rPos.X), float32(rPos.Y),
2024-01-18 06:06:27 +03:00
float32(circle.Radius),
circle.Color,
circle.Antialias,
)
return nil
}