26 #ifndef _BOARD_PATH_H_
27 #define _BOARD_PATH_H_
43 Path() : _closed(
false ) { }
45 Path(
const std::vector<Point> & points,
bool closed )
46 : _points( points ), _closed( closed ) { }
48 explicit Path(
bool closed ) : _closed( closed ) { }
52 inline bool closed()
const;
54 inline bool empty()
const;
56 inline std::size_t size()
const;
58 inline void setClosed(
bool closed );
82 Path & operator<<( const std::vector<Point> & v );
255 void flushPostscript( std::ostream & stream,
258 void flushFIG( std::ostream & stream,
261 void flushSVGPoints( std::ostream & stream,
264 void flushSVGCommands( std::ostream & stream,
267 void flushTikZPoints( std::ostream & stream,
277 const std::vector<Point> points()
const;
279 std::ostream & flush( std::ostream & )
const;
282 std::vector<Point> _points;
312 return _points.empty();
318 return _points.size();
322 Path::setClosed(
bool closed )
330 std::ostream & operator<<( std::ostream & out,
const LibBoard::Path & path );
Path & scale(double sx, double sy)
Definition: Path.cpp:149
Path & operator<<(const Point &p)
Definition: Path.cpp:42
Rect boundingBox() const
Definition: Path.cpp:292
Path & translate(double dx, double dy)
Definition: Path.cpp:122
The Point structure. @copyright This source code is part of the Board project, a C++ library whose pu...
Point center() const
Definition: Path.cpp:56
A path, according to Postscript and SVG definition.
Definition: Path.h:41
Path scaled(double sx, double sy) const
Definition: Path.cpp:172
Struct representing a 2D point.
Definition: Point.h:39
Path rotated(double angle, const Point ¢er) const
Definition: Path.cpp:79
Path & pop_back()
Definition: Path.cpp:35
Path & rotate(double angle, const Point ¢er)
Definition: Path.cpp:61
@copyright This source code is part of the Board project, a C++ library whose purpose is to allow sim...
void scaleAll(double s)
Definition: Path.cpp:184
Path translated(double dx, double dy) const
Definition: Path.cpp:135
Path rotatedDeg(double angle, const Point ¢er) const
Definition: Path.cpp:92
Point & operator[](const std::size_t n)
Definition: Path.h:293
Struct representing a rectangle on the plane.
Definition: Rect.h:38
Path & rotateDeg(double angle, const Point ¢er)
Definition: Path.cpp:73