显示多态与覆盖的二维图形层次结构:
z
Shape2D
二维图形
Center 中心点
translate 平移 ( 两个参数 )
getCente 返回实例变量值
rotate
旋转
changeScale
改变比例
getArea
返回计算面积结果
getPerimeterLength
周长
getBoundingRect
获外接矩形
Polygon
多边形
getBoundingRect
getVertices
获取顶点
Circle 园
rotate
旋转
…….
getRadius
半径
Ellipse 椭园
semiMinorAxis 半短轴
orientation 方向
rotate
………..
SimplePolygon
简单多边形
orientation 方向
rotate 旋转
getOrientation
定位
ArbitrarPolygon
任意多边形
points
add Points
………..
getVertices ( x)
Rectangle 矩形
height
width
changeScale
setHeight
setWidth
getArea
getPerimeterLength
getVertices
getBoundingRect
RegulorPolygon 正多边形
numPoints
radius
changeNumPoints
changeScale
getArea
getPerimeterLength
getVertices
EllipticalShape
椭园形
semiMajorAxis 半长轴