Skity icon indicating copy to clipboard operation
Skity copied to clipboard

anti-alias problem. thank you author

Open zqiangang opened this issue 2 years ago • 2 comments

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

zqiangang avatar Aug 18 '23 09:08 zqiangang

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: cf145bb50f7bd3995da74da82a732c08986e2ac7

RuiwenTang avatar Aug 18 '23 09:08 RuiwenTang

thank you, friendly author

zqiangang avatar Aug 18 '23 13:08 zqiangang