This is the place where actual SVG data is converted and stored into vector.
12968 std::string n = e.Name();
12975 _vecVar.emplace_back(
12990 _vecVar.emplace_back(
FRectD( x1, y1, x1+w, y1+h ) );
12995 _vecVar.emplace_back(
13025 const auto& vec_vec_pts = parse_res.first;
13026 for(
auto vec_pts: vec_vec_pts )
13029 if( vec_pts.front() == vec_pts.back() )
13030 vec_pts.pop_back();
13032 if( parse_res.second ==
true )
13033 _vecVar.emplace_back(
CPolylineD(vec_pts) );
13035 _vecVar.emplace_back(
OPolylineD(vec_pts) );
13038 catch( std::exception& err )
13041 << err.what() <<
"\n -input string=" << pts_str
13056 auto H =
Homogr().addTranslation(-x,-y).addRotation(rot.second).addTranslation(x,y);
13057 _vecVar.push_back( H *
ell );
13067 catch( std::string& msg )
Homogr_< HOMOG2D_INUMTYPE > Homogr
Default homography (3x3 matrix) type, uses double as numerical type.
Definition: homog2d.hpp:12382
Segment_< double > SegmentD
Definition: homog2d.hpp:12418
double getAttribValue(const tinyxml2::XMLElement &e, const char *str, std::string e_name)
Fetch attribute from XML element. Tag e_name is there just in case of trouble.
Definition: homog2d.hpp:12917
SvgType getSvgType(std::string s) const
Returns the type as a member of enum SvgType, so the type can be used in a switch.
Definition: homog2d.hpp:12894
auto parsePath(const char *s)
Parse a SVG "path" string and convert it to a vector holding a set (vector) of points.
Definition: homog2d.hpp:12796
const char * getAttribString(const char *attribName, const tinyxml2::XMLElement &e)
Helper function for SVG import.
Definition: homog2d.hpp:12932
Circle_< double > CircleD
Definition: homog2d.hpp:12420
#define HOMOG2D_LOG_WARNING(a)
Definition: homog2d.hpp:151
std::pair< Point2d_< HOMOG2D_INUMTYPE >, HOMOG2D_INUMTYPE > getEllipseRotateAttr(const char *rot_str)
Importing rotated ellipse from SVG data.
Definition: homog2d.hpp:12485
CPolyline_< double > CPolylineD
Definition: homog2d.hpp:12435
Ellipse ell
Definition: homog2d_test.cpp:4037
FRect_< double > FRectD
Definition: homog2d.hpp:12421
#define HOMOG2D_THROW_ERROR_1(msg)
Error throw wrapper macro.
Definition: homog2d.hpp:181
Ellipse_< double > EllipseD
Definition: homog2d.hpp:12422
std::vector< Point2d > importSvgPoints(const tinyxml2::XMLElement &e)
Helper function called by Visitor::VisitExit() to process Polyline/Polygons.
Definition: homog2d.hpp:12943
OPolyline_< double > OPolylineD
Definition: homog2d.hpp:12439