Can you get the SVG text rather than PNG bytes? #164
-
| Is it possible to get the SVG text of the canvas context? Wouldn't that be better to use for display rather than the PNG? | 
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            martinRenou
          
      
      
        Dec 25, 2020 
      
    
    Replies: 1 comment 1 reply
-
| It is not possible. Unfortunately, this is not part of the web 2D canvas API, so it might be difficult to implement this in a non-hacky way. The drawSVG library is a great library that might be better suited for this purpose. It might be possible for ipycanvas to play nicely with drawSvg, to have a bridge from one to the other. | 
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            
      Answer selected by
        dsblank
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
It is not possible. Unfortunately, this is not part of the web 2D canvas API, so it might be difficult to implement this in a non-hacky way.
The drawSVG library is a great library that might be better suited for this purpose.
It might be possible for ipycanvas to play nicely with drawSvg, to have a bridge from one to the other.