canvas2svg icon indicating copy to clipboard operation
canvas2svg copied to clipboard

Can not see the plot in browser using the demo code

Open honghh2018 opened this issue 3 years ago • 0 comments

Hi developer, when i use the below code to test the canvas2pdf.js , it show me the blank in web not the red rect.

  //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

honghh2018 avatar Nov 05 '22 10:11 honghh2018