excubo-ag / Blazor.Canvas

https://excubo-ag.github.io/Blazor.Canvas/
MIT License
220 stars 23 forks source link

Image Smoothing Enabled set not working #161

Closed Magehernan closed 2 years ago

Magehernan commented 2 years ago

Hi, i am drawing like pixel art imagen in the canvas and i need to disable smoothing, The problem is that the method from Context

protected ValueTask SetAsync(string field, bool value) => SetAsync(field, value.ToString());

when you pass a bool it convert it to string, instead of put the value directly. So i change it to

protected ValueTask SetAsync(string field, bool value) => InvokeEvalAsync(field, value.ToString().ToLowerInvariant());

and now it is working...

I will make a pull request.

stefanloerwald commented 2 years ago

Thank you for investigating and providing a bug fix PR. The release is in progress.

Magehernan commented 2 years ago

thank you for sharing this!