Box

com.alecdorrington.annotatedtextformat.dom.Box
See theBox companion object
final case class Box(left: Double, top: Double, width: Double, height: Double)

A box in the window, as the DOM measures an element: its left, top, width and height, in pixels.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def at(left: Double, top: Double): Box

It, moved to left and top.

It, moved to left and top.

Attributes

def bottom: Double
def centre: Double

The middle of it, from side to side.

The middle of it, from side to side.

Attributes

def contains(x: Double, y: Double): Boolean

Whether the point (x, y) lies within it, or on its edge.

Whether the point (x, y) lies within it, or on its edge.

Attributes

def corners: List[(Double, Double)]

Its corners, from its top left, clockwise.

Its corners, from its top left, clockwise.

Attributes

def distance(x: Double, y: Double): Double

How far the point (x, y) lies from it: 0 within it.

How far the point (x, y) lies from it: 0 within it.

Attributes

def hull(other: Box): Box

The smallest box holding both it and other.

The smallest box holding both it and other.

Attributes

def right: Double

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product