Package jcckit.graphic
Class ClippingRectangle
- java.lang.Object
-
- jcckit.graphic.ClippingRectangle
-
- All Implemented Interfaces:
ClippingShape
public class ClippingRectangle extends java.lang.Object implements ClippingShape
Immutable class of a rectangular clipping area.
-
-
Constructor Summary
Constructors Constructor Description ClippingRectangle(double x1, double y1, double x2, double y2)Creates an instance for the specified coordinates of two opposite corner points.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClippingRectanglegetBoundingBox()Returns this instance.BasicGraphicalElementgetGraphicalElement()Returns aRectangle.doublegetMaxX()Returns the maximum x value.doublegetMaxY()Returns the maximum y value.doublegetMinX()Returns the minimum x value.doublegetMinY()Returns the minimum y value.booleanisInside(GraphPoint point)Returns true if the specified point is inside this rectangle.
-
-
-
Method Detail
-
isInside
public boolean isInside(GraphPoint point)
Returns true if the specified point is inside this rectangle.- Specified by:
isInsidein interfaceClippingShape
-
getMinX
public double getMinX()
Returns the minimum x value.
-
getMaxX
public double getMaxX()
Returns the maximum x value.
-
getMinY
public double getMinY()
Returns the minimum y value.
-
getMaxY
public double getMaxY()
Returns the maximum y value.
-
getBoundingBox
public ClippingRectangle getBoundingBox()
Returns this instance.- Specified by:
getBoundingBoxin interfaceClippingShape
-
getGraphicalElement
public BasicGraphicalElement getGraphicalElement()
Returns aRectangle.- Specified by:
getGraphicalElementin interfaceClippingShape
-
-