diff options
Diffstat (limited to 'go/ui/spinner.go')
| -rw-r--r-- | go/ui/spinner.go | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/go/ui/spinner.go b/go/ui/spinner.go index 083ec292..e00fcc02 100644 --- a/go/ui/spinner.go +++ b/go/ui/spinner.go @@ -52,26 +52,8 @@ func (s *Spinner) render() *ebiten.Image { strokeOp := &vector.StrokeOptions{} strokeOp.Width = float32(SPINNER_DEFAULT_STROKE) - vertices := []ebiten.Vertex{} - indices := []uint16{} - vertices, indices = path.AppendVerticesAndIndicesForStroke(vertices, indices, strokeOp) - - { - r, g, b, a := s.fg.RGBA() - for i := range vertices { - vertices[i].SrcX = 1 - vertices[i].SrcY = 1 - vertices[i].ColorR = float32(r) - vertices[i].ColorG = float32(g) - vertices[i].ColorB = float32(b) - vertices[i].ColorA = float32(a) - } - } - - op := &ebiten.DrawTrianglesOptions{} - op.AntiAlias = true - op.FillRule = ebiten.FillRuleNonZero - op.ColorScaleMode = ebiten.ColorScaleModePremultipliedAlpha - img.DrawTriangles(vertices, indices, whiteSubImage, op) + drawOp := &vector.DrawPathOptions{} + drawOp.AntiAlias = true + vector.StrokePath(img, &path, strokeOp, drawOp) return img } |
