32 lines
507 B
Go
32 lines
507 B
Go
package ox
|
|
|
|
import (
|
|
"github.com/hajimehoshi/ebiten/v2/vector"
|
|
)
|
|
|
|
import "surdeus.su/core/gg"
|
|
import "surdeus.su/core/gg/mx"
|
|
|
|
type Circle struct {
|
|
ObjectImpl
|
|
mx.Circle
|
|
Visibility
|
|
Colority
|
|
Antialiasity
|
|
gg.Layer
|
|
}
|
|
|
|
func (circle *Circle) Draw(c gg.Context) gg.Drawing {
|
|
center := circle.Center.
|
|
Apply(c.Camera().GetRealMatrice(c))
|
|
vector.DrawFilledCircle(
|
|
c.Image(),
|
|
float32(center.X), float32(center.Y),
|
|
float32(circle.Radius),
|
|
circle.Color,
|
|
circle.Antialias,
|
|
)
|
|
return gg.Drawing{}
|
|
}
|
|
|
|
|