|
Board
0.9.2
|
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. More...
#include <ShapeList.h>
Public Member Functions | |
| Group (int depth=-1) | |
| Group (const Group &other) | |
| const std::string & | name () const |
| Group & | rotate (double angle, const Point ¢er) |
| Group & | rotate (double angle) |
| Group | rotated (double angle, const Point ¢er) |
| Group | rotated (double angle) |
| Group & | translate (double dx, double dy) |
| Group | translated (double dx, double dy) |
| Group & | scale (double sx, double sy) |
| Group & | 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< 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) |
| Group * | clone () const |
| Rect | boundingBox () const |
Public Member Functions inherited from LibBoard::ShapeList | |
| ShapeList (int depth=-1) | |
| ShapeList (const ShapeList &other) | |
| ShapeList & | operator= (const ShapeList &other) |
| ShapeList (const Shape &shape, unsigned int times, double dx, double dy, double scale) | |
| ShapeList (const Shape &shape, unsigned int times, double dx, double dy, double scaleX, double scaleY, double angle) | |
| ShapeList & | clear () |
| ShapeList | rotated (double angle, const Point ¢er) |
| ShapeList | rotated (double angle) |
| ShapeList | translated (double dx, double dy) |
| ShapeList | scaled (double sx, double sy) |
| ShapeList | scaled (double s) |
| void | scaleAll (double s) |
| virtual int | minDepth () const |
| virtual int | maxDepth () const |
| void | shiftDepth (int shift) |
| ShapeList & | operator<< (const Shape &shape) |
| ShapeList & | operator+= (const Shape &shape) |
| ShapeList & | append (const Shape &shape, Direction direction, Alignment alignment) |
| Group & | addTiling (const Shape &shape, Point topLeftCorner, std::size_t columns, std::size_t rows, double spacing=0.0) |
| ShapeList & | insert (const Shape &shape, int depth) |
| ShapeList & | dup (std::size_t copies=1) |
| template<typename T > | |
| T & | last (const std::size_t position=0) |
| Shape & | last (const std::size_t position=0) |
| Shape & | top () |
Public Member Functions inherited from LibBoard::Shape | |
| Shape (Color penColor, Color fillColor, double lineWidth, LineStyle style, const LineCap cap, const LineJoin join, int depth) | |
| virtual | ~Shape () |
| bool | filled () const |
| virtual Point | center () const |
| Shape & | rotateDeg (double angle, const Point ¢er) |
| Shape & | rotateDeg (double angle) |
| Shape & | moveCenter (double x, double y) |
| Shape & | moveCenter (Point p) |
| Rect | bbox () const |
| Shape & | operator-- () |
| Shape & | operator++ () |
| int | depth () const |
| virtual void | depth (int) |
| const Color & | penColor () const |
| const Color & | fillColor () const |
Additional Inherited Members | |
Public Types inherited from LibBoard::ShapeList | |
| enum | Direction { Top, Right, Bottom, Left } |
| enum | Alignment { AlignTop, AlignBottom, AlignCenter, AlignLeft, AlignRight } |
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::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 |
| Color | _penColor |
| 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.
|
virtual |
Compute the bounding box of the figure.
Reimplemented from LibBoard::ShapeList.
References LibBoard::ShapeList::boundingBox(), and LibBoard::Path::boundingBox().
Referenced by flushFIG().
|
virtual |
|
virtual |
Write 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 LibBoard::Shape::bbox(), boundingBox(), LibBoard::ShapeList::flushFIG(), LibBoard::Rect::height, LibBoard::Rect::left, LibBoard::Rect::top, and LibBoard::Rect::width.
|
virtual |
Write 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 LibBoard::ShapeList::flushPostscript().
|
virtual |
Write 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 LibBoard::ShapeList::flushSVG().
|
virtual |
Write 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.
References LibBoard::ShapeList::flushTikZ().
|
virtual |
Returns the generic name of the shape (e.g., Circle, Rectangle, etc.)
Reimplemented from LibBoard::ShapeList.
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 LibBoard::ShapeList::rotate(), and LibBoard::Path::rotate().
|
virtual |
Rotate the shape around its center.
| angle | The rotation angle in radian. |
Reimplemented from LibBoard::ShapeList.
References LibBoard::Shape::center(), LibBoard::ShapeList::rotate(), and LibBoard::Path::rotate().
|
virtual |
Scale the shape along the x an y axis.
| sx | The scaling factor along the x axis. |
| sy | The scaling factor along the y axis. |
Reimplemented from LibBoard::ShapeList.
References LibBoard::Path::center(), LibBoard::Shape::center(), LibBoard::ShapeList::scale(), LibBoard::Path::scale(), LibBoard::Path::translate(), LibBoard::Point::x, and LibBoard::Point::y.
|
virtual |
Scale the shape along both axis.
| s | The scaling factor along both axis. |
Reimplemented from LibBoard::ShapeList.
References LibBoard::Path::center(), LibBoard::Shape::center(), LibBoard::ShapeList::scale(), LibBoard::Path::scale(), LibBoard::Path::translate(), LibBoard::Point::x, and LibBoard::Point::y.
| void LibBoard::Group::setClippingPath | ( | const std::vector< Point > & | points | ) |
| void LibBoard::Group::setClippingPath | ( | const Path & | path | ) |
Define a clipping path for the group.
| points | A path. |
References LibBoard::Path::pop_back().
| void LibBoard::Group::setClippingRectangle | ( | float | x, |
| float | y, | ||
| float | width, | ||
| float | height | ||
| ) |
Define a clipping rectangle for the group.
| x | |
| y | |
| width | |
| height |
|
virtual |
Translate the shape by a given offset.
| dx | The x offset. |
| dy | The y offset. |
Reimplemented from LibBoard::ShapeList.
References LibBoard::ShapeList::translate(), and LibBoard::Path::translate().
1.8.10