Package snap.geom

Class RoundRect

All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
ImageBox, StringBox

public class RoundRect extends RectBase
A Shape subclass to represent a rounded rectangle.
  • Constructor Details

    • RoundRect

      public RoundRect()
      Constructor.
    • RoundRect

      public RoundRect(Rect aRect, double aRadius)
      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

      public RoundRect copyForRadius(double aRad)
      Returns a copy with given radius.
    • copyForCorners

      public RoundRect copyForCorners(boolean doNW, boolean doNE, boolean doSE, boolean doSW)
      Returns a copy with only set corners rounded.
    • copyForPosition

      public RoundRect copyForPosition(Pos aPos)
      Returns a copy of this RoundRect only rounding corners appropriate for given position.
    • getPathIter

      public PathIter getPathIter(Transform aTrans)
      Returns a path iterator.
      Specified by:
      getPathIter in class Shape
    • hashCode

      public int hashCode()
      Standard hashCode implementation.
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object anObj)
      Standard equals implementation.
      Overrides:
      equals in class RectBase