final case class Bounds(left: Double, top: Double, width: Double, height: Double) extends Product with Serializable
A Bounds
represents the dimensions of a rectangular area in two-dimensional space.
Bounds
objects are immutable. They assume a space in which x coordinates increase rightwards
and y coordinates downwards.
This class has an alias in the top-level package o1, so it’s accessible to students simply
via import o1._
.
- left
the x coordinate of the left edge of the
Bounds
- top
the y coordinate of the top edge of the
Bounds
- width
the width of the
Bounds
(the distance from its left edge to its right edge)- height
the height of the
Bounds
(the distance from its top edge to its bottom edge)
- Alphabetic
- By Inheritance
- Bounds
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Bounds(left: Double, top: Double, width: Double, height: Double)
- left
the x coordinate of the left edge of the
Bounds
- top
the y coordinate of the top edge of the
Bounds
- width
the width of the
Bounds
(the distance from its left edge to its right edge)- height
the height of the
Bounds
(the distance from its top edge to its bottom edge)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- lazy val bottom: Double
the y coordinate of the bottom edge of the
Bounds
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def contains(pos: Pos): Boolean
Determines if the given Pos is within the bounds.
Determines if the given Pos is within the bounds. For that to be the case, the
Pos
object’sx
needs to be between the left edge (inclusive) and the right edge (exclusive) and itsy
needs to be betewen the top edge (inclusive) and the bottom edge (exclusive). - def contains(x: Double, y: Double): Boolean
Determines if the given pair of coordinates is within the bounds.
Determines if the given pair of coordinates is within the bounds. For that to be the case, the given
x
needs to be between the left edge (inclusive) and the right edge (exclusive) and the giveny
needs to be betewen the top edge (inclusive) and the bottom edge (exclusive). - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val height: Double
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val left: Double
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- lazy val pos: Pos
the coordinates of the top left-hand corner of the
Bounds
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- lazy val right: Double
the x coordinate of the right edge of the
Bounds
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString: String
Returns a textual description of the bounds.
Returns a textual description of the bounds.
- Definition Classes
- Bounds → AnyRef → Any
- val top: Double
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- val width: Double
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
- Deprecated
(Since version ) see corresponding Javadoc for more information.