You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//make a mock canvas context using canvas2svg. We use a C2S namespace for less typing:
var ctx = new C2S(500,500); //width, height of your desired svg file
//do your normal canvas stuff:
ctx.fillStyle="red";
ctx.fillRect(100,100,100,100);
//ok lets serialize to SVG:
var myRectangle = ctx.getSerializedSvg(true); //true here will replace any named entities with numbered ones.
//Standalone SVG doesn't support most named entities.
Is anything wrong for this code?
Best,
hanhuihong
The text was updated successfully, but these errors were encountered:
Hi developer,
<script src="/api/static/web/js/canvas2svg.js"></script>when i use the below code to test the canvas2pdf.js , it show me the blank in web not the red rect.
var ctx = new C2S(500,500); //width, height of your desired svg file
//do your normal canvas stuff:
ctx.fillStyle="red";
ctx.fillRect(100,100,100,100);
//ok lets serialize to SVG:
var myRectangle = ctx.getSerializedSvg(true); //true here will replace any named entities with numbered ones.
//Standalone SVG doesn't support most named entities.
Is anything wrong for this code?
Best,
hanhuihong
The text was updated successfully, but these errors were encountered: