Interface DOMRect

All Known Implementing Classes:
Rect

public interface DOMRect
Interface representing a DOMRect value.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    The bottom of the rectangle.
    double
    The height of the rectangle.
    double
    The left of the rectangle.
    double
    The right of the rectangle.
    double
    The top of the rectangle.
    double
    The width of the rectangle.
    double
    The horizontal distance between the viewport’s left edge and the rectangle’s origin.
    double
    The vertical distance between the viewport’s top edge and the rectangle’s origin.
    void
    setHeight(double height)
    Set the height of the rectangle.
    void
    setWidth(double width)
    Set the width of the rectangle.
    void
    setX(double value)
    Set the horizontal distance between the viewport’s left edge and the rectangle’s origin.
    void
    setY(double value)
    Set the vertical distance between the viewport’s top edge and the rectangle’s origin.
  • Method Details

    • getX

      double getX()
      The horizontal distance between the viewport’s left edge and the rectangle’s origin.
      Returns:
      the value of x.
    • setX

      void setX(double value)
      Set the horizontal distance between the viewport’s left edge and the rectangle’s origin.
      Parameters:
      value - the value of x.
    • getY

      double getY()
      The vertical distance between the viewport’s top edge and the rectangle’s origin.
      Returns:
      the value of y.
    • setY

      void setY(double value)
      Set the vertical distance between the viewport’s top edge and the rectangle’s origin.
      Parameters:
      value - the value of y.
    • getWidth

      double getWidth()
      The width of the rectangle. Can be negative.
      Returns:
      the value of width.
    • setWidth

      void setWidth(double width)
      Set the width of the rectangle.
      Parameters:
      width - the value of width. Can be negative.
    • getHeight

      double getHeight()
      The height of the rectangle. Can be negative.
      Returns:
      the value of height.
    • setHeight

      void setHeight(double height)
      Set the height of the rectangle.
      Parameters:
      height - the value of height. Can be negative.
    • getTop

      double getTop()
      The top of the rectangle.
      Returns:
      the top of the rectangle.
    • getRight

      double getRight()
      The right of the rectangle.
      Returns:
      the right of the rectangle.
    • getBottom

      double getBottom()
      The bottom of the rectangle.
      Returns:
      the bottom of the rectangle.
    • getLeft

      double getLeft()
      The left of the rectangle.
      Returns:
      the left of the rectangle.