Class PixelBounds


  • public class PixelBounds
    extends Object
    Expanded pixel bounds from a point or location. Stored in directional left, up, right, and down pixels
    Since:
    6.3.0
    Author:
    osbornb
    • Constructor Summary

      Constructors 
      Constructor Description
      PixelBounds()
      Empty constructor
      PixelBounds​(double length)
      Constructor
      PixelBounds​(double width, double height)
      Constructor
      PixelBounds​(double left, double up, double right, double down)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void expandDown​(double down)
      Expand the down pixels if greater than the current value
      void expandHeight​(double height)
      Expand the height pixels if greater than the current values
      void expandLeft​(double left)
      Expand the left pixels if greater than the current value
      void expandLength​(double length)
      Expand the length pixels in all directions
      void expandRight​(double right)
      Expand the right pixels if greater than the current value
      void expandUp​(double up)
      Expand the up pixels if greater than the current value
      void expandWidth​(double width)
      Expand the width pixels if greater than the current values
      double getArea()
      Get the pixel area
      double getDown()
      Get the down pixels
      double getHeight()
      Get the total pixel height
      double getLeft()
      Get the left pixels
      double getRight()
      Get the right pixels
      double getUp()
      Get the up pixels
      double getWidth()
      Get the total pixel width
      void setDown​(double down)
      Set the down pixels
      void setLeft​(double left)
      Set the left pixels
      void setRight​(double right)
      Set the right pixels
      void setUp​(double up)
      Set the up pixels
    • Constructor Detail

      • PixelBounds

        public PixelBounds()
        Empty constructor
      • PixelBounds

        public PixelBounds​(double length)
        Constructor
        Parameters:
        length - length in all directions
      • PixelBounds

        public PixelBounds​(double width,
                           double height)
        Constructor
        Parameters:
        width - length both left and right
        height - height both up and down
      • PixelBounds

        public PixelBounds​(double left,
                           double up,
                           double right,
                           double down)
        Constructor
        Parameters:
        left - left length
        up - up length
        right - right length
        down - down length
    • Method Detail

      • getLeft

        public double getLeft()
        Get the left pixels
        Returns:
        left pixels
      • setLeft

        public void setLeft​(double left)
        Set the left pixels
        Parameters:
        left - left pixels
      • expandLeft

        public void expandLeft​(double left)
        Expand the left pixels if greater than the current value
        Parameters:
        left - left pixels
      • getUp

        public double getUp()
        Get the up pixels
        Returns:
        up pixels
      • setUp

        public void setUp​(double up)
        Set the up pixels
        Parameters:
        up - up pixels
      • expandUp

        public void expandUp​(double up)
        Expand the up pixels if greater than the current value
        Parameters:
        up - up pixels
      • getRight

        public double getRight()
        Get the right pixels
        Returns:
        right pixels
      • setRight

        public void setRight​(double right)
        Set the right pixels
        Parameters:
        right - right pixels
      • expandRight

        public void expandRight​(double right)
        Expand the right pixels if greater than the current value
        Parameters:
        right - right pixels
      • getDown

        public double getDown()
        Get the down pixels
        Returns:
        down pixels
      • setDown

        public void setDown​(double down)
        Set the down pixels
        Parameters:
        down - down pixels
      • expandDown

        public void expandDown​(double down)
        Expand the down pixels if greater than the current value
        Parameters:
        down - down pixels
      • expandWidth

        public void expandWidth​(double width)
        Expand the width pixels if greater than the current values
        Parameters:
        width - width pixels
      • expandHeight

        public void expandHeight​(double height)
        Expand the height pixels if greater than the current values
        Parameters:
        height - height pixels
      • expandLength

        public void expandLength​(double length)
        Expand the length pixels in all directions
        Parameters:
        length - length pixels
      • getWidth

        public double getWidth()
        Get the total pixel width
        Returns:
        pixel width
      • getHeight

        public double getHeight()
        Get the total pixel height
        Returns:
        pixel height
      • getArea

        public double getArea()
        Get the pixel area
        Returns:
        pixel area