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

add CanvasRenderingContext2D.antialias #98

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

matt1581813
Copy link

add property antialias for CanvasRenderingContext2D;
can use context.antialias = 'none'; to disable antialias
antialias img
aaa
disable antialias
aaa

@samizdatco
Copy link
Owner

Thanks for all your work on this (nice job making the setting configurable btw)!

I can't quite tell from the demonstration images how this differs from setting imageSmoothingEnabled to false. Could you try testing that as a comparison?

@matt1581813
Copy link
Author

use imageSmoothingEnabled = false
imageSmoothingEnabled
use antialias = 'none'
antialias

@matt1581813
Copy link
Author

you can try this demo

testCode.zip

@samizdatco
Copy link
Owner

samizdatco commented Aug 9, 2022

Oh, I think I misunderstood before. Is the goal with this patch to remove those faint triangular line artifacts? I've never seen those in my testing.

Could you provide me with some code that triggers that bug (the zip file you posted above seems to only contain the file ceramicRoof_1.jpg)? It would also be helpful if you could tell me:

  1. The OS you're using
  2. The version of skia-canvas
  3. Whether canvas.gpu is true or false

@matt1581813
Copy link
Author

matt1581813 commented Aug 10, 2022

sorry ,that zip miss the test code, i upload a new one
os: windows 10
skia-canvas version: 0.9.31
canvas.gpu : false

testCode.zip

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

Successfully merging this pull request may close these issues.

2 participants