Skip to content

Commit d88da02

Browse files
authored
Merge pull request #497 from treeform/guzba
fix smooth draw fuzz
2 parents 5022a8a + 6a2c593 commit d88da02

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pixie.nimble

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "5.0.0"
1+
version = "5.0.1"
22
author = "Andre von Houck and Ryan Oldenburg"
33
description = "Full-featured 2d graphics library for Nim."
44
license = "MIT"

src/pixie/images.nim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,9 @@ proc drawSmooth(a, b: Image, transform: Mat3, blendMode: BlendMode) =
582582
xStart = clamp(xMin.floor.int, 0, a.width)
583583
xEnd = clamp(xMax.ceil.int, 0, a.width)
584584

585+
if xEnd - xStart == 0:
586+
continue
587+
585588
var srcPos = p + dx * xStart.float32 + dy * y.float32
586589
srcPos = vec2(srcPos.x - h, srcPos.y - h)
587590
for x in xStart ..< xEnd:

0 commit comments

Comments
 (0)