-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
Hi,
I bumped into this problem:
func (d *Drawing) LwPolyline(closed bool, vertices ... []float64) (*entity.LwPolyline, error) {
size := len(vertices)
l := entity.NewLwPolyline(size)
for i := 0; i < size; i++ {
l.Vertices[i] = vertices[i]
}
if closed {
l.Close()
}
l.SetLayer(d.CurrentLayer)
d.AddEntity(l)
return l, nil
}
shouldn't this be:
func (d *Drawing) LwPolyline(closed bool, vertices [][]float64) (*entity.LwPolyline, error) {
Where the spread operator is replaced with a [] so the vertices are correct.
I tested this change and it works fine.
Thanks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels