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

anti-alias problem. thank you author #49

Open
zqiangang opened this issue Aug 18, 2023 · 2 comments
Open

anti-alias problem. thank you author #49

zqiangang opened this issue Aug 18, 2023 · 2 comments

Comments

@zqiangang
Copy link
Contributor

thank you!
hello sir , i find some problem that the anti-alias algorithm,

  skity::Paint p;
  p.setStyle(skity::Paint::Style::kStroke_Style);
  p.setStrokeWidth(10);


  canvas->drawLine(100,100,300,300, p);

  canvas->drawCircle(100,100,100, p);

// create path

skity::Path path;
path.moveTo(199, 34);
path.lineTo(253, 143);
path.lineTo(374, 160);
path.lineTo(287, 244);
path.lineTo(307, 365);
path.lineTo(199, 309);
path.lineTo(97, 365);
path.lineTo(112, 245);
path.lineTo(26, 161);
path.lineTo(146, 143);
path.close();
canvas->drawPath(path, paint);

i try draw a circle , sloping line and a star( example code ) , but i find all of shape is very solid for every pixel and i can't find any effect of anti-alias for pixel

the photo :
屏幕截图 2023-08-18 172619

i set the paint to anyti-alias but no effect at all,
p.setAntiAlias(true);
see: this a new photo
222

@RuiwenTang
Copy link
Owner

For now, Skity handle anti-alias using MSAA, so there must be enable multisample. I implement a countor-aa in the past, but the performance is poor, so it is abandoned. You can reference the old version in here

tag commit: cf145bb

@zqiangang
Copy link
Contributor Author

thank you, friendly author

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

2 participants