/* * Implementation */ Boolean XmuReshapeWidget(Widget w, int shape_style, int corner_width, int corner_height) { switch (shape_style) { case XmuShapeRectangle: ShapeRectangle(w); break; case XmuShapeOval: ShapeOval(w); break; case XmuShapeEllipse: case XmuShapeRoundedRectangle: ShapeEllipseOrRoundedRectangle(w, shape_style == XmuShapeEllipse, corner_width, corner_height); break; default: ShapeError(w); return (False); } return (True); }
RectangleTriangle::RectangleTriangle(Point origin, double width, double height) { this->rectangle = ShapeRectangle(Point(origin.getX() + width/2, origin.getY(), origin.getZ()), width/2, height); this->triangle = ShapeTriangle(origin, width/2, height); }