The Float class defines a rectangle specified in float coordinates.
The Float class defines a rectangle specified in float coordinates.
(->float)
(->float x y w h)
Constructor.
Constructs and initializes a Rectangle2D from the specified float coordinates.
x - the X coordinate of the upper-left corner of the newly constructed Rectangle2D - float
y - the Y coordinate of the upper-left corner of the newly constructed Rectangle2D - float
w - the width of the newly constructed Rectangle2D - float
h - the height of the newly constructed Rectangle2D - float
Constructor. Constructs and initializes a Rectangle2D from the specified float coordinates. x - the X coordinate of the upper-left corner of the newly constructed Rectangle2D - `float` y - the Y coordinate of the upper-left corner of the newly constructed Rectangle2D - `float` w - the width of the newly constructed Rectangle2D - `float` h - the height of the newly constructed Rectangle2D - `float`
(create-intersection this r)
Returns a new Rectangle2D object representing the intersection of this Rectangle2D with the specified Rectangle2D.
r - the Rectangle2D to be intersected with this Rectangle2D - java.awt.geom.Rectangle2D
returns: the largest Rectangle2D contained in both
the specified Rectangle2D and in this
Rectangle2D. - java.awt.geom.Rectangle2D
Returns a new Rectangle2D object representing the intersection of this Rectangle2D with the specified Rectangle2D. r - the Rectangle2D to be intersected with this Rectangle2D - `java.awt.geom.Rectangle2D` returns: the largest Rectangle2D contained in both the specified Rectangle2D and in this Rectangle2D. - `java.awt.geom.Rectangle2D`
(create-union this r)
Returns a new Rectangle2D object representing the union of this Rectangle2D with the specified Rectangle2D.
r - the Rectangle2D to be combined with this Rectangle2D - java.awt.geom.Rectangle2D
returns: the smallest Rectangle2D containing both
the specified Rectangle2D and this
Rectangle2D. - java.awt.geom.Rectangle2D
Returns a new Rectangle2D object representing the union of this Rectangle2D with the specified Rectangle2D. r - the Rectangle2D to be combined with this Rectangle2D - `java.awt.geom.Rectangle2D` returns: the smallest Rectangle2D containing both the specified Rectangle2D and this Rectangle2D. - `java.awt.geom.Rectangle2D`
(empty? this)
Determines whether the RectangularShape is empty. When the RectangularShape is empty, it encloses no area.
returns: true if the RectangularShape is empty;
false otherwise. - boolean
Determines whether the RectangularShape is empty. When the RectangularShape is empty, it encloses no area. returns: true if the RectangularShape is empty; false otherwise. - `boolean`
(get-bounds-2-d this)
Returns a high precision and more accurate bounding box of the Shape than the getBounds method. Note that there is no guarantee that the returned Rectangle2D is the smallest bounding box that encloses the Shape, only that the Shape lies entirely within the indicated Rectangle2D. The bounding box returned by this method is usually tighter than that returned by the getBounds method and never fails due to overflow problems since the return value can be an instance of the Rectangle2D that uses double precision values to store the dimensions.
Note that the definition of insideness can lead to situations where points on the defining outline of the shape may not be considered contained in the returned bounds object, but only in cases where those points are also not considered contained in the original shape.
If a point is inside the shape according to the contains(point) method, then it must be inside the returned Rectangle2D bounds object according to the contains(point) method of the bounds. Specifically:
shape.contains(p) requires bounds.contains(p)
If a point is not inside the shape, then it might still be contained in the bounds object:
bounds.contains(p) does not imply shape.contains(p)
returns: an instance of Rectangle2D that is a
high-precision bounding box of the Shape. - java.awt.geom.Rectangle2D
Returns a high precision and more accurate bounding box of the Shape than the getBounds method. Note that there is no guarantee that the returned Rectangle2D is the smallest bounding box that encloses the Shape, only that the Shape lies entirely within the indicated Rectangle2D. The bounding box returned by this method is usually tighter than that returned by the getBounds method and never fails due to overflow problems since the return value can be an instance of the Rectangle2D that uses double precision values to store the dimensions. Note that the definition of insideness can lead to situations where points on the defining outline of the shape may not be considered contained in the returned bounds object, but only in cases where those points are also not considered contained in the original shape. If a point is inside the shape according to the contains(point) method, then it must be inside the returned Rectangle2D bounds object according to the contains(point) method of the bounds. Specifically: shape.contains(p) requires bounds.contains(p) If a point is not inside the shape, then it might still be contained in the bounds object: bounds.contains(p) does not imply shape.contains(p) returns: an instance of Rectangle2D that is a high-precision bounding box of the Shape. - `java.awt.geom.Rectangle2D`
(get-height this)
Returns the height of the framing rectangle in double precision.
returns: the height of the framing rectangle. - double
Returns the height of the framing rectangle in double precision. returns: the height of the framing rectangle. - `double`
(get-width this)
Returns the width of the framing rectangle in double precision.
returns: the width of the framing rectangle. - double
Returns the width of the framing rectangle in double precision. returns: the width of the framing rectangle. - `double`
(get-x this)
Returns the X coordinate of the upper-left corner of the framing rectangle in double precision.
returns: the X coordinate of the upper-left corner of
the framing rectangle. - double
Returns the X coordinate of the upper-left corner of the framing rectangle in double precision. returns: the X coordinate of the upper-left corner of the framing rectangle. - `double`
(get-y this)
Returns the Y coordinate of the upper-left corner of the framing rectangle in double precision.
returns: the Y coordinate of the upper-left corner of
the framing rectangle. - double
Returns the Y coordinate of the upper-left corner of the framing rectangle in double precision. returns: the Y coordinate of the upper-left corner of the framing rectangle. - `double`
(height this)
Instance Field.
The height of this Rectangle2D.
type: float
Instance Field. The height of this Rectangle2D. type: float
(outcode this x y)
Determines where the specified coordinates lie with respect to this Rectangle2D. This method computes a binary OR of the appropriate mask values indicating, for each side of this Rectangle2D, whether or not the specified coordinates are on the same side of the edge as the rest of this Rectangle2D.
x - the specified X coordinate - double
y - the specified Y coordinate - double
returns: the logical OR of all appropriate out codes. - int
Determines where the specified coordinates lie with respect to this Rectangle2D. This method computes a binary OR of the appropriate mask values indicating, for each side of this Rectangle2D, whether or not the specified coordinates are on the same side of the edge as the rest of this Rectangle2D. x - the specified X coordinate - `double` y - the specified Y coordinate - `double` returns: the logical OR of all appropriate out codes. - `int`
(set-rect this r)
(set-rect this x y w h)
Sets the location and size of this Rectangle2D to the specified float values.
x - the X coordinate of the upper-left corner of this Rectangle2D - float
y - the Y coordinate of the upper-left corner of this Rectangle2D - float
w - the width of this Rectangle2D - float
h - the height of this Rectangle2D - float
Sets the location and size of this Rectangle2D to the specified float values. x - the X coordinate of the upper-left corner of this Rectangle2D - `float` y - the Y coordinate of the upper-left corner of this Rectangle2D - `float` w - the width of this Rectangle2D - `float` h - the height of this Rectangle2D - `float`
(to-string this)
Returns the String representation of this Rectangle2D.
returns: a String representing this
Rectangle2D. - java.lang.String
Returns the String representation of this Rectangle2D. returns: a String representing this Rectangle2D. - `java.lang.String`
(width this)
Instance Field.
The width of this Rectangle2D.
type: float
Instance Field. The width of this Rectangle2D. type: float
(x this)
Instance Field.
The X coordinate of this Rectangle2D.
type: float
Instance Field. The X coordinate of this Rectangle2D. type: float
(y this)
Instance Field.
The Y coordinate of this Rectangle2D.
type: float
Instance Field. The Y coordinate of this Rectangle2D. type: float
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close