|
DGtal 1.4.2
|
An ellipse. More...
#include <Board/Shapes.h>
Public Member Functions | |
| 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 |
Protected Attributes | |
| 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 |
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 |
|
inline |
|
virtual |
Returns the bounding box of the figure.
Implements LibBoard::Shape.
Definition at line 1291 of file Shapes.cpp.
References _angle, _center, _xRadius, _yRadius, LibBoard::Point::x, and LibBoard::Point::y.
|
virtual |
Returns the gravity center of the shape.
Implements LibBoard::Shape.
Definition at line 1026 of file Shapes.cpp.
References _center.
|
virtual |
Return a copy of the shape.
Implements LibBoard::Shape.
Definition at line 1151 of file Shapes.cpp.
References Ellipse().
|
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 1232 of file Shapes.cpp.
References _angle, _center, LibBoard::Shape::_fillColor, LibBoard::Shape::_lineCap, LibBoard::Shape::_lineJoin, LibBoard::Shape::_lineStyle, LibBoard::Shape::_lineWidth, LibBoard::Shape::_penColor, _xRadius, _yRadius, DGtal::Color::blue(), LibBoard::Shape::filled(), DGtal::Color::green(), DGtal::Color::None, DGtal::Color::red(), LibBoard::Shape::setCairoDashStyle(), LibBoard::Point::x, and LibBoard::Point::y.
Referenced by LibBoard::Circle::flushCairo().
|
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. |
| colormap | A colormap. |
Implements LibBoard::Shape.
Definition at line 1185 of file Shapes.cpp.
References _angle, _center, _circle, LibBoard::Shape::_depth, LibBoard::Shape::_fillColor, LibBoard::Shape::_lineStyle, LibBoard::Shape::_lineWidth, LibBoard::Shape::_penColor, _xRadius, _yRadius, LibBoard::Shape::filled(), DGtal::Color::valid(), LibBoard::Point::x, and LibBoard::Point::y.
|
virtual |
Writes the EPS 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 1156 of file Shapes.cpp.
References _angle, _center, _circle, LibBoard::Shape::_fillColor, LibBoard::Shape::_penColor, _xRadius, _yRadius, LibBoard::Shape::filled(), DGtal::Color::None, DGtal::Color::postscript(), LibBoard::Shape::postscriptProperties(), 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 1213 of file Shapes.cpp.
References _angle, _center, _xRadius, _yRadius, LibBoard::Shape::svgProperties(), LibBoard::Point::x, and LibBoard::Point::y.
Referenced by LibBoard::Circle::flushSVG().
|
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 1275 of file Shapes.cpp.
References _angle, _center, _xRadius, _yRadius, LibBoard::Shape::tikzProperties(), LibBoard::Point::x, and LibBoard::Point::y.
Referenced by LibBoard::Circle::flushTikZ().
|
virtual |
Returns the generic name of the shape (e.g., Circle, Rectangle, etc.)
Reimplemented from LibBoard::Shape.
Definition at line 1020 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 1050 of file Shapes.cpp.
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 1031 of file Shapes.cpp.
References _angle, _center, _xRadius, rotate(), LibBoard::Point::rotated(), LibBoard::Point::x, and LibBoard::Point::y.
Referenced by LibBoard::Circle::rotate(), LibBoard::Circle::rotate(), rotate(), rotate(), rotated(), and rotated().
| Ellipse LibBoard::Ellipse::rotated | ( | double | angle | ) | const |
|
virtual |
Scale the shape along both axis.
| s | The scale factor along both axis. |
Implements LibBoard::Shape.
Definition at line 1125 of file Shapes.cpp.
References 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 1075 of file Shapes.cpp.
References _angle, _xRadius, and _yRadius.
Referenced by LibBoard::Circle::scale(), LibBoard::Circle::scale(), and scale().
|
virtual |
Scales all the values (positions, dimensions, etc.) associated with the shape.
| s | The scaling factor. |
Implements LibBoard::Shape.
Definition at line 1143 of file Shapes.cpp.
| Ellipse LibBoard::Ellipse::scaled | ( | double | s | ) | const |
Definition at line 1137 of file Shapes.cpp.
References Ellipse().
| Ellipse LibBoard::Ellipse::scaled | ( | double | sx, |
| double | sy ) const |
| sx | scale factor |
| sy | scale factor |
Definition at line 1131 of file Shapes.cpp.
References Ellipse().
|
virtual |
Translate the shape by a given offset.
| dx | The x offset. |
| dy | The y offset. |
Implements LibBoard::Shape.
Definition at line 1062 of file Shapes.cpp.
References _center.
Referenced by translated().
| Ellipse LibBoard::Ellipse::translated | ( | double | dx, |
| double | dy ) const |
| dx | translation along x-axis |
| dy | translation along the y-axis |
Definition at line 1069 of file Shapes.cpp.
References Ellipse(), and translate().
|
protected |
Definition at line 1452 of file Board/Shapes.h.
Referenced by boundingBox(), Ellipse(), flushCairo(), flushFIG(), flushPostscript(), flushSVG(), flushTikZ(), rotate(), and scale().
|
protected |
Definition at line 1449 of file Board/Shapes.h.
Referenced by boundingBox(), LibBoard::Circle::center(), center(), LibBoard::Arc::flushCairo(), LibBoard::Circle::flushCairo(), flushCairo(), flushFIG(), LibBoard::Arc::flushPostscript(), flushPostscript(), LibBoard::Arc::flushSVG(), LibBoard::Circle::flushSVG(), flushSVG(), LibBoard::Arc::flushTikZ(), LibBoard::Circle::flushTikZ(), flushTikZ(), LibBoard::Circle::rotate(), rotate(), LibBoard::Circle::scaleAll(), scaleAll(), LibBoard::Circle::translate(), and translate().
|
protected |
Definition at line 1453 of file Board/Shapes.h.
Referenced by LibBoard::Circle::Circle(), LibBoard::Circle::flushCairo(), flushFIG(), flushPostscript(), LibBoard::Circle::flushSVG(), LibBoard::Circle::flushTikZ(), LibBoard::Circle::rotate(), and LibBoard::Circle::rotate().
|
staticprivate |
The generic name of the shape.
Definition at line 1446 of file Board/Shapes.h.
Referenced by name().
|
protected |
Definition at line 1450 of file Board/Shapes.h.
Referenced by boundingBox(), LibBoard::Arc::flushCairo(), LibBoard::Circle::flushCairo(), flushCairo(), flushFIG(), LibBoard::Arc::flushPostscript(), flushPostscript(), LibBoard::Arc::flushSVG(), LibBoard::Circle::flushSVG(), flushSVG(), LibBoard::Arc::flushTikZ(), LibBoard::Circle::flushTikZ(), flushTikZ(), rotate(), scale(), LibBoard::Circle::scaleAll(), and scaleAll().
|
protected |
Definition at line 1451 of file Board/Shapes.h.
Referenced by boundingBox(), flushCairo(), flushFIG(), flushPostscript(), flushSVG(), flushTikZ(), scale(), LibBoard::Circle::scaleAll(), and scaleAll().