From d5273b78741961fa13eb7b3805d12347c3008f50 Mon Sep 17 00:00:00 2001 From: Julian Lamb Date: Thu, 2 Feb 2012 11:08:45 -0500 Subject: [PATCH] don't update min/max bounding box when drawing with CLEAR polarity fixes bug 3483097 where image justify was skewing the drawing due to bad min/max calcs --- src/gerber.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gerber.c b/src/gerber.c index 3452965..d4a2aac 100644 --- a/src/gerber.c +++ b/src/gerber.c @@ -685,8 +685,10 @@ gerber_parse_file_segment (gint levelOfRecursion, gerbv_image_t *image, } /* update the info bounding box with this latest bounding box */ - gerber_update_image_min_max(&boundingBox, repeat_off_X, repeat_off_Y, image); - + /* don't change the bounding box if the polarity is clear */ + if (state->layer->polarity != GERBV_POLARITY_CLEAR){ + gerber_update_image_min_max(&boundingBox, repeat_off_X, repeat_off_Y, image); + } /* optionally update the knockout measurement box */ if (knockoutMeasure) { if (boundingBox.left < knockoutLimitXmin) -- 2.11.4.GIT