Skip to content

add CanvasRenderingContext2D.antialias#98

Open
matt1581813 wants to merge 2 commits into
samizdatco:mainfrom
matt1581813:main
Open

add CanvasRenderingContext2D.antialias#98
matt1581813 wants to merge 2 commits into
samizdatco:mainfrom
matt1581813:main

Conversation

@matt1581813

Copy link
Copy Markdown

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

@samizdatco

Copy link
Copy Markdown
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
Copy Markdown
Author

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

@matt1581813

Copy link
Copy Markdown
Author

you can try this demo

testCode.zip

@samizdatco

samizdatco commented Aug 9, 2022

Copy link
Copy Markdown
Owner

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

matt1581813 commented Aug 10, 2022

Copy link
Copy Markdown
Author

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