BoundingBox

final case class BoundingBox(left: Double, top: Double, right: Double, bottom: Double)

A doodle.core.BoundingBox represents a bounding box around an picture.

A bounding box also defines a local coordinate system for a picture. The bounding box must contain the origin of the coordinate system. However the origin need not be centered within the box.

No particular guarantees are made about the tightness of the bounding box, though it can assumed to be reasonably tight.

Companion:
object
Source:
BoundingBox.scala
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def enclose(toInclude: Point): BoundingBox

Expand bounding box to enclose the given Point.

Expand bounding box to enclose the given Point.

Source:
BoundingBox.scala
def eval(landmark: Landmark): Point

Evaluate the landmark relative to the origin of this bounding box, returning the location described by the landmark.

Evaluate the landmark relative to the origin of this bounding box, returning the location described by the landmark.

Source:
BoundingBox.scala
def expand(expansion: Double): BoundingBox

Add expansion to all sides of this bounding box.

Add expansion to all sides of this bounding box.

Source:
BoundingBox.scala

Inherited methods

Inherited from:
Product