From: Nikita Kitaev Date: Fri, 2 Apr 2010 01:45:44 +0000 (-0700) Subject: Allow for scientific notation in SVG path data X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=463c5270e068392d5815d6113c0127e47d713a63;p=synfig.git Allow for scientific notation in SVG path data --- diff --git a/synfig-core/src/modules/mod_svg/svg_parser.cpp b/synfig-core/src/modules/mod_svg/svg_parser.cpp index 680aa4f..f7b6350 100644 --- a/synfig-core/src/modules/mod_svg/svg_parser.cpp +++ b/synfig-core/src/modules/mod_svg/svg_parser.cpp @@ -1780,7 +1780,7 @@ Svg_parser::get_tokens_path(String path){ //mini path lexico-parser else if(a=='V'){ e=15; i++;} else if(a=='H'){ e=16; i++;} else if(a=='z' || a=='Z'){ e=17; i++;} - else if(a=='-' ||a=='.'|| isdigit (a)){ e=18;} + else if(a=='-' || a=='.' || a=='e' || a=='E' || isdigit (a)){ e=18;} else if(a==','){ e=19; i++;} else if(a==' '){i++;} break; @@ -1804,7 +1804,7 @@ Svg_parser::get_tokens_path(String path){ //mini path lexico-parser case 16: tokens.push_back("H"); e=0; break; case 17: tokens.push_back("z"); e=0; break;//loop - case 18: if(a=='-'||a=='.'|| isdigit (a)){ + case 18: if(a=='-' || a=='.' || a=='e' || a=='E' || isdigit (a)){ buffer.append(path.substr(i,1));i++; }else{ e=20;