Index: trunk/src_plugins/export_png/png.c =================================================================== --- trunk/src_plugins/export_png/png.c (revision 27166) +++ trunk/src_plugins/export_png/png.c (revision 27167) @@ -1177,19 +1177,19 @@ if (NOT_EDGE(x1, y1) || NOT_EDGE(x2, y2)) have_outline |= doing_outline; - if (doing_outline) { - /* Special case - lines drawn along the bottom or right edges - are brought in by a pixel to make sure we have contiguous - outlines. */ - if (x1 == PCB->hidlib.size_x && x2 == PCB->hidlib.size_x) { - x1o = -1; - x2o = -1; - } - if (y1 == PCB->hidlib.size_y && y2 == PCB->hidlib.size_y) { - y1o = -1; - y2o = -1; - } + + /* libgd clipping bug - lines drawn along the bottom or right edges + need to be brought in by a pixel to make sure they are not clipped + by libgd - even tho they should be visible because of thickness, they + would not be because the center line is off the image */ + if (x1 == PCB->hidlib.size_x && x2 == PCB->hidlib.size_x) { + x1o = -1; + x2o = -1; } + if (y1 == PCB->hidlib.size_y && y2 == PCB->hidlib.size_y) { + y1o = -1; + y2o = -1; + } gdImageSetThickness(im, 0); linewidth = 0;