leipert commented on issue #11087: toolbox.icon with SVG Path doesn't work for 
certain paths
URL: 
https://github.com/apache/incubator-echarts/issues/11087#issuecomment-528748844
 
 
   @Ovilia It does render render properly in this [SVG 
demo](https://jsfiddle.net/ony74b9h/1/)
   
   Also looking at the spec, it says for example:
   
   ```
   coordinate_pair_double::=
       coordinate_pair comma_wsp? coordinate_pair
   
   comma_wsp::=(wsp+ ","? wsp*) | ("," wsp*)
   wsp ::= (#x9 | #x20 | #xA | #xC | #xD)
   ```
   
   So we have a a coordinate pair with a `comma_wsp` in between it can either 
be:
   - 1 or whitespace + optional comma + zero or more white spaces, or
   - 1 comma + zero or more white spaces.
   
   If I look at the start of the minified path:
   
   ```
   M8 15A7 7 0 118 1
   ```
   
   we can actually produce it with the grammar:
   
   `M8 15` is produced by:
   
   ```
   moveto(
     "M",
     wsp('') // it's an optional whitespace
     coordinate_pair_sequence(
       coordinate_pair(
         coordinate(8),
         comma_wsp(" "),
         coordinate(15)
       )
     )
   );
   ```
   
   `A7 7 0 118 1` is produced by:
   
   ```
   elliptical_arc(
     "A",
     wsp(""), // it's an optional whitespace
     elliptical_arc_argument_sequence(
       elliptical_arc_argument(
         number(7),
         comma_wsp(" "),
         number(7),
         comma_wsp(" "),
         number(0),
         comma_wsp(" "),
         flag(1),
         comma_wsp(""), // it's an optional comma_wsp
         flag(1),
         comma_wsp(""), // it's an optional comma_wsp
         coordinate_pair(
           coordinate(8),
           comma_wsp(" "),
           coordinate(1)
         )
       )
     )
   );
   
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to