skip horizontal, faster
This commit is contained in:
parent
58f95e0e75
commit
ce938fa92a
1 changed files with 2 additions and 0 deletions
|
@ -648,6 +648,8 @@ proc fillPolygons*(
|
||||||
if bounds.y > y.float32 or bounds.y + bounds.h < y.float32:
|
if bounds.y > y.float32 or bounds.y + bounds.h < y.float32:
|
||||||
continue
|
continue
|
||||||
for line in poly.segments:
|
for line in poly.segments:
|
||||||
|
if line.at.y == line.to.y: # Skip horizontal lines
|
||||||
|
continue
|
||||||
var line2 = line
|
var line2 = line
|
||||||
if line2.at.y > line2.to.y: # Sort order doesn't actually matter
|
if line2.at.y > line2.to.y: # Sort order doesn't actually matter
|
||||||
swap(line2.at, line2.to)
|
swap(line2.at, line2.to)
|
||||||
|
|
Loading…
Reference in a new issue