Draw draws a line between given coordinates, setting the stroke style to current parameters. Returns false if either Width = 0 or Color = nil
(pt *Plot, start, end math32.Vector2)
| 52 | // Draw draws a line between given coordinates, setting the stroke style |
| 53 | // to current parameters. Returns false if either Width = 0 or Color = nil |
| 54 | func (ls *LineStyle) Draw(pt *Plot, start, end math32.Vector2) bool { |
| 55 | if !ls.SetStroke(pt) { |
| 56 | return false |
| 57 | } |
| 58 | pc := pt.Paint |
| 59 | pc.MoveTo(start.X, start.Y) |
| 60 | pc.LineTo(end.X, end.Y) |
| 61 | pc.Stroke() |
| 62 | return true |
| 63 | } |