mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-15 04:24:28 +00:00
sw_engine rle: code refactoring.
keep it neat code, --loc
This commit is contained in:
parent
a8a120942e
commit
a864a5a0ac
1 changed files with 2 additions and 3 deletions
|
@ -169,11 +169,10 @@ static void _horizLine(RleWorker& rw, SwCoord x, SwCoord y, SwCoord area, SwCoor
|
|||
|
||||
if (rw.outline->fillRule == FillRule::EvenOdd) {
|
||||
coverage &= 511;
|
||||
if (coverage > 256) coverage = 512 - coverage;
|
||||
else if (coverage == 256) coverage = 255;
|
||||
if (coverage > 255) coverage = 511 - coverage;
|
||||
} else {
|
||||
//normal non-zero winding rule
|
||||
if (coverage >= 256) coverage = 255;
|
||||
if (coverage > 255) coverage = 255;
|
||||
}
|
||||
|
||||
//span has ushort coordinates. check limit overflow
|
||||
|
|
Loading…
Add table
Reference in a new issue