Skip to content
New issue

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

clearRect is drawing white instead of clearing to transparent #70

Open
Tracked by #13
kaldrenon opened this issue Aug 17, 2018 · 3 comments
Open
Tracked by #13

clearRect is drawing white instead of clearing to transparent #70

kaldrenon opened this issue Aug 17, 2018 · 3 comments

Comments

@kaldrenon
Copy link

A clear HTML5 canvas should have nothing on it. In my usage, calling ```ctx.clearRect(0, 0, this.canvasWidth, this.canvasHeight)

and then drawing new stuff on the canvas still results in a #FFF rect being put in the resulting SVG. Is there a way to clear the canvas that's to spec with HTML5 canvas?
@kaiservilhelm
Copy link

I too have experienced this problem.

@kaiservilhelm
Copy link

kaldrenon, using ctx.__clearCanvas() should work!
mind you thats 2 "_"s

@JoeyPriceless
Copy link

Yup, this is definitely unexpected behavior.

The Mozilla docs state that clearRect should set the pixels in the area to transparent back.

Why set to white when clearCanvas exists?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants