Fix math error in clipping code

ymax should be the ceil of the argument, not the floor.
This commit is contained in:
K Henriksson 2021-02-28 17:29:16 -08:00 committed by jaseg
parent b5493015c0
commit c05abf0d0f

View file

@ -596,7 +596,7 @@ class GerberCairoContext(GerberContext):
# caused by flipping the axis.
clp.ymin = math.floor(
(self.scale[1] * ymin) - math.ceil(self.origin_in_pixels[1]))
clp.ymax = math.floor(
clp.ymax = math.ceil(
(self.scale[1] * ymax) - math.floor(self.origin_in_pixels[1]))
# Calculate width and height, rounded to the nearest pixel