diff --git a/pixie.nimble b/pixie.nimble index 09e00a6..ff8590b 100644 --- a/pixie.nimble +++ b/pixie.nimble @@ -1,4 +1,4 @@ -version = "5.0.0" +version = "5.0.1" author = "Andre von Houck and Ryan Oldenburg" description = "Full-featured 2d graphics library for Nim." license = "MIT" diff --git a/src/pixie/images.nim b/src/pixie/images.nim index 6b0f77e..c4ec9cf 100644 --- a/src/pixie/images.nim +++ b/src/pixie/images.nim @@ -582,6 +582,9 @@ proc drawSmooth(a, b: Image, transform: Mat3, blendMode: BlendMode) = xStart = clamp(xMin.floor.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 srcPos = vec2(srcPos.x - h, srcPos.y - h) for x in xStart ..< xEnd: