Path returns the path of a Rect specified by its upper left corner, width and height.
()
| 57 | // Path returns the path of a Rect specified by its |
| 58 | // upper left corner, width and height. |
| 59 | func (r Rectangle) Path() (p Path) { |
| 60 | p.Move(r.Min) |
| 61 | p.Line(Point{X: r.Max.X, Y: r.Min.Y}) |
| 62 | p.Line(r.Max) |
| 63 | p.Line(Point{X: r.Min.X, Y: r.Max.Y}) |
| 64 | p.Close() |
| 65 | return |
| 66 | } |