Fix math error in clipping code
ymax should be the ceil of the argument, not the floor.
This commit is contained in:
parent
b5493015c0
commit
c05abf0d0f
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue