Package snap.geom
Class RoundRect
java.lang.Object
snap.geom.Shape
snap.geom.RectBase
snap.geom.RoundRect
- All Implemented Interfaces:
Cloneable
A Shape subclass to represent a rounded rectangle.
-
Field Summary
Fields inherited from class snap.geom.Shape
_bounds, WIND_EVEN_ODD, WIND_NON_ZERO
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncopyForCorners
(boolean doNW, boolean doNE, boolean doSE, boolean doSW) Returns a copy with only set corners rounded.copyForPosition
(Pos aPos) Returns a copy of this RoundRect only rounding corners appropriate for given position.copyForRadius
(double aRad) Returns a copy with given radius.boolean
Standard equals implementation.getPathIter
(Transform aTrans) Returns a path iterator.double
Returns the radius of the round.int
hashCode()
Standard hashCode implementation.void
setRadius
(double aValue) Sets the radius of the round.Methods inherited from class snap.geom.RectBase
clone, copyFor, copyFor, equals, getBoundsImpl, getHeight, getMaxX, getMaxY, getMidX, getMidY, getMinX, getMinY, getSize, getSvgString, getWidth, getX, getXY, getY, inset, inset, inset, isEmpty, offset, setCenteredXY, setHeight, setRect, setRect, setSize, setWidth, setX, setXY, setY, toString
Methods inherited from class snap.geom.Shape
addShapes, contains, contains, contains, contains, containsSeg, copyForBounds, crossesSeg, getArcLength, getBounds, getCrossings, getDistance, getFlattenedShape, getFlattenedShape, getNotSelfIntersectingShape, intersectShapes, intersectsSeg, intersectsShape, intersectsShape, intersectsXY, isClosed, isFlat, isMultiCycle, isSelfIntersecting, isSingleCycle, shapeChanged, subtractShapes
-
Constructor Details
-
RoundRect
public RoundRect()Constructor. -
RoundRect
Constructor. -
RoundRect
public RoundRect(double aX, double aY, double aW, double aH, double aRadius) Constructor.
-
-
Method Details
-
getRadius
public double getRadius()Returns the radius of the round. -
setRadius
public void setRadius(double aValue) Sets the radius of the round. -
copyForRadius
Returns a copy with given radius. -
copyForCorners
Returns a copy with only set corners rounded. -
copyForPosition
Returns a copy of this RoundRect only rounding corners appropriate for given position. -
getPathIter
Returns a path iterator.- Specified by:
getPathIter
in classShape
-
hashCode
public int hashCode()Standard hashCode implementation. -
equals
Standard equals implementation.
-