A loader for SVG files.
More...
#include <SVGLoader.hh>
|
| SVGLoader (unsigned int _samples) |
| Constructor.
|
|
| ~SVGLoader () |
| destructor
|
|
void | DumpPaths (const std::vector< SVGPath > &_paths, std::ostream &_out) const |
| Outputs the content of the paths to file (or console)
|
|
bool | Parse (const std::string &_filename, std::vector< SVGPath > &_paths) |
| Reads an SVG file and loads all the paths.
|
|
|
static void | PathsToClosedPolylines (const std::vector< common::SVGPath > &_paths, double _tol, std::vector< std::vector< ignition::math::Vector2d > > &_closedPolys, std::vector< std::vector< ignition::math::Vector2d > > &_openPolys) |
| Reads in paths and outputs closed polylines and open polylines.
|
|
◆ SVGLoader()
Constructor.
- Parameters
-
[in] | _samples | The number of points for cubic spline segments |
◆ ~SVGLoader()
◆ DumpPaths()
void DumpPaths |
( |
const std::vector< SVGPath > & | _paths, |
|
|
std::ostream & | _out ) const |
Outputs the content of the paths to file (or console)
- Parameters
-
[in] | _paths | The paths |
[in] | _out | The output stream (can be a file or std::cout) |
◆ Parse()
bool Parse |
( |
const std::string & | _filename, |
|
|
std::vector< SVGPath > & | _paths ) |
Reads an SVG file and loads all the paths.
- Parameters
-
[in] | _filename | The SVG file |
[out] | _paths | Vector that receives path datai |
- Returns
- false when the file cannot be processed
◆ PathsToClosedPolylines()
static void PathsToClosedPolylines |
( |
const std::vector< common::SVGPath > & | _paths, |
|
|
double | _tol, |
|
|
std::vector< std::vector< ignition::math::Vector2d > > & | _closedPolys, |
|
|
std::vector< std::vector< ignition::math::Vector2d > > & | _openPolys ) |
|
static |
Reads in paths and outputs closed polylines and open polylines.
- Parameters
-
[in] | _paths | The input paths |
[in] | _tol | Tolerence when comparing distance between 2 points. |
[out] | _closedPolys | A vector to collect new closed loops |
[out] | _openPolys | A vector to collect non closed paths |
The documentation for this class was generated from the following file: