29 lines
428 B
Go
29 lines
428 B
Go
package gg
|
|
|
|
import (
|
|
"github.com/hajimehoshi/ebiten/v2/vector"
|
|
)
|
|
|
|
type Circle struct {
|
|
Object
|
|
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
|
|
}
|
|
|
|
|