#include <Shapes.h>
Public Member Functions | |
Circle (double x, double y, double radius, Color penColor, Color fillColor, float lineWidth, int depth=-1) | |
const std::string & | name () const |
Point | center () const |
Shape & | rotate (double angle, const Point ¢er) |
Circle | rotated (double angle, const Point ¢er) const |
Shape & | rotate (double angle) |
Circle | rotated (double angle) const |
Shape & | translate (double dx, double dy) |
Circle | translated (double dx, double dy) const |
Shape & | scale (double sx, double sy) |
Shape & | scale (double s) |
Circle | scaled (double sx, double sy) const |
Circle | scaled (double s) const |
void | scaleAll (double s) |
void | flushSVG (std::ostream &stream, const TransformSVG &transform) const |
Shape * | clone () const |
The circle structure.
const std::string & LibBoard::Circle::name | ( | ) | const [virtual] |
Returns the generic name of the shape (e.g., Circle, Rectangle, etc.)
Reimplemented from LibBoard::Ellipse.
Point LibBoard::Circle::center | ( | ) | const [virtual] |
Returns the gravity center of the shape.
Reimplemented from LibBoard::Ellipse.
Rotate the shape around a given center of rotation.
angle | The rotation angle in radian. | |
center | The center of rotation. |
Reimplemented from LibBoard::Ellipse.
References LibBoard::Ellipse::rotate(), and LibBoard::Point::rotate().
Referenced by rotated().
Shape & LibBoard::Circle::rotate | ( | double | angle | ) | [virtual] |
Rotate the shape around its center.
angle | The rotation angle in radian. |
Reimplemented from LibBoard::Ellipse.
References LibBoard::Ellipse::rotate().
Circle LibBoard::Circle::rotated | ( | double | angle | ) | const |
Shape & LibBoard::Circle::translate | ( | double | dx, | |
double | dy | |||
) | [virtual] |
Translate the shape by a given offset.
dx | The x offset. | |
dy | The y offset. |
Reimplemented from LibBoard::Ellipse.
Circle LibBoard::Circle::translated | ( | double | dx, | |
double | dy | |||
) | const |
dx | ||
dy |
Reimplemented from LibBoard::Ellipse.
References LibBoard::Ellipse::_center, LibBoard::Point::x, and LibBoard::Point::y.
Shape & LibBoard::Circle::scale | ( | double | sx, | |
double | sy | |||
) | [virtual] |
Scale the shape along the x an y axis.
sx | The scale factor along the x axis. | |
sy | The scale factor along the y axis. |
Reimplemented from LibBoard::Ellipse.
References LibBoard::Ellipse::scale().
Referenced by scaled().
Shape & LibBoard::Circle::scale | ( | double | s | ) | [virtual] |
Scale the shape along both axis.
s | The scale factor along both axis. |
Reimplemented from LibBoard::Ellipse.
References LibBoard::Ellipse::scale().
Circle LibBoard::Circle::scaled | ( | double | sx, | |
double | sy | |||
) | const |
void LibBoard::Circle::scaleAll | ( | double | s | ) | [virtual] |
Scales all the values (positions, dimensions, etc.) associated with the shape.
s | The scaling factor. |
Reimplemented from LibBoard::Ellipse.
void LibBoard::Circle::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::Ellipse.
References LibBoard::Ellipse::flushSVG(), LibBoard::Transform::mapX(), LibBoard::TransformSVG::mapY(), LibBoard::Transform::scale(), LibBoard::Shape::svgProperties(), LibBoard::Point::x, and LibBoard::Point::y.
Shape * LibBoard::Circle::clone | ( | ) | const [virtual] |