We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bd0e370 commit 2a53c6fCopy full SHA for 2a53c6f
1 file changed
vg/geom.go
@@ -46,6 +46,14 @@ func (r Rectangle) Size() Point {
46
}
47
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.
59
func (r Rectangle) Path() (p Path) {
0 commit comments