|
Board
0.6.devel
|
#include <ShapeList.h>


Public Member Functions | |
| Group (int depthValue=-1) | |
| Group (const Group &other) | |
| ~Group () | |
| const std::string & | name () const |
| Shape & | rotate (double angle, const Point ¢er) |
| Shape & | rotate (double angle) |
| Group | rotated (double angle, const Point ¢er) |
| Group | rotated (double angle) |
| Shape & | translate (double dx, double dy) |
| Group | translated (double dx, double dy) |
| Shape & | scale (double sx, double sy) |
| Shape & | scale (double s) |
| Group | scaled (double sx, double sy) |
| Group | scaled (double s) |
| void | setClippingRectangle (float x, float y, float width, float height) |
| void | setClippingPath (const std::vector< Point > &points) |
| void | setClippingPath (const Path &path) |
| 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 | flushTikZ (std::ostream &stream, const TransformTikZ &transform) const |
| Group & | operator= (const Group &other) |
| Shape * | clone () const |
| Rect | boundingBox () const |
Public Member Functions inherited from LibBoard::ShapeList | |
| ShapeList (int depth=-1) | |
| ShapeList (const ShapeList &other) | |
| ~ShapeList () | |
| ShapeList & | clear () |
| Point | center () const |
| void | scaleAll (double s) |
| virtual int | minDepth () const |
| virtual int | maxDepth () const |
| void | shiftDepth (int shift) |
| ShapeList & | operator= (const ShapeList &other) |
| ShapeList & | operator<< (const Shape &shape) |
| ShapeList & | operator+= (const Shape &shape) |
| ShapeList & | insert (const Shape &shape, int depth) |
| ShapeList & | dup (unsigned int copies=1) |
| template<typename T > | |
| T & | last (const unsigned int position=0) |
| Shape & | last (const unsigned int position=0) |
| Shape & | top () |
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) |
| const DGtal::Color & | penColor () const |
| const DGtal::Color & | fillColor () const |
Private Attributes | |
| Path | _clippingPath |
Static Private Attributes | |
| static const std::string | _name |
| static unsigned int | _clippingCount = 0 |
Additional Inherited Members | |
Protected Member Functions inherited from LibBoard::ShapeList | |
| void | addShape (const Shape &shape, double scaleFactor) |
| void | free () |
Protected Member Functions inherited from LibBoard::Shape | |
| std::string | svgProperties (const TransformSVG &transform) const |
| std::string | postscriptProperties () const |
| std::string | tikzProperties (const TransformTikZ &transform) const |
Protected Attributes inherited from LibBoard::ShapeList | |
| std::vector< Shape * > | _shapes |
| int | _nextDepth |
Protected Attributes inherited from LibBoard::Shape | |
| int | _depth |
| DGtal::Color | _penColor |
| DGtal::Color | _fillColor |
| double | _lineWidth |
| LineStyle | _lineStyle |
| LineCap | _lineCap |
| LineJoin | _lineJoin |
A group of shapes. A group is basically a ShapeList except that when rendered in either an SVG of a FIG file, it is a true compound element.
The Group structure.
|
inline |
Referenced by clone(), rotated(), scaled(), and translated().
|
inline |
|
inline |
|
virtual |
Returns the bounding box of the figure.
Reimplemented from LibBoard::ShapeList.
References _clippingPath, LibBoard::ShapeList::boundingBox(), LibBoard::Path::boundingBox(), and LibBoard::Path::size().
Referenced by flushFIG().
|
virtual |
|
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::ShapeList.
References boundingBox(), LibBoard::Rect::height, LibBoard::Rect::left, LibBoard::Transform::mapX(), LibBoard::TransformFIG::mapY(), LibBoard::Rect::top, and LibBoard::Rect::width.
|
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. |
Reimplemented from LibBoard::ShapeList.
References _clippingCount, _clippingPath, LibBoard::Path::flushPostscript(), and LibBoard::Path::size().
|
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::ShapeList.
References _clippingCount, _clippingPath, LibBoard::Path::flushSVGCommands(), and LibBoard::Path::size().
|
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. |
Reimplemented from LibBoard::ShapeList.
|
virtual |
Returns the generic name of the shape (e.g., Circle, Rectangle, etc.)
Reimplemented from LibBoard::ShapeList.
References _name.
Rotate the shape around a given center of rotation.
| angle | The rotation angle in radian. |
| center | The center of rotation. |
Reimplemented from LibBoard::ShapeList.
References _clippingPath, and LibBoard::Path::rotate().
Referenced by rotate().
|
virtual |
Rotate the shape around its center.
| angle | The rotation angle in radian. |
Reimplemented from LibBoard::ShapeList.
References _clippingPath, LibBoard::ShapeList::center(), LibBoard::Path::rotate(), and rotate().
Reimplemented from LibBoard::ShapeList.
References Group().
| Group LibBoard::Group::rotated | ( | double | angle | ) |
Reimplemented from LibBoard::ShapeList.
References Group().
|
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::ShapeList.
References _clippingPath, LibBoard::ShapeList::center(), LibBoard::Path::center(), LibBoard::Path::scale(), LibBoard::Path::translate(), LibBoard::Point::x, and LibBoard::Point::y.
Referenced by scale().
|
virtual |
Scale the shape along both axis.
| s | The scale factor along both axis. |
Reimplemented from LibBoard::ShapeList.
References _clippingPath, LibBoard::ShapeList::center(), LibBoard::Path::center(), LibBoard::Path::scale(), scale(), LibBoard::Path::translate(), LibBoard::Point::x, and LibBoard::Point::y.
| Group LibBoard::Group::scaled | ( | double | sx, |
| double | sy | ||
| ) |
Reimplemented from LibBoard::ShapeList.
References Group().
| Group LibBoard::Group::scaled | ( | double | s | ) |
Reimplemented from LibBoard::ShapeList.
References Group().
| void LibBoard::Group::setClippingPath | ( | const std::vector< Point > & | points | ) |
Define a clipping path for the group.
| points | A path. |
References _clippingPath, and LibBoard::Path::clear().
| void LibBoard::Group::setClippingPath | ( | const Path & | path | ) |
Define a clipping path for the group.
| points | A path. |
References _clippingPath, LibBoard::Path::pop_back(), LibBoard::Path::setClosed(), and LibBoard::Path::size().
| void LibBoard::Group::setClippingRectangle | ( | float | x, |
| float | y, | ||
| float | width, | ||
| float | height | ||
| ) |
Define a clipping rectangle for the group.
| x | |
| y | |
| width | |
| height |
References _clippingPath, and LibBoard::Path::clear().
|
virtual |
Translate the shape by a given offset.
| dx | The x offset. |
| dy | The y offset. |
Reimplemented from LibBoard::ShapeList.
References _clippingPath, and LibBoard::Path::translate().
| Group LibBoard::Group::translated | ( | double | dx, |
| double | dy | ||
| ) |
Reimplemented from LibBoard::ShapeList.
References Group().
|
staticprivate |
Referenced by flushPostscript(), and flushSVG().
|
private |
Referenced by boundingBox(), flushPostscript(), flushSVG(), rotate(), scale(), setClippingPath(), setClippingRectangle(), and translate().
|
staticprivate |