Interface Region

  • All Superinterfaces:
    Bounded
    All Known Implementing Classes:
    Rectangle

    public interface Region
    extends Bounded
    Instances of Region represent a rectangluar space.

    All of the functions provided by Region are in units 1/72" apiece. So, an 8.5" x 11" page will have a width and height of 612 and 792, respectively, with the origin of a graphical context positioned in the bottom-left corner.

    The point described by the values returned by the lx() and by() function is guaranteed to be the bottom-left point of the rectangle. The values returned by the rx() and ty() functions form the top-right point of the rectangle.

    A Region rooted at the point (100, 100) with width of 200 units and height of 300 units will return the following values:

     lx() = 100
     rx() = 300
     by() = 100
     ty() = 400
     height() = 300
     width() = 200
     

    Version:
    ©2004-2024 Snowtide
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      float area()
      The total area of this region.
      Region bounds()
      Instances of Region will always return themselves from their bounds implementations.
      float by()
      The bottom edge of this region.
      float endxpos()
      Deprecated.
      Legacy naming, same as rx()
      float endypos()
      Deprecated.
      Legacy naming, same as ty()
      float height()
      The total height of this region.
      float lx()
      The left edge of this region.
      float rx()
      The right edge of this region.
      float ty()
      The top edge of this region.
      float width()
      The width of this region.
      float xpos()
      Deprecated.
      Legacy naming, same as lx()
      float ypos()
      Deprecated.
      Legacy naming, same as by()
    • Method Detail

      • bounds

        Region bounds()
        Instances of Region will always return themselves from their bounds implementations.
        Specified by:
        bounds in interface Bounded
      • lx

        float lx()
        The left edge of this region.
      • rx

        float rx()
        The right edge of this region.
      • by

        float by()
        The bottom edge of this region.
      • ty

        float ty()
        The top edge of this region.
      • height

        float height()
        The total height of this region.
      • width

        float width()
        The width of this region.
      • area

        float area()
        The total area of this region.
      • xpos

        float xpos()
        Deprecated.
        Legacy naming, same as lx()
      • endxpos

        float endxpos()
        Deprecated.
        Legacy naming, same as rx()
      • ypos

        float ypos()
        Deprecated.
        Legacy naming, same as by()
      • endypos

        float endypos()
        Deprecated.
        Legacy naming, same as ty()