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
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def at(point: Point): BoundingBox
def at(landmark: Landmark): BoundingBox
def enclose(toInclude: Point): BoundingBox

Expand bounding box to enclose the given Point.

Expand bounding box to enclose the given Point.

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.

def expand(expansion: Double): BoundingBox

Add expansion to all sides of this bounding box.

Add expansion to all sides of this bounding box.

def height: Double
def width: Double

Inherited methods

def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product