gg/ox/circle.go

33 lines
507 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"
2024-06-01 16:07:28 +03:00
import "surdeus.su/core/gg/mx"
2024-05-28 11:24:12 +03:00
type Circle struct {
2024-05-28 11:24:12 +03:00
ObjectImpl
2024-06-01 16:07:28 +03:00
mx.Circle
Visibility
Colority
Antialiasity
2024-06-01 16:07:28 +03:00
gg.Layer
}
2024-06-01 16:07:28 +03:00
func (circle *Circle) Draw(c gg.Context) gg.Drawing {
center := circle.Center.
Apply(c.Camera().GetRealMatrice(c))
vector.DrawFilledCircle(
2024-06-01 16:07:28 +03:00
c.Image(),
float32(center.X), float32(center.Y),
2024-01-18 06:06:27 +03:00
float32(circle.Radius),
circle.Color,
circle.Antialias,
)
2024-06-01 16:07:28 +03:00
return gg.Drawing{}
}