A rectangle. More...
#include <Shapes.h>
Public Member Functions | |
| Rectangle (double x, double y, double width, double height, Color penColor, Color fillColor, double lineWidth, const LineStyle style=SolidStyle, const LineCap cap=ButtCap, const LineJoin join=MiterJoin, int depth=-1) | |
| Rectangle (const Rect &rect, Color penColor, Color fillColor, double lineWidth, const LineStyle style=SolidStyle, const LineCap cap=ButtCap, const LineJoin join=MiterJoin, int depth=-1) | |
| const std::string & | name () const |
| double | x () const |
| double | y () const |
| double | width () |
| double | height () |
| Point | topLeft () |
| Point | topRight () |
| Point | bottomLeft () |
| Point | bottomRight () |
| Rectangle | rotated (double angle, const Point ¢er) const |
| Rectangle | rotated (double angle) const |
| Rectangle | translated (double dx, double dy) const |
| Rectangle | scaled (double sx, double sy) const |
| Rectangle | scaled (double s) const |
| void | scaleAll (double s) |
| void | flushFIG (std::ostream &stream, const TransformFIG &transform, std::map< Color, int > &colormap) const |
| void | flushSVG (std::ostream &stream, const TransformSVG &transform) const |
| Rectangle * | clone () const |
Protected Attributes | |
| bool | _isRectangle |
A rectangle.
The rectangle structure.
examples/arrows.cpp, examples/ellipse.cpp, examples/example4.cpp, and examples/ruler.cpp.
| Rectangle * LibBoard::Rectangle::clone | ( | ) | const [virtual] |
| void LibBoard::Rectangle::flushFIG | ( | std::ostream & | stream, | |
| const TransformFIG & | transform, | |||
| std::map< Color, int > & | colormap | |||
| ) | const [virtual] |
Writes the FIG code of the shape in a stream according to a transform.
| stream | The output stream. | |
| transform | A 2D transform to be applied. |
Reimplemented from LibBoard::Polyline.
References LibBoard::Shape::_depth, LibBoard::Shape::_fillColor, LibBoard::Shape::_lineCap, LibBoard::Shape::_lineJoin, LibBoard::Shape::_lineStyle, LibBoard::Shape::_lineWidth, LibBoard::Shape::_penColor, and LibBoard::Shape::filled().
Referenced by LibBoard::Board::saveFIG().
| void LibBoard::Rectangle::flushSVG | ( | std::ostream & | stream, | |
| const TransformSVG & | transform | |||
| ) | const [virtual] |
Writes the SVG code of the shape in a stream according to a transform.
| stream | The output stream. | |
| transform | A 2D transform to be applied. |
Reimplemented from LibBoard::Polyline.
References LibBoard::Shape::svgProperties().
Referenced by LibBoard::Board::saveSVG().
| const std::string & LibBoard::Rectangle::name | ( | ) | const [virtual] |
Returns the generic name of the shape (e.g., Circle, Rectangle, etc.)
Reimplemented from LibBoard::Polyline.
| Rectangle LibBoard::Rectangle::rotated | ( | double | angle | ) | const |
Returns a copy of the arrow, rotated around its center.
| angle | The angle of rotation. |
Reimplemented from LibBoard::Polyline.
References LibBoard::Polyline::center().
Returns a copy of the arrow, rotated around a given rotation center.
| angle | The rotation angle. | |
| center | The center of rotation. |
Reimplemented from LibBoard::Polyline.
| void LibBoard::Rectangle::scaleAll | ( | double | s | ) | [virtual] |
Scales all the values (positions, dimensions, etc.) associated with the shape.
| s | The scaling factor. |
Reimplemented from LibBoard::Polyline.
References LibBoard::Path::scaleAll().
| Rectangle LibBoard::Rectangle::scaled | ( | double | sx, | |
| double | sy | |||
| ) | const |
Returns a scaled copy of the arrow.
| sx | Scale factor along the x axis. | |
| sy | Scale factor along the y axis. |
Reimplemented from LibBoard::Polyline.
| Rectangle LibBoard::Rectangle::translated | ( | double | dx, | |
| double | dy | |||
| ) | const |
Returns a translated copy of the arrow.
| dx | The shift along the x axis. | |
| dy | The shift along the y axis. |
Reimplemented from LibBoard::Polyline.
1.6.3