Package mil.nga.geopackage.style
Class PixelBounds
- java.lang.Object
-
- mil.nga.geopackage.style.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 constructorPixelBounds(double length)
ConstructorPixelBounds(double width, double height)
ConstructorPixelBounds(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 valuevoid
expandHeight(double height)
Expand the height pixels if greater than the current valuesvoid
expandLeft(double left)
Expand the left pixels if greater than the current valuevoid
expandLength(double length)
Expand the length pixels in all directionsvoid
expandRight(double right)
Expand the right pixels if greater than the current valuevoid
expandUp(double up)
Expand the up pixels if greater than the current valuevoid
expandWidth(double width)
Expand the width pixels if greater than the current valuesdouble
getArea()
Get the pixel areadouble
getDown()
Get the down pixelsdouble
getHeight()
Get the total pixel heightdouble
getLeft()
Get the left pixelsdouble
getRight()
Get the right pixelsdouble
getUp()
Get the up pixelsdouble
getWidth()
Get the total pixel widthvoid
setDown(double down)
Set the down pixelsvoid
setLeft(double left)
Set the left pixelsvoid
setRight(double right)
Set the right pixelsvoid
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 rightheight
- height both up and down
-
PixelBounds
public PixelBounds(double left, double up, double right, double down)
Constructor- Parameters:
left
- left lengthup
- up lengthright
- right lengthdown
- 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
-
-