fix smooth draw fuzz
This commit is contained in:
parent
5022a8afe7
commit
6a2c5934f7
2 changed files with 4 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
version = "5.0.0"
|
version = "5.0.1"
|
||||||
author = "Andre von Houck and Ryan Oldenburg"
|
author = "Andre von Houck and Ryan Oldenburg"
|
||||||
description = "Full-featured 2d graphics library for Nim."
|
description = "Full-featured 2d graphics library for Nim."
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
|
@ -582,6 +582,9 @@ proc drawSmooth(a, b: Image, transform: Mat3, blendMode: BlendMode) =
|
||||||
xStart = clamp(xMin.floor.int, 0, a.width)
|
xStart = clamp(xMin.floor.int, 0, a.width)
|
||||||
xEnd = clamp(xMax.ceil.int, 0, a.width)
|
xEnd = clamp(xMax.ceil.int, 0, a.width)
|
||||||
|
|
||||||
|
if xEnd - xStart == 0:
|
||||||
|
continue
|
||||||
|
|
||||||
var srcPos = p + dx * xStart.float32 + dy * y.float32
|
var srcPos = p + dx * xStart.float32 + dy * y.float32
|
||||||
srcPos = vec2(srcPos.x - h, srcPos.y - h)
|
srcPos = vec2(srcPos.x - h, srcPos.y - h)
|
||||||
for x in xStart ..< xEnd:
|
for x in xStart ..< xEnd:
|
||||||
|
|
Loading…
Reference in a new issue