This is the place where actual SVG data is converted and stored into vector.
12969 std::string n = e.Name();
12976 _vecVar.emplace_back(
12991 _vecVar.emplace_back(
FRectD( x1, y1, x1+w, y1+h ) );
12996 _vecVar.emplace_back(
13026 const auto& vec_vec_pts = parse_res.first;
13027 for(
auto vec_pts: vec_vec_pts )
13030 if( vec_pts.front() == vec_pts.back() )
13031 vec_pts.pop_back();
13033 if( parse_res.second ==
true )
13034 _vecVar.emplace_back(
CPolylineD(vec_pts) );
13036 _vecVar.emplace_back(
OPolylineD(vec_pts) );
13039 catch( std::exception& err )
13042 << err.what() <<
"\n -input string=" << pts_str
13057 auto H =
Homogr().addTranslation(-x,-y).addRotation(rot.second).addTranslation(x,y);
13058 _vecVar.push_back( H *
ell );
13068 catch( std::string& msg )
Homogr_< HOMOG2D_INUMTYPE > Homogr
Default homography (3x3 matrix) type, uses double as numerical type.
Definition: homog2d.hpp:12383
Segment_< double > SegmentD
Definition: homog2d.hpp:12419
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:12918
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:12895
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:12797
const char * getAttribString(const char *attribName, const tinyxml2::XMLElement &e)
Helper function for SVG import.
Definition: homog2d.hpp:12933
Circle_< double > CircleD
Definition: homog2d.hpp:12421
#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:12486
CPolyline_< double > CPolylineD
Definition: homog2d.hpp:12436
Ellipse ell
Definition: homog2d_test.cpp:4037
FRect_< double > FRectD
Definition: homog2d.hpp:12422
#define HOMOG2D_THROW_ERROR_1(msg)
Error throw wrapper macro.
Definition: homog2d.hpp:181
Ellipse_< double > EllipseD
Definition: homog2d.hpp:12423
std::vector< Point2d > importSvgPoints(const tinyxml2::XMLElement &e)
Helper function called by Visitor::VisitExit() to process Polyline/Polygons.
Definition: homog2d.hpp:12944
OPolyline_< double > OPolylineD
Definition: homog2d.hpp:12440