public class CRectangle extends CRectangularShape
Canvas
.
If filled, the fill paint is used to paint the interior.
If outlined, the outline paint and stroke are used to draw the boundary.Constructor and Description |
---|
CRectangle()
Builds an empty CRectangle.
|
CRectangle(double x,
double y,
double w,
double h)
Builds a CRectangle.
|
CRectangle(double x,
double y,
double w,
double h,
double arcw,
double arch)
Builds a
CRectangle having rounded corners. |
CRectangle(java.awt.geom.Point2D p,
double w,
double h)
Builds a CRectangle.
|
CRectangle(java.awt.geom.Point2D p,
double w,
double h,
double arcw,
double arch)
Builds a
CRectangle . |
Modifier and Type | Method and Description |
---|---|
CShape |
duplicate()
Creates a new copy of this shape and returns it.
|
CRectangle |
roundCorners(double arcw,
double arch)
Changes the arc used to round off the corners of this
CRectangle . |
setBoundingBox, setBoundingBox, setDiagonal, setDiagonal, setHeight, setWidth
above, aboveAll, addChild, addGhost, addTag, addTag, addTag, addTo, animate, asEllipse, asImage, asPolyLine, asRectangle, asRectangularShape, asText, attachSM, below, belowAll, canvasToShape, canvasToShapeRef, clone, contains, contains, contains, contains, copyTo, detachSM, duplicateWithTags, firstShape, fixReferenceShapeToCurrent, getAbsShape, getAbsTransform, getAntialiasedShapes, getBoundingBox, getCanvas, getCenterX, getCenterY, getChild, getChildren, getChildrenCount, getClip, getFilledShapes, getFillPaint, getFirstAntialiasedShape, getFirstFilledShape, getFirstHavingTag, getFirstOutlinedShape, getGhost, getHeight, getHierarchy, getIntersection, getMaxX, getMaxY, getMinX, getMinY, getOutlinedShapes, getOutlinePaint, getParent, getReferenceX, getReferenceY, getRenderingHint, getRotation, getScaleX, getScaleY, getShape, getStroke, getSubtraction, getTags, getTransform, getTranslateX, getTranslateY, getTransparencyFill, getTransparencyOutline, getWidth, hasTag, hasTag, indexOf, intersects, isAbove, isAntialiased, isBelow, isDrawable, isFilled, isOnOutline, isOutlined, isPickable, isPicked, paint, pick, pickStyle, remove, removeAllChildren, removeChild, removeChild, removeGhost, removeTag, removeTag, rotateBy, rotateTo, scaleBy, scaleBy, scaleTo, scaleTo, setAntialiased, setClip, setDrawable, setFilled, setFillPaint, setOutlined, setOutlinePaint, setParent, setPickable, setReferencePoint, setReferencePoint, setRenderingHint, setShape, setStroke, setTransformToIdentity, setTransparencyFill, setTransparencyFill, setTransparencyOutline, setTransparencyOutline, shapeToCanvas, translateBy, translateTo
public CRectangle()
public CRectangle(double x, double y, double w, double h)
x
- The x coordinate of the upper left point of the bounding boxy
- The y coordinate of the upper left point of the bounding boxw
- The width of the bounding boxh
- The height of the bounding boxpublic CRectangle(double x, double y, double w, double h, double arcw, double arch)
CRectangle
having rounded corners.x
- The x coordinate of the upper left point of the bounding boxy
- The y coordinate of the upper left point of the bounding boxw
- The width of the bounding boxh
- The height of the bounding boxarcw
- The width of the arc to use to round off the corners of the newly constructed CRectangle
arch
- The height of the arc to use to round off the corners of the newly constructed CRectangle
public CRectangle(java.awt.geom.Point2D p, double w, double h, double arcw, double arch)
CRectangle
.p
- The upper left point of the bounding boxw
- The width of the bounding boxh
- The height of the bounding boxarcw
- The width of the arc to use to round off the corners of the newly constructed CRectangle
arch
- The height of the arc to use to round off the corners of the newly constructed CRectangle
public CRectangle(java.awt.geom.Point2D p, double w, double h)
p
- The upper left point of the bounding boxw
- The width of the bounding boxh
- The height of the bounding boxpublic CShape duplicate()
duplicate
in class CShape
CShape.duplicateWithTags()
public CRectangle roundCorners(double arcw, double arch)
CRectangle
.arcw
- The width of the arc to use to round off the cornersarch
- The height of the arc to use to round off the cornersCRectangle
.