Index: trunk/src_plugins/export_png/png.c =================================================================== --- trunk/src_plugins/export_png/png.c (revision 27163) +++ trunk/src_plugins/export_png/png.c (revision 27164) @@ -139,8 +139,8 @@ drill */ -#define PHOTO_FLIP_X 1 -#define PHOTO_FLIP_Y 2 +#define PHOTO_FLIP_X 1 +#define PHOTO_FLIP_Y 2 static int photo_mode, photo_flip; static gdImagePtr photo_copper[PCB_MAX_LAYER]; @@ -242,7 +242,7 @@ static const color_struct silk_bottom_shadow = {0x0E0E0EFF, 14, 14, 14, 255}; pcb_export_opt_t png_attribute_list[] = { - /* other HIDs expect this to be first. */ +/* other HIDs expect this to be first. */ /* %start-doc options "93 PNG Options" @ftable @code @@ -1034,10 +1034,7 @@ w = PCB->hidlib.size_x; } - /* - * figure out the scale factor we need to make the image - * fit in our specified PNG file size - */ + /* figure out the scale factor to fit in the specified PNG file size */ xmax = ymax = dpi = 0; if (options[HA_dpi].lng != 0) { dpi = options[HA_dpi].lng; @@ -1071,10 +1068,8 @@ } if (dpi > 0) { - /* - * a scale of 1 means 1 pixel is 1 inch - * a scale of 10 means 1 pixel is 10 inches - */ + /* a scale of 1 means 1 pixel is 1 inch + * a scale of 10 means 1 pixel is 10 inches */ scale = PCB_INCH_TO_COORD(1) / dpi; w = pcb_round(w / scale) - PNG_SCALE_HACK1; h = pcb_round(h / scale) - PNG_SCALE_HACK1; @@ -1111,11 +1106,7 @@ parse_bloat(options[HA_bloat].str); - /* - * Allocate white and black -- the first color allocated - * becomes the background color - */ - + /* Allocate white and black; the first color allocated becomes the background color */ white = (color_struct *) malloc(sizeof(color_struct)); white->r = white->g = white->b = 255; if (options[HA_use_alpha].lng) @@ -1598,10 +1589,8 @@ } gdImageColorTransparent(agc->brush, bg); - /* - * if we shrunk to a radius/box width of zero, then just use - * a single pixel to draw with. - */ + /* if we shrunk to a radius/box width of zero, then just use + a single pixel to draw with. */ if (r <= 1) gdImageFilledRectangle(agc->brush, 0, 0, 0, 0, fg); else { @@ -1697,11 +1686,9 @@ gdImageLine(im, SCALE_X(x1) + x1o, SCALE_Y(y1) + y1o, SCALE_X(x2) + x2o, SCALE_Y(y2) + y2o, gdBrushed); } else { - /* - * if we are drawing a line with a square end cap and it is - * not purely horizontal or vertical, then we need to draw - * it as a filled polygon. - */ + /* if we are drawing a line with a square end cap and it is + not purely horizontal or vertical, then we need to draw + it as a filled polygon. */ int fg, w = gc->width, dx = x2 - x1, dy = y2 - y1, dwx, dwy; gdPoint p[4]; double l = sqrt((double)dx * (double)dx + (double)dy * (double)dy) * 2.0; @@ -1753,10 +1740,8 @@ gdImageSetThickness(im, 0); linewidth = 0; - /* - * zero angle arcs need special handling as gd will output either - * nothing at all or a full circle when passed delta angle of 0 or 360. - */ + /* zero angle arcs need special handling as gd will output either + nothing at all or a full circle when passed delta angle of 0 or 360. */ if (delta_angle == 0) { pcb_coord_t x = (width * cos(start_angle * M_PI / 180)); pcb_coord_t y = (width * sin(start_angle * M_PI / 180)); @@ -1772,10 +1757,8 @@ ea = 360; } else { - /* - * in gdImageArc, 0 degrees is to the right and +90 degrees is down - * in pcb, 0 degrees is to the left and +90 degrees is down - */ + /* in gdImageArc, 0 degrees is to the right and +90 degrees is down + * in pcb, 0 degrees is to the left and +90 degrees is down */ start_angle = 180 - start_angle; delta_angle = -delta_angle; if (show_solder_side) { @@ -1791,10 +1774,8 @@ ea = start_angle; } - /* - * make sure we start between 0 and 360 otherwise gd does - * strange things - */ + /* make sure we start between 0 and 360 otherwise gd does + strange things */ sa = pcb_normalize_angle(sa); ea = pcb_normalize_angle(ea); } @@ -1953,7 +1934,6 @@ #ifdef HAVE_SOME_FORMAT pcb_hid_register_hid(&png_hid); - #endif return 0; }