address todo
This commit is contained in:
parent
da351692d8
commit
4536baeefd
1 changed files with 8 additions and 9 deletions
|
@ -648,11 +648,10 @@ proc fillPolygons*(
|
||||||
inc curHit
|
inc curHit
|
||||||
alphas[x] += penEdge
|
alphas[x] += penEdge
|
||||||
for x in 0 ..< result.width:
|
for x in 0 ..< result.width:
|
||||||
var a = clamp(abs(alphas[x]) / float32(quality), 0.0, 1.0)
|
let a = clamp(abs(alphas[x]) / float32(quality), 0.0, 1.0)
|
||||||
var colorWithAlpha = color
|
var colorWithAlpha = color
|
||||||
colorWithAlpha.a = uint8(clamp(a, 0, 1) * 255.0)
|
colorWithAlpha.a = uint8(a * 255.0)
|
||||||
result[x, y] = colorWithAlpha
|
result.setRgbaUnsafe(x, y, colorWithAlpha)
|
||||||
# TODO: don't double-clamp and can probably be unsafe?
|
|
||||||
|
|
||||||
{.pop.}
|
{.pop.}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue