gg/ox/circle.go
2024-05-28 13:24:12 +05:00

31 lines
464 B
Go

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