case class Bounds(x: Double, y: Double, width: Double, height: Double) extends Product with Serializable

This class is used to represent rectangular bounds. In some cases it is full pixel size bounds for rending. In many cases it is used with values between 0.0 and 1.0 to represent a fractional bounds.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Bounds
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Bounds(x: Double, y: Double, width: Double, height: Double)

Value Members

  1. def centerX: Double

    Calculates the center of the bounds in X.

  2. def centerY: Double

    Calculates the center of the bounds in Y.

  3. val height: Double
  4. def join(that: Bounds): Bounds

    Returns a bounds object that contains both this and that.

    Returns a bounds object that contains both this and that.

    that

    Another bounds to join with this one.

  5. def subX(min: Double, max: Double): Bounds

    Produces a new Bounds object with range in X determined by the fractional min and max arguments.

    Produces a new Bounds object with range in X determined by the fractional min and max arguments. Passing 0.0 and 1.0 would reproduce the original object.

    min

    The fractional relative minimum bound.

    max

    The fractional relative maximum bound.

  6. def subXY(b: Bounds): Bounds

    Produces a new Bounds object with range in X and Y determined by the fractional bounds object.

  7. def subXY(minx: Double, maxx: Double, miny: Double, maxy: Double): Bounds

    Produces a new Bounds object with range in X and Y determined by the fractional min and max arguments.

    Produces a new Bounds object with range in X and Y determined by the fractional min and max arguments. Passing 0.0, 1.0, 0.0, 1.0 would reproduce the original object.

    minx

    The fractional relative minimum bound for X.

    maxx

    The fractional relative maximum bound for X.

    miny

    The fractional relative minimum bound for Y.

    maxy

    The fractional relative maximum bound for Y.

  8. def subXYBorder(minxBorder: Double, maxxBorder: Double, minyBorder: Double, maxyBorder: Double): Bounds

    Produces a new Bounds with absolute offsets for the X and Y values.

    Produces a new Bounds with absolute offsets for the X and Y values.

    minxBorder

    The absolute width of the X offset on the minimum edge.

    maxxBorder

    The absolute width of the X offset on the maximum edge.

    minyBorder

    The absolute height of the Y offset on the minimum edge.

    maxyBorder

    The absolute height of the Y offset on the maximum edge.

  9. def subY(min: Double, max: Double): Bounds

    Produces a new Bounds object with range in Y determined by the fractional min and max arguments.

    Produces a new Bounds object with range in Y determined by the fractional min and max arguments. Passing 0.0 and 1.0 would reproduce the original object.

    min

    The fractional relative minimum bound.

    max

    The fractional relative maximum bound.

  10. val width: Double
  11. val x: Double
  12. val y: Double