MCPcopy Create free account
hub / github.com/tdewolff/canvas / Expand

Method Expand

util.go:469–475  ·  view source on GitHub ↗

Expand expands the rectangle.

(d float64)

Source from the content-addressed store, hash-verified

467
468// Expand expands the rectangle.
469func (r Rect) Expand(d float64) Rect {
470 r.X0 -= d
471 r.Y0 -= d
472 r.X1 += d
473 r.Y1 += d
474 return r
475}
476
477// ContainsPoint returns true if the rectangle contains or touches an edge.
478func (r Rect) ContainsPoint(p Point) bool {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected