Class Rect

java.lang.Object
io.sf.carte.doc.geom.Rect
All Implemented Interfaces:
DOMRect

public class Rect extends Object implements DOMRect
Implementation of DOMRect.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    Rect(double x, double y, double width, double height)
     
  • 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Rect

      public Rect()
    • Rect

      public Rect(double x, double y, double width, double height)
  • Method Details

    • getX

      public double getX()
      Description copied from interface: DOMRect
      The horizontal distance between the viewport’s left edge and the rectangle’s origin.
      Specified by:
      getX in interface DOMRect
      Returns:
      the value of x.
    • setX

      public void setX(double value)
      Description copied from interface: DOMRect
      Set the horizontal distance between the viewport’s left edge and the rectangle’s origin.
      Specified by:
      setX in interface DOMRect
      Parameters:
      value - the value of x.
    • getY

      public double getY()
      Description copied from interface: DOMRect
      The vertical distance between the viewport’s top edge and the rectangle’s origin.
      Specified by:
      getY in interface DOMRect
      Returns:
      the value of y.
    • setY

      public void setY(double value)
      Description copied from interface: DOMRect
      Set the vertical distance between the viewport’s top edge and the rectangle’s origin.
      Specified by:
      setY in interface DOMRect
      Parameters:
      value - the value of y.
    • getWidth

      public double getWidth()
      Description copied from interface: DOMRect
      The width of the rectangle. Can be negative.
      Specified by:
      getWidth in interface DOMRect
      Returns:
      the value of width.
    • setWidth

      public void setWidth(double width)
      Description copied from interface: DOMRect
      Set the width of the rectangle.
      Specified by:
      setWidth in interface DOMRect
      Parameters:
      width - the value of width. Can be negative.
    • getHeight

      public double getHeight()
      Description copied from interface: DOMRect
      The height of the rectangle. Can be negative.
      Specified by:
      getHeight in interface DOMRect
      Returns:
      the value of height.
    • setHeight

      public void setHeight(double height)
      Description copied from interface: DOMRect
      Set the height of the rectangle.
      Specified by:
      setHeight in interface DOMRect
      Parameters:
      height - the value of height. Can be negative.
    • getTop

      public double getTop()
      Description copied from interface: DOMRect
      The top of the rectangle.
      Specified by:
      getTop in interface DOMRect
      Returns:
      the top of the rectangle.
    • getRight

      public double getRight()
      Description copied from interface: DOMRect
      The right of the rectangle.
      Specified by:
      getRight in interface DOMRect
      Returns:
      the right of the rectangle.
    • getBottom

      public double getBottom()
      Description copied from interface: DOMRect
      The bottom of the rectangle.
      Specified by:
      getBottom in interface DOMRect
      Returns:
      the bottom of the rectangle.
    • getLeft

      public double getLeft()
      Description copied from interface: DOMRect
      The left of the rectangle.
      Specified by:
      getLeft in interface DOMRect
      Returns:
      the left of the rectangle.