Add returns the rectangle r translated by p.
(p Point)
| 48 | |
| 49 | // Add returns the rectangle r translated by p. |
| 50 | func (r Rectangle) Add(p Point) Rectangle { |
| 51 | return Rectangle{ |
| 52 | Min: r.Min.Add(p), |
| 53 | Max: r.Max.Add(p), |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | // Path returns the path of a Rect specified by its |
| 58 | // upper left corner, width and height. |