Package org.robolectric.shadows
Class RoundRectangle
java.lang.Object
java.awt.geom.RectangularShape
org.robolectric.shadows.RoundRectangle
public class RoundRectangle extends RectangularShape
Defines a rectangle with rounded corners, where the sizes of the corners are potentially
 different.
 
Copied from https://github.com/aosp-mirror/platform_frameworks_base/blob/oreo-release/tools/layoutlib/bridge/src/android/graphics/RoundRectangle.java
- 
Field Summary
- 
Constructor SummaryConstructors Constructor Description RoundRectangle(float x, float y, float width, float height, float[] cornerDimensions)
- 
Method SummaryModifier and Type Method Description booleancontains(double x, double y)booleancontains(double x, double y, double w, double h)Rectangle2DgetBounds2D()doublegetHeight()PathIteratorgetPathIterator(AffineTransform at)doublegetWidth()doublegetX()doublegetY()booleanintersects(double x, double y, double w, double h)booleanisEmpty()voidsetFrame(double x, double y, double w, double h)Methods inherited from class java.awt.geom.RectangularShapeclone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, getPathIterator, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
- 
Field Details- 
xpublic double x
- 
ypublic double y
- 
widthpublic double width
- 
heightpublic double height
- 
ulWidthpublic double ulWidth
- 
ulHeightpublic double ulHeight
- 
urWidthpublic double urWidth
- 
urHeightpublic double urHeight
- 
lrWidthpublic double lrWidth
- 
lrHeightpublic double lrHeight
- 
llWidthpublic double llWidth
- 
llHeightpublic double llHeight
 
- 
- 
Constructor Details- 
RoundRectanglepublic RoundRectangle(float x, float y, float width, float height, float[] cornerDimensions)- Parameters:
- cornerDimensions- array of 8 floating-point number corresponding to the width and the height of each corner in the following order: upper-left, upper-right, lower-right, lower-left. It assumes for the size the same convention as- RoundRectangle2D, that is that the width and height of a corner correspond to the total width and height of the ellipse that corner is a quarter of.
 
 
- 
- 
Method Details- 
getXpublic double getX()- Specified by:
- getXin class- RectangularShape
 
- 
getYpublic double getY()- Specified by:
- getYin class- RectangularShape
 
- 
getWidthpublic double getWidth()- Specified by:
- getWidthin class- RectangularShape
 
- 
getHeightpublic double getHeight()- Specified by:
- getHeightin class- RectangularShape
 
- 
isEmptypublic boolean isEmpty()- Specified by:
- isEmptyin class- RectangularShape
 
- 
setFramepublic void setFrame(double x, double y, double w, double h)- Specified by:
- setFramein class- RectangularShape
 
- 
getBounds2D
- 
containspublic boolean contains(double x, double y)
- 
intersectspublic boolean intersects(double x, double y, double w, double h)
- 
containspublic boolean contains(double x, double y, double w, double h)
- 
getPathIterator
 
-