DGtal 1.4.0
|
A circle. More...
#include <Board/Shapes.h>
Public Member Functions | |
Circle (double x, double y, double radius, DGtal::Color pen, DGtal::Color fill, double lineWidth, const LineStyle style=SolidStyle, int depthValue=-1) | |
const std::string & | name () const |
Point | center () const |
Circle & | rotate (double angle, const Point ¢er) |
Circle | rotated (double angle, const Point ¢er) const |
Circle & | rotate (double angle) |
Circle | rotated (double angle) const |
Circle & | 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 |
void | flushCairo (cairo_t *cr, const TransformCairo &transform) const |
void | flushTikZ (std::ostream &stream, const TransformTikZ &transform) const |
Circle * | clone () const |
Public Member Functions inherited from LibBoard::Ellipse | |
Ellipse (double x, double y, double xRadius, double yRadius, DGtal::Color pen, DGtal::Color fill, double lineWidth, const LineStyle lineStyle=SolidStyle, int depthValue=-1) | |
const std::string & | name () const |
Point | center () const |
Ellipse & | rotate (double angle, const Point ¢er) |
Ellipse | rotated (double angle, const Point ¢er) const |
Ellipse & | rotate (double angle) |
Ellipse | rotated (double angle) const |
Ellipse & | translate (double dx, double dy) |
Ellipse | translated (double dx, double dy) const |
Shape & | scale (double sx, double sy) |
Shape & | scale (double s) |
Ellipse | scaled (double sx, double sy) const |
Ellipse | scaled (double s) const |
void | scaleAll (double s) |
void | flushPostscript (std::ostream &stream, const TransformEPS &transform) const |
void | flushFIG (std::ostream &stream, const TransformFIG &transform, std::map< DGtal::Color, int > &colormap) const |
void | flushSVG (std::ostream &stream, const TransformSVG &transform) const |
void | flushCairo (cairo_t *cr, const TransformCairo &transform) const |
void | flushTikZ (std::ostream &stream, const TransformTikZ &transform) const |
Rect | boundingBox () const |
Ellipse * | clone () const |
Public Member Functions inherited from LibBoard::Shape | |
Shape (DGtal::Color penColor, DGtal::Color fillColor, double lineWidth, LineStyle style, const LineCap cap, const LineJoin join, int depth) | |
virtual | ~Shape () |
bool | filled () const |
Shape & | rotateDeg (double angle, const Point ¢er) |
Shape & | rotateDeg (double angle) |
Rect | bbox () |
Shape & | operator-- () |
Shape & | operator++ () |
int | depth () const |
virtual void | depth (int) |
virtual void | shiftDepth (int shift) |
const DGtal::Color & | penColor () const |
const DGtal::Color & | fillColor () const |
Static Private Attributes | |
static const std::string | _name |
Additional Inherited Members | |
Public Types inherited from LibBoard::Shape | |
enum | LineCap { ButtCap = 0 , RoundCap , SquareCap } |
enum | LineJoin { MiterJoin = 0 , RoundJoin , BevelJoin } |
enum | LineStyle { SolidStyle = 0 , DashStyle , DotStyle , DashDotStyle , DashDotDotStyle , DashDotDotDotStyle } |
Protected Member Functions inherited from LibBoard::Shape | |
std::string | svgProperties (const TransformSVG &transform) const |
std::string | postscriptProperties () const |
void | setCairoDashStyle (cairo_t *cr, LineStyle type) const |
std::string | tikzProperties (const TransformTikZ &transform) const |
Protected Attributes inherited from LibBoard::Ellipse | |
Point | _center |
double | _xRadius |
double | _yRadius |
double | _angle |
bool | _circle |
Protected Attributes inherited from LibBoard::Shape | |
int | _depth |
DGtal::Color | _penColor |
DGtal::Color | _fillColor |
double | _lineWidth |
LineStyle | _lineStyle |
LineCap | _lineCap |
LineJoin | _lineJoin |
|
inline |
Definition at line 1462 of file Board/Shapes.h.
References LibBoard::Ellipse::_circle.
Referenced by clone(), rotated(), rotated(), scaled(), scaled(), and translated().
|
virtual |
Returns the gravity center of the shape.
Implements LibBoard::Shape.
Definition at line 1328 of file Shapes.cpp.
References LibBoard::Ellipse::_center.
|
virtual |
Return a copy of the shape.
Implements LibBoard::Shape.
Definition at line 1410 of file Shapes.cpp.
References Circle().
|
virtual |
Writes the cairo code of the shape in a cairo drawing context according to a transform.
cr | The cairo drawing context. |
transform | A 2D transform to be applied. |
Implements LibBoard::Shape.
Definition at line 1431 of file Shapes.cpp.
References LibBoard::Ellipse::_center, LibBoard::Ellipse::_circle, LibBoard::Shape::_fillColor, LibBoard::Shape::_lineCap, LibBoard::Shape::_lineJoin, LibBoard::Shape::_lineStyle, LibBoard::Shape::_lineWidth, LibBoard::Shape::_penColor, LibBoard::Ellipse::_xRadius, DGtal::Color::blue(), LibBoard::Shape::filled(), LibBoard::Ellipse::flushCairo(), DGtal::Color::green(), DGtal::Color::None, DGtal::Color::red(), LibBoard::Shape::setCairoDashStyle(), LibBoard::Point::x, and LibBoard::Point::y.
|
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. |
Implements LibBoard::Shape.
Definition at line 1415 of file Shapes.cpp.
References LibBoard::Ellipse::_center, LibBoard::Ellipse::_circle, LibBoard::Ellipse::_xRadius, LibBoard::Ellipse::flushSVG(), LibBoard::Shape::svgProperties(), LibBoard::Point::x, and LibBoard::Point::y.
|
virtual |
Writes the TikZ code of the shape in a stream according to a transform.
stream | The output stream. |
transform | A 2D transform to be applied. |
Implements LibBoard::Shape.
Definition at line 1472 of file Shapes.cpp.
References LibBoard::Ellipse::_center, LibBoard::Ellipse::_circle, LibBoard::Ellipse::_xRadius, LibBoard::Ellipse::flushTikZ(), LibBoard::Shape::tikzProperties(), LibBoard::Point::x, and LibBoard::Point::y.
|
virtual |
Returns the generic name of the shape (e.g., Circle, Rectangle, etc.)
Reimplemented from LibBoard::Shape.
Definition at line 1322 of file Shapes.cpp.
References _name.
|
virtual |
Rotate the shape around its center.
angle | The rotation angle in radian. |
Implements LibBoard::Shape.
Definition at line 1351 of file Shapes.cpp.
References LibBoard::Ellipse::_circle, and LibBoard::Ellipse::rotate().
Rotate the shape around a given center of rotation.
angle | The rotation angle in radian. |
center | The center of rotation. |
Implements LibBoard::Shape.
Definition at line 1333 of file Shapes.cpp.
References LibBoard::Ellipse::_center, LibBoard::Ellipse::_circle, LibBoard::Ellipse::rotate(), and LibBoard::Point::rotate().
Circle LibBoard::Circle::rotated | ( | double | angle | ) | const |
Definition at line 1359 of file Shapes.cpp.
Definition at line 1345 of file Shapes.cpp.
|
virtual |
Scale the shape along both axis.
s | The scale factor along both axis. |
Implements LibBoard::Shape.
Definition at line 1384 of file Shapes.cpp.
References LibBoard::Ellipse::scale().
|
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. |
Implements LibBoard::Shape.
Definition at line 1378 of file Shapes.cpp.
References LibBoard::Ellipse::scale().
|
virtual |
Scales all the values (positions, dimensions, etc.) associated with the shape.
s | The scaling factor. |
Implements LibBoard::Shape.
Definition at line 1402 of file Shapes.cpp.
References LibBoard::Ellipse::_center, LibBoard::Ellipse::_xRadius, and LibBoard::Ellipse::_yRadius.
Circle LibBoard::Circle::scaled | ( | double | s | ) | const |
Definition at line 1396 of file Shapes.cpp.
References Circle().
Circle LibBoard::Circle::scaled | ( | double | sx, |
double | sy ) const |
Definition at line 1390 of file Shapes.cpp.
References Circle().
|
virtual |
Translate the shape by a given offset.
dx | The x offset. |
dy | The y offset. |
Implements LibBoard::Shape.
Definition at line 1365 of file Shapes.cpp.
References LibBoard::Ellipse::_center.
Referenced by translated().
Circle LibBoard::Circle::translated | ( | double | dx, |
double | dy ) const |
Definition at line 1372 of file Shapes.cpp.
References Circle(), and translate().
|
staticprivate |
The generic name of the shape.
Definition at line 1521 of file Board/Shapes.h.
Referenced by name().