From cea0aa72cb59769fe5cc7b6250ec48e0d9acb3bc Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Fri, 16 Jul 2021 17:20:00 +0900 Subject: [PATCH] vector: Rename AppendVerticesAndIndices to AppendVerticesAndIndicesForFilling Updates #844 --- examples/vector/main.go | 6 +++--- vector/path.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/vector/main.go b/examples/vector/main.go index 6a4805517..836c7b71c 100644 --- a/examples/vector/main.go +++ b/examples/vector/main.go @@ -112,7 +112,7 @@ func drawEbitenText(screen *ebiten.Image) { op := &ebiten.DrawTrianglesOptions{ EvenOdd: true, } - vs, is := path.AppendVerticesAndIndices(nil, nil) + vs, is := path.AppendVerticesAndIndicesForFilling(nil, nil) for i := range vs { vs[i].SrcX = 1 vs[i].SrcY = 1 @@ -152,7 +152,7 @@ func drawEbitenLogo(screen *ebiten.Image, x, y int) { op := &ebiten.DrawTrianglesOptions{ EvenOdd: true, } - vs, is := path.AppendVerticesAndIndices(nil, nil) + vs, is := path.AppendVerticesAndIndicesForFilling(nil, nil) for i := range vs { vs[i].SrcX = 1 vs[i].SrcY = 1 @@ -195,7 +195,7 @@ func drawWave(screen *ebiten.Image, counter int) { op := &ebiten.DrawTrianglesOptions{ EvenOdd: true, } - vs, is := path.AppendVerticesAndIndices(nil, nil) + vs, is := path.AppendVerticesAndIndicesForFilling(nil, nil) for i := range vs { vs[i].SrcX = 1 vs[i].SrcY = 1 diff --git a/vector/path.go b/vector/path.go index a4b5a8ff6..c3686b967 100644 --- a/vector/path.go +++ b/vector/path.go @@ -127,15 +127,15 @@ func (p *Path) cubicTo(x1, y1, x2, y2, x3, y3 float32, level int) { p.cubicTo(x123, y123, x23, y23, x3, y3, level+1) } -// AppendVerticesAndIndices appends vertices and indices for this path and returns them. -// AppendVerticesAndIndices works in a similar way to the built-in append function. +// AppendVerticesAndIndicesForFilling appends vertices and indices to fill this path and returns them. +// AppendVerticesAndIndicesForFilling works in a similar way to the built-in append function. // If the arguments are nils, AppendVerticesAndIndices returns new slices. // // The returned vertice's SrcX and SrcY are 0, and ColorR, ColorG, ColorB, and ColorA are 1. // // The returned values are intended to be passed to DrawTriangles or DrawTrianglesShader with EvenOdd option // in order to render a complex polygon like a concave polygon, a polygon with holes, or a self-intersecting polygon. -func (p *Path) AppendVerticesAndIndices(vertices []ebiten.Vertex, indices []uint16) ([]ebiten.Vertex, []uint16) { +func (p *Path) AppendVerticesAndIndicesForFilling(vertices []ebiten.Vertex, indices []uint16) ([]ebiten.Vertex, []uint16) { // TODO: Add tests. var base uint16