public abstract class CRectangularShape extends CShape
Canvas.
CRectangularShape is the base class for CEllipse and CRectangle,
it provides methods to manipulate those shapes by their rectangular bounding box.| Constructor and Description |
|---|
CRectangularShape()
Builds an empty rectangular shape.
|
CRectangularShape(java.awt.Shape s)
Builds a rectangular shape.
|
| Modifier and Type | Method and Description |
|---|---|
CRectangularShape |
setBoundingBox(double minx,
double miny,
double width,
double height)
Define this rectangular shape by its bounding box.
|
CRectangularShape |
setBoundingBox(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2)
Define this rectangular shape by its bounding box.
|
CRectangularShape |
setDiagonal(double x1,
double y1,
double x2,
double y2)
Define this rectangular shape by its diagonal.
|
CRectangularShape |
setDiagonal(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2)
Define this rectangular shape by its diagonal.
|
CRectangularShape |
setHeight(double h)
Sets the height of this
CRectangularShape. |
CRectangularShape |
setWidth(double w)
Sets the width of this
CRectangularShape. |
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, duplicate, 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, translateTopublic CRectangularShape(java.awt.Shape s)
s - The shape (Rectangle2D or Ellipse2D)public CRectangularShape()
public CRectangularShape setBoundingBox(java.awt.geom.Point2D p1, java.awt.geom.Point2D p2)
p1 - One corner of the diagonal of the bounding box.p2 - The other corner of the diagonal of the bounding box.public CRectangularShape setBoundingBox(double minx, double miny, double width, double height)
minx - The x coordinate of the upper left corner of the bounding box.miny - The y coordinate of the upper left corner of the bounding box.width - The width of the bounding box.height - The height of the bounding box.public CRectangularShape setDiagonal(double x1, double y1, double x2, double y2)
x1 - The x coordinate of one corner of the diagonal.y1 - The y coordinate of one corner of the diagonal.x2 - The x coordinate of the other corner of the diagonal.y2 - The y coordinate of the other corner of the diagonal.public CRectangularShape setDiagonal(java.awt.geom.Point2D p1, java.awt.geom.Point2D p2)
p1 - One corner of the diagonal.p2 - The other corner of the diagonal.public CRectangularShape setWidth(double w)
CRectangularShape.w - The new widthCRectangularShape.public CRectangularShape setHeight(double h)
CRectangularShape.h - The new heightCRectangularShape.