Create a bounding box that encloses the actual bounding box.

dist is the distance between the inner boundaries and the outer boundaries.

var p = new Point[Int](5,10)
var b = p.padded(3)
assert b.left == 2 and b.right == 8 and b.top == 13 and b.bottom == 7

Property definitions

geometry $ Boxed :: padded
	# Create a bounding box that encloses the actual bounding box.
	# `dist` is the distance between the inner boundaries and the outer boundaries.
	# ~~~
	# var p = new Point[Int](5,10)
	# var b = p.padded(3)
	# assert b.left == 2 and b.right == 8 and b.top == 13 and b.bottom == 7
	# ~~~
	fun padded(dist: N): Box[N] do return new Box[N].lrtb(left - dist, right + dist, top + dist, bottom - dist)
lib/geometry/boxes.nit:78,2--85,108

geometry $ Boxed3d :: padded
	redef fun padded(dist): Box3d[N] do return new Box3d[N].lrtbfb(left - dist, right + dist, top + dist, bottom - dist, front + dist, back - dist)
lib/geometry/boxes.nit:197,2--144