mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
sw_engine renderer: fix aliasing shape outline result.
There a scenario detected that stroke 2 is not enough to cover shape outlines. So make it bigger size.
This commit is contained in:
parent
c807010554
commit
46bd78a7c3
1 changed files with 4 additions and 1 deletions
|
@ -62,7 +62,10 @@ struct SwTask : Task
|
|||
shapeReset(&shape);
|
||||
if (!shapePrepare(&shape, sdata, clip, transform)) return;
|
||||
if (renderShape) {
|
||||
auto antiAlias = (strokeAlpha > 0 && strokeWidth >= 2) ? false : true;
|
||||
/* We assume that if stroke width is bigger than 2,
|
||||
shape outline below stroke could be full covered by stroke drawing.
|
||||
Thus it turns off antialising in that condition. */
|
||||
auto antiAlias = (strokeAlpha > 0 && strokeWidth > 2) ? false : true;
|
||||
if (!shapeGenRle(&shape, sdata, clip, antiAlias, compList.size() > 0 ? true : false)) return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue