|
DGtal 2.0.0
|
A path, according to Postscript and SVG definition. More...
#include <Board/Path.h>
Public Member Functions | |
| Path () | |
| Path (const std::vector< Point > &points, bool closedPath) | |
| Path (bool closedPath) | |
| void | clear () |
| bool | closed () const |
| bool | empty () const |
| unsigned int | size () const |
| void | setClosed (bool closed) |
| Point | center () const |
| Path & | operator<< (const Point &p) |
| Path & | pop_back () |
| Point & | operator[] (const unsigned int n) |
| const Point & | operator[] (const unsigned int n) const |
| Path & | rotate (double angle, const Point ¢er) |
| Path | rotated (double angle, const Point ¢er) const |
| Path & | rotate (double angle) |
| Path | rotated (double angle) const |
| Path & | translate (double dx, double dy) |
| Path | translated (double dx, double dy) const |
| Path & | scale (double sx, double sy) |
| Path & | scale (double s) |
| Path | scaled (double sx, double sy) const |
| Path | 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) const |
| void | flushSVGPoints (std::ostream &stream, const TransformSVG &transform) const |
| void | flushSVGCommands (std::ostream &stream, const TransformSVG &transform) const |
| void | flushCairoPoints (cairo_t *cr, const TransformCairo &transform) const |
| void | flushTikZPoints (std::ostream &stream, const TransformTikZ &transform) const |
| Rect | boundingBox () const |
Protected Attributes | |
| std::vector< Point > | _points |
| bool | _closed |
A path, according to Postscript and SVG definition.
The path structure.
|
inline |
Definition at line 45 of file Path.h.
References _closed.
Referenced by operator<<(), rotated(), rotated(), scaled(), scaled(), and translated().
|
inline |
|
inline |
| Rect LibBoard::Path::boundingBox | ( | ) | const |
Definition at line 272 of file Path.cpp.
References _points, LibBoard::Rect::height, LibBoard::Rect::left, LibBoard::Rect::top, and LibBoard::Rect::width.
Referenced by center().
| Point LibBoard::Path::center | ( | ) | const |
Barycenter of the path
Definition at line 36 of file Path.cpp.
References boundingBox(), LibBoard::Rect::height, LibBoard::Rect::left, LibBoard::Rect::top, and LibBoard::Rect::width.
|
inline |
|
inline |
|
inline |
| void LibBoard::Path::flushCairoPoints | ( | cairo_t * | cr, |
| const TransformCairo & | transform ) const |
Definition at line 235 of file Path.cpp.
References _points.
| void LibBoard::Path::flushFIG | ( | std::ostream & | stream, |
| const TransformFIG & | transform ) const |
| void LibBoard::Path::flushPostscript | ( | std::ostream & | stream, |
| const TransformEPS & | transform ) const |
| void LibBoard::Path::flushSVGCommands | ( | std::ostream & | stream, |
| const TransformSVG & | transform ) const |
Definition at line 193 of file Path.cpp.
| void LibBoard::Path::flushSVGPoints | ( | std::ostream & | stream, |
| const TransformSVG & | transform ) const |
Definition at line 215 of file Path.cpp.
References _points.
| void LibBoard::Path::flushTikZPoints | ( | std::ostream & | stream, |
| const TransformTikZ & | transform ) const |
|
inline |
|
inline |
| Path & LibBoard::Path::pop_back | ( | ) |
| Path & LibBoard::Path::rotate | ( | double | angle | ) |
| angle | angle |
| center | center |
Definition at line 43 of file Path.cpp.
| Path LibBoard::Path::rotated | ( | double | angle | ) | const |
| Path & LibBoard::Path::scale | ( | double | s | ) |
| Path & LibBoard::Path::scale | ( | double | sx, |
| double | sy ) |
| sx | scale factor |
| sy | scale factor |
Definition at line 108 of file Path.cpp.
References _points, center(), translate(), LibBoard::Point::x, and LibBoard::Point::y.
| void LibBoard::Path::scaleAll | ( | double | s | ) |
| Path LibBoard::Path::scaled | ( | double | s | ) | const |
| Path LibBoard::Path::scaled | ( | double | sx, |
| double | sy ) const |
|
inline |
|
inline |
| Path & LibBoard::Path::translate | ( | double | dx, |
| double | dy ) |
| dx | translation vector |
| dy | translation vector |
Definition at line 81 of file Path.cpp.
References _points.
Referenced by scale().
| Path LibBoard::Path::translated | ( | double | dx, |
| double | dy ) const |
| dx | translation vector |
| dy | translation vector |
Definition at line 94 of file Path.cpp.
|
protected |
Definition at line 227 of file Path.h.
Referenced by closed(), flushFIG(), flushPostscript(), flushSVGCommands(), Path(), Path(), Path(), and setClosed().
|
protected |
Definition at line 226 of file Path.h.
Referenced by boundingBox(), clear(), empty(), flushCairoPoints(), flushFIG(), flushPostscript(), flushSVGCommands(), flushSVGPoints(), flushTikZPoints(), operator<<(), operator[](), operator[](), Path(), pop_back(), rotate(), rotated(), scale(), scaleAll(), size(), translate(), and translated().