We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Two issues:
import * as PImage from "pureimage" import * as fs from 'fs' // make image const img1 = PImage.make(100, 100) const ctx = img1.getContext('2d'); ctx.clearRect(0, 0, 100,100) // <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><path d="M0 0 H40 V100 H0 V60 H20 V40 H0z M60 0 H100 V40 H80 V60 H100 V100 H60z"></path></svg> // http://www.professorcloud.com/svg-to-canvas/ ctx.fillStyle = "#0000ff"; ctx.beginPath(); ctx.moveTo(0,0); ctx.lineTo(40,0); ctx.lineTo(40,100); ctx.lineTo(0,100); ctx.lineTo(0,60); ctx.lineTo(20,60); ctx.lineTo(20,40); ctx.lineTo(0,40); ctx.closePath(); ctx.moveTo(60,0); ctx.lineTo(100,0); ctx.lineTo(100,40); ctx.lineTo(80,40); ctx.lineTo(80,60); ctx.lineTo(100,60); ctx.lineTo(100,100); ctx.lineTo(60,100); ctx.closePath(); ctx.fill(); ctx.stroke(); PImage.encodePNGToStream(img1, fs.createWriteStream('out.png'));
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Expected image:
Actual image:
Two issues:
Steps To Reproduce
The text was updated successfully, but these errors were encountered: