Board
0.6.devel
|
#include <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 | 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 |
Referenced by scaled().
|
inline |
|
inline |
Rect LibBoard::Path::boundingBox | ( | ) | const |
Point LibBoard::Path::center | ( | ) | const |
Barycenter of the path
References boundingBox(), LibBoard::Rect::height, LibBoard::Rect::left, LibBoard::Rect::top, and LibBoard::Rect::width.
Referenced by LibBoard::Polyline::center(), rotate(), rotated(), LibBoard::Board::scale(), scale(), and LibBoard::Group::scale().
|
inline |
|
inline |
References _closed.
Referenced by LibBoard::Polyline::flushFIG(), LibBoard::Polyline::flushSVG(), and LibBoard::Polyline::flushTikZ().
|
inline |
References _points.
Referenced by LibBoard::Polyline::flushFIG(), LibBoard::Polyline::flushPostscript(), LibBoard::Polyline::flushSVG(), and LibBoard::Polyline::flushTikZ().
void LibBoard::Path::flushFIG | ( | std::ostream & | stream, |
const TransformFIG & | transform | ||
) | const |
References _closed, _points, LibBoard::Transform::mapX(), and LibBoard::TransformFIG::mapY().
Referenced by LibBoard::Polyline::flushFIG(), LibBoard::Rectangle::flushFIG(), and LibBoard::Image::flushFIG().
void LibBoard::Path::flushPostscript | ( | std::ostream & | stream, |
const TransformEPS & | transform | ||
) | const |
References _closed, _points, LibBoard::Transform::mapX(), and LibBoard::TransformEPS::mapY().
Referenced by LibBoard::Group::flushPostscript(), LibBoard::Polyline::flushPostscript(), and LibBoard::Board::saveEPS().
void LibBoard::Path::flushSVGCommands | ( | std::ostream & | stream, |
const TransformSVG & | transform | ||
) | const |
References _closed, _points, LibBoard::Transform::mapX(), and LibBoard::TransformSVG::mapY().
Referenced by LibBoard::Group::flushSVG(), LibBoard::Board::saveSVG(), and LibBoard::Board::saveTikZ().
void LibBoard::Path::flushSVGPoints | ( | std::ostream & | stream, |
const TransformSVG & | transform | ||
) | const |
References _points, LibBoard::Transform::mapX(), and LibBoard::TransformSVG::mapY().
Referenced by LibBoard::Polyline::flushSVG().
void LibBoard::Path::flushTikZPoints | ( | std::ostream & | stream, |
const TransformTikZ & | transform | ||
) | const |
References _points, LibBoard::Transform::mapX(), and LibBoard::TransformSVG::mapY().
Referenced by LibBoard::Polyline::flushTikZ().
|
inline |
|
inline |
Path & LibBoard::Path::pop_back | ( | ) |
References _points.
Referenced by LibBoard::Group::setClippingPath(), and LibBoard::Board::setClippingPath().
angle | |
center |
References _points.
Referenced by LibBoard::Board::rotate(), rotate(), LibBoard::Group::rotate(), LibBoard::Polyline::rotate(), and rotated().
Path & LibBoard::Path::rotate | ( | double | angle | ) |
Path LibBoard::Path::rotated | ( | double | angle | ) | const |
Path & LibBoard::Path::scale | ( | double | sx, |
double | sy | ||
) |
sx | |
sy |
References _points, center(), translate(), LibBoard::Point::x, and LibBoard::Point::y.
Referenced by LibBoard::Board::scale(), scale(), LibBoard::Group::scale(), and LibBoard::Polyline::scale().
void LibBoard::Path::scaleAll | ( | double | s | ) |
Scales all the points.
s | The scaling factor. |
References _points.
Referenced by LibBoard::Polyline::scaleAll(), and LibBoard::Rectangle::scaleAll().
Path LibBoard::Path::scaled | ( | double | sx, |
double | sy | ||
) | const |
|
inline |
References _closed.
Referenced by LibBoard::Group::setClippingPath(), and LibBoard::Board::setClippingPath().
|
inline |
References _points.
Referenced by LibBoard::Group::boundingBox(), LibBoard::Polyline::flushFIG(), LibBoard::Group::flushPostscript(), LibBoard::Group::flushSVG(), LibBoard::Board::saveEPS(), LibBoard::Board::saveSVG(), LibBoard::Board::saveTikZ(), LibBoard::Group::setClippingPath(), and LibBoard::Board::setClippingPath().
Path & LibBoard::Path::translate | ( | double | dx, |
double | dy | ||
) |
dx | |
dy |
References _points.
Referenced by LibBoard::Board::scale(), scale(), LibBoard::Group::scale(), LibBoard::Board::translate(), LibBoard::Group::translate(), and LibBoard::Polyline::translate().
Path LibBoard::Path::translated | ( | double | dx, |
double | dy | ||
) | const |
|
protected |
Referenced by closed(), flushFIG(), flushPostscript(), flushSVGCommands(), and setClosed().
|
protected |
Referenced by boundingBox(), clear(), empty(), flushFIG(), flushPostscript(), flushSVGCommands(), flushSVGPoints(), flushTikZPoints(), operator<<(), operator[](), pop_back(), rotate(), rotated(), scale(), scaleAll(), size(), translate(), and translated().