Index: trunk/src/crosshair.c =================================================================== --- trunk/src/crosshair.c (revision 17205) +++ trunk/src/crosshair.c (revision 17206) @@ -1055,7 +1055,7 @@ pcb_gui->set_color(pcb_crosshair.GC, conf_core.appearance.color.crosshair); pcb_gui->set_draw_xor(pcb_crosshair.GC, 1); - pcb_gui->set_line_cap(pcb_crosshair.GC, Round_Cap); + pcb_gui->set_line_cap(pcb_crosshair.GC, pcb_cap_round); pcb_gui->set_line_width(pcb_crosshair.GC, 1); /* set initial shape */ Index: trunk/src/draw.c =================================================================== --- trunk/src/draw.c (revision 17205) +++ trunk/src/draw.c (revision 17206) @@ -351,7 +351,7 @@ pcb_gui->set_drawing_mode(PCB_HID_COMP_RESET, pcb_draw_out.direct, drawn_area); pcb_gui->set_drawing_mode(PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, drawn_area); - pcb_gui->set_line_cap(pcb_draw_out.fgGC, Round_Cap); + pcb_gui->set_line_cap(pcb_draw_out.fgGC, pcb_cap_round); pcb_gui->set_line_width(pcb_draw_out.fgGC, 0); pcb_gui->set_draw_xor(pcb_draw_out.fgGC, 1); @@ -378,7 +378,7 @@ /* Draw pins' and pads' names */ pcb_gui->set_drawing_mode(PCB_HID_COMP_RESET, pcb_draw_out.direct, drawn_area); pcb_gui->set_drawing_mode(PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, drawn_area); - pcb_gui->set_line_cap(pcb_draw_out.fgGC, Round_Cap); + pcb_gui->set_line_cap(pcb_draw_out.fgGC, pcb_cap_round); pcb_gui->set_line_width(pcb_draw_out.fgGC, 0); if (PCB->SubcOn) pcb_r_search(PCB->Data->subc_tree, drawn_area, NULL, draw_subc_label_callback, NULL, NULL); Index: trunk/src/hid.h =================================================================== --- trunk/src/hid.h (revision 17205) +++ trunk/src/hid.h (revision 17206) @@ -61,8 +61,8 @@ twice. */ typedef enum { pcb_cap_invalid = -1, - Square_Cap, /* Square pins or pads. */ - Round_Cap, /* For normal traces, round pins */ + pcb_cap_square, /* square pins or pads when drawn using a line */ + pcb_cap_round, /* for normal traces, round pins */ } pcb_cap_style_t; /* The HID may need something more than an "int" for colors, timers, Index: trunk/src/hid_draw_helpers.c =================================================================== --- trunk/src/hid_draw_helpers.c (revision 17205) +++ trunk/src/hid_draw_helpers.c (revision 17206) @@ -30,7 +30,7 @@ pcb_coord_t this_x, this_y; pcb_gui->set_line_width(gc, 0); - pcb_gui->set_line_cap(gc, Round_Cap); + pcb_gui->set_line_cap(gc, pcb_cap_round); /* If the contour is round, use an arc drawing routine. */ if (pl->is_round) { Index: trunk/src/obj_arc.c =================================================================== --- trunk/src/obj_arc.c (revision 17205) +++ trunk/src/obj_arc.c (revision 17206) @@ -858,13 +858,13 @@ } else pcb_gui->set_line_width(pcb_draw_out.fgGC, arc->Thickness); - pcb_gui->set_line_cap(pcb_draw_out.fgGC, Round_Cap); + pcb_gui->set_line_cap(pcb_draw_out.fgGC, pcb_cap_round); pcb_gui->draw_arc(pcb_draw_out.fgGC, arc->X, arc->Y, arc->Width, arc->Height, arc->StartAngle, arc->Delta); } else { pcb_gui->set_line_width(pcb_draw_out.fgGC, 0); - pcb_gui->set_line_cap(pcb_draw_out.fgGC, Round_Cap); + pcb_gui->set_line_cap(pcb_draw_out.fgGC, pcb_cap_round); if(conf_core.editor.thin_draw) pcb_gui->draw_arc(pcb_draw_out.fgGC, arc->X, arc->Y, arc->Width, arc->Height, arc->StartAngle, arc->Delta); Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 17205) +++ trunk/src/obj_line.c (revision 17206) @@ -998,7 +998,7 @@ void pcb_line_draw_(pcb_line_t *line, int allow_term_gfx) { PCB_DRAW_BBOX(line); - pcb_gui->set_line_cap(pcb_draw_out.fgGC, Round_Cap); + pcb_gui->set_line_cap(pcb_draw_out.fgGC, pcb_cap_round); if (!conf_core.editor.thin_draw && !conf_core.editor.wireframe_draw) { if ((allow_term_gfx) && pcb_draw_term_need_gfx(line)) { pcb_gui->set_line_width(pcb_draw_out.active_padGC, line->Thickness); Index: trunk/src/obj_poly.c =================================================================== --- trunk/src/obj_poly.c (revision 17205) +++ trunk/src/obj_poly.c (revision 17206) @@ -1021,7 +1021,7 @@ pcb_gui->fill_pcb_polygon(pcb_draw_out.active_padGC, polygon, drawn_area); head = &polygon->Clipped->contours->head; - pcb_gui->set_line_cap(pcb_draw_out.fgGC, Square_Cap); + pcb_gui->set_line_cap(pcb_draw_out.fgGC, pcb_cap_square); for(n = head, i = 0; (n != head) || (i == 0); n = n->next, i++) { pcb_coord_t x, y, r; x = (n->prev->point[0] + n->point[0] + n->next->point[0]) / 3; Index: trunk/src/obj_pstk.c =================================================================== --- trunk/src/obj_pstk.c (revision 17205) +++ trunk/src/obj_pstk.c (revision 17206) @@ -358,7 +358,7 @@ pcb_gui->fill_polygon_offs(pcb_draw_out.fgGC, shape->data.poly.len, shape->data.poly.x, shape->data.poly.y, ps->x, ps->y); break; case PCB_PSSH_LINE: - pcb_gui->set_line_cap(pcb_draw_out.fgGC, shape->data.line.square ? Square_Cap : Round_Cap); + pcb_gui->set_line_cap(pcb_draw_out.fgGC, shape->data.line.square ? pcb_cap_square : pcb_cap_round); pcb_gui->set_line_width(pcb_draw_out.fgGC, shape->data.line.thickness); pcb_gui->draw_line(pcb_draw_out.fgGC, ps->x + shape->data.line.x1, ps->y + shape->data.line.y1, ps->x + shape->data.line.x2, ps->y + shape->data.line.y2); break; Index: trunk/src/tool_via.c =================================================================== --- trunk/src/tool_via.c (revision 17205) +++ trunk/src/tool_via.c (revision 17206) @@ -86,7 +86,7 @@ static void xor_draw_fake_via(pcb_coord_t x, pcb_coord_t y, pcb_coord_t dia, pcb_coord_t clearance) { pcb_coord_t r = (dia/2)+clearance; - pcb_gui->set_line_cap(pcb_crosshair.GC, Round_Cap); + pcb_gui->set_line_cap(pcb_crosshair.GC, pcb_cap_round); pcb_gui->set_line_width(pcb_crosshair.GC, 0); pcb_gui->draw_arc(pcb_crosshair.GC, x, y, r, r, 0, 360); } Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 17205) +++ trunk/src_plugins/autoroute/autoroute.c (revision 17206) @@ -1356,7 +1356,7 @@ if (ddraw != NULL) { ddraw->set_line_width(ar_gc, thickness); - ddraw->set_line_cap(ar_gc, Round_Cap); + ddraw->set_line_cap(ar_gc, pcb_cap_round); ddraw->set_color(ar_gc, SLayer->Color); ddraw->draw_line(ar_gc, b.X1, b.Y1, b.X2, b.Y1); @@ -1395,7 +1395,7 @@ if (ddraw == NULL) return; - ddraw->set_line_cap(ar_gc, Round_Cap); + ddraw->set_line_cap(ar_gc, pcb_cap_round); ddraw->set_line_width(ar_gc, 1); ddraw->set_color(ar_gc, Settings.MaskColor); @@ -4573,7 +4573,7 @@ ddraw = pcb_gui->request_debug_draw(); if (ddraw != NULL) { ar_gc = ddraw->make_gc(); - ddraw->set_line_cap(ar_gc, Round_Cap); + ddraw->set_line_cap(ar_gc, pcb_cap_round); } #endif Index: trunk/src_plugins/export_gcode/gcode.c =================================================================== --- trunk/src_plugins/export_gcode/gcode.c (revision 17205) +++ trunk/src_plugins/export_gcode/gcode.c (revision 17206) @@ -581,7 +581,7 @@ { pcb_hid_gc_t rv = (pcb_hid_gc_t) malloc(sizeof(struct hid_gc_s)); rv->me_pointer = &gcode_hid; - rv->cap = Round_Cap; + rv->cap = pcb_cap_round; rv->width = 1; rv->color = (struct color_struct *) malloc(sizeof(*rv->color)); rv->color->r = rv->color->g = rv->color->b = 0; @@ -665,12 +665,12 @@ int r; switch (gc->cap) { - case Round_Cap: + case pcb_cap_round: type = 'C'; r = pcb_to_gcode(gc->width / 2 + gcode_toolradius); break; default: - case Square_Cap: + case pcb_cap_square: r = pcb_to_gcode(gc->width + gcode_toolradius * 2); type = 'S'; break; Index: trunk/src_plugins/export_gerber/gerber.c =================================================================== --- trunk/src_plugins/export_gerber/gerber.c (revision 17205) +++ trunk/src_plugins/export_gerber/gerber.c (revision 17206) @@ -874,7 +874,7 @@ static pcb_hid_gc_t gerber_make_gc(void) { pcb_hid_gc_t rv = (pcb_hid_gc_t) calloc(1, sizeof(*rv)); - rv->cap = Round_Cap; + rv->cap = pcb_cap_round; return rv; } @@ -939,7 +939,7 @@ if (radius) { radius *= 2; - if (radius != linewidth || lastcap != Round_Cap) { + if (radius != linewidth || lastcap != pcb_cap_round) { Aperture *aptr = findAperture(curr_aptr_list, radius, ROUND); if (aptr == NULL) pcb_fprintf(stderr, "error: aperture for radius %$mS type ROUND is null\n", radius); @@ -946,7 +946,7 @@ else if (f && !is_drill) fprintf(f, "G54D%d*", aptr->dCode); linewidth = radius; - lastcap = Round_Cap; + lastcap = pcb_cap_round; } } else if (linewidth != gc->width || lastcap != gc->cap) { @@ -956,11 +956,11 @@ linewidth = gc->width; lastcap = gc->cap; switch (gc->cap) { - case Round_Cap: + case pcb_cap_round: shape = ROUND; break; default: - case Square_Cap: + case pcb_cap_square: shape = SQUARE; break; } @@ -1006,7 +1006,7 @@ { pcb_bool m = pcb_false; - if (x1 != x2 && y1 != y2 && gc->cap == Square_Cap) { + if (x1 != x2 && y1 != y2 && gc->cap == pcb_cap_square) { pcb_coord_t x[5], y[5]; double tx, ty, theta; Index: trunk/src_plugins/export_nelma/nelma.c =================================================================== --- trunk/src_plugins/export_nelma/nelma.c (revision 17205) +++ trunk/src_plugins/export_nelma/nelma.c (revision 17206) @@ -687,7 +687,7 @@ { pcb_hid_gc_t rv = (pcb_hid_gc_t) malloc(sizeof(struct hid_gc_s)); rv->me_pointer = &nelma_hid; - rv->cap = Round_Cap; + rv->cap = pcb_cap_round; rv->width = 1; rv->color = (struct color_struct *) malloc(sizeof(*rv->color)); rv->color->r = rv->color->g = rv->color->b = 0; @@ -771,12 +771,12 @@ int r; switch (gc->cap) { - case Round_Cap: + case pcb_cap_round: type = 'C'; r = pcb_to_nelma(gc->width / 2); break; default: - case Square_Cap: + case pcb_cap_square: r = pcb_to_nelma(gc->width); type = 'S'; break; Index: trunk/src_plugins/export_openems/export_openems.c =================================================================== --- trunk/src_plugins/export_openems/export_openems.c (revision 17205) +++ trunk/src_plugins/export_openems/export_openems.c (revision 17206) @@ -756,7 +756,7 @@ { wctx_t *ctx = ems_ctx; - if (gc->cap == Square_Cap) { + if (gc->cap == pcb_cap_square) { pcb_coord_t x[4], y[4]; pcb_line_t tmp; tmp.Point1.X = x1; Index: trunk/src_plugins/export_openscad/export_openscad.c =================================================================== --- trunk/src_plugins/export_openscad/export_openscad.c (revision 17205) +++ trunk/src_plugins/export_openscad/export_openscad.c (revision 17206) @@ -502,7 +502,7 @@ length = pcb_distance(x1, y1, x2, y2); angle = atan2((double)y2-y1, (double)x2-x1); - if (gc->cap == Square_Cap) + if (gc->cap == pcb_cap_square) cap_style = "sc"; else cap_style = "rc"; Index: trunk/src_plugins/export_png/png.c =================================================================== --- trunk/src_plugins/export_png/png.c (revision 17205) +++ trunk/src_plugins/export_png/png.c (revision 17206) @@ -1296,7 +1296,7 @@ { pcb_hid_gc_t rv = (pcb_hid_gc_t) calloc(sizeof(hid_gc_s), 1); rv->me_pointer = &png_hid; - rv->cap = Round_Cap; + rv->cap = pcb_cap_round; rv->width = 1; rv->color = (color_struct *) malloc(sizeof(color_struct)); rv->color->r = rv->color->g = rv->color->b = rv->color->a = 0; @@ -1474,11 +1474,11 @@ int r; switch (gc->cap) { - case Round_Cap: + case pcb_cap_round: type = 'C'; break; default: - case Square_Cap: + case pcb_cap_square: type = 'S'; break; } @@ -1608,7 +1608,7 @@ { if (x1 == x2 && y1 == y2 && !photo_mode) { pcb_coord_t w = gc->width / 2; - if (gc->cap != Square_Cap) + if (gc->cap != pcb_cap_square) png_fill_circle(gc, x1, y1, w); else png_fill_rect(gc, x1 - w, y1 - w, x1 + w, y1 + w); @@ -1634,7 +1634,7 @@ gdImageSetThickness(im, 0); linewidth = 0; - if (gc->cap != Square_Cap || x1 == x2 || y1 == y2) { + if (gc->cap != pcb_cap_square || x1 == x2 || y1 == y2) { gdImageLine(im, SCALE_X(x1), SCALE_Y(y1), SCALE_X(x2), SCALE_Y(y2), gdBrushed); } else { Index: trunk/src_plugins/export_ps/eps.c =================================================================== --- trunk/src_plugins/export_ps/eps.c (revision 17205) +++ trunk/src_plugins/export_ps/eps.c (revision 17206) @@ -398,7 +398,7 @@ static pcb_hid_gc_t eps_make_gc(void) { pcb_hid_gc_t rv = (pcb_hid_gc_t) malloc(sizeof(hid_gc_s)); - rv->cap = Round_Cap; + rv->cap = pcb_cap_round; rv->width = 0; rv->color = 0; return rv; @@ -491,11 +491,11 @@ if (lastcap != gc->cap) { int c; switch (gc->cap) { - case Round_Cap: + case pcb_cap_round: c = 1; break; default: - case Square_Cap: + case pcb_cap_square: c = 2; break; } @@ -523,7 +523,7 @@ { pcb_coord_t w = gc->width / 2; if (x1 == x2 && y1 == y2) { - if (gc->cap == Square_Cap) + if (gc->cap == pcb_cap_square) eps_fill_rect(gc, x1 - w, y1 - w, x1 + w, y1 + w); else eps_fill_circle(gc, x1, y1, w); @@ -530,7 +530,7 @@ return; } use_gc(gc); - if (gc->erase && gc->cap != Square_Cap) { + if (gc->erase && gc->cap != pcb_cap_square) { double ang = atan2(y2 - y1, x2 - x1); double dx = w * sin(ang); double dy = -w * cos(ang); Index: trunk/src_plugins/export_ps/ps.c =================================================================== --- trunk/src_plugins/export_ps/ps.c (revision 17205) +++ trunk/src_plugins/export_ps/ps.c (revision 17206) @@ -959,7 +959,7 @@ { pcb_hid_gc_t rv = (pcb_hid_gc_t) calloc(1, sizeof(hid_gc_s)); rv->me_pointer = &ps_hid; - rv->cap = Round_Cap; + rv->cap = pcb_cap_round; return rv; } @@ -1038,11 +1038,11 @@ if (lastcap != gc->cap) { int c; switch (gc->cap) { - case Round_Cap: + case pcb_cap_round: c = 1; break; default: - case Square_Cap: + case pcb_cap_square: c = 2; break; } @@ -1089,7 +1089,7 @@ /* If you're etching your own paste mask, this will reduce the amount of brass you need to etch by drawing outlines for large pads. See also ps_fill_rect. */ - if (is_paste && gc->width > 2500 && gc->cap == Square_Cap && (x1 == x2 || y1 == y2)) { + if (is_paste && gc->width > 2500 && gc->cap == pcb_cap_square && (x1 == x2 || y1 == y2)) { pcb_coord_t t, w; if (x1 > x2) { t = x1; @@ -1108,7 +1108,7 @@ #endif if (x1 == x2 && y1 == y2) { pcb_coord_t w = gc->width / 2; - if (gc->cap == Square_Cap) + if (gc->cap == pcb_cap_square) ps_fill_rect(gc, x1 - w, y1 - w, x1 + w, y1 + w); else ps_fill_circle(gc, x1, y1, w); @@ -1272,7 +1272,7 @@ /* See comment in ps_draw_line. */ if (is_paste && (x2 - x1) > 2500 && (y2 - y1) > 2500) { linewidth = 1000; - lastcap = Round_Cap; + lastcap = pcb_cap_round; fprintf(f, "1000 setlinewidth 1 setlinecap 1 setlinejoin\n"); fprintf(f, "%d %d moveto %d %d lineto %d %d lineto %d %d lineto closepath stroke\n", x1 + 500 - bloat, y1 + 500 - bloat, Index: trunk/src_plugins/export_svg/svg.c =================================================================== --- trunk/src_plugins/export_svg/svg.c (revision 17205) +++ trunk/src_plugins/export_svg/svg.c (revision 17206) @@ -80,9 +80,9 @@ static const char *CAPS(pcb_cap_style_t cap) { switch (cap) { - case Round_Cap: + case pcb_cap_round: return "round"; - case Square_Cap: + case pcb_cap_square: return "square"; } return ""; @@ -402,7 +402,7 @@ { pcb_hid_gc_t rv = (pcb_hid_gc_t) calloc(sizeof(hid_gc_s), 1); rv->me_pointer = &svg_hid; - rv->cap = Round_Cap; + rv->cap = pcb_cap_round; rv->width = 1; rv->color = NULL; return rv; Index: trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c =================================================================== --- trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c (revision 17205) +++ trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c (revision 17206) @@ -588,11 +588,11 @@ static void ghid_gdk_set_line_cap(pcb_hid_gc_t gc, pcb_cap_style_t style) { switch (style) { - case Round_Cap: + case pcb_cap_round: gc->cap = GDK_CAP_ROUND; gc->join = GDK_JOIN_ROUND; break; - case Square_Cap: + case pcb_cap_square: gc->cap = GDK_CAP_PROJECTING; gc->join = GDK_JOIN_MITER; break; Index: trunk/src_plugins/hid_gtk3_cairo/gtkhid-cairo.c =================================================================== --- trunk/src_plugins/hid_gtk3_cairo/gtkhid-cairo.c (revision 17205) +++ trunk/src_plugins/hid_gtk3_cairo/gtkhid-cairo.c (revision 17206) @@ -757,11 +757,11 @@ cairo_line_join_t join = CAIRO_LINE_JOIN_MITER; switch (style) { - case Round_Cap: + case pcb_cap_round: cap = CAIRO_LINE_CAP_ROUND; join = CAIRO_LINE_JOIN_ROUND; break; - case Square_Cap: + case pcb_cap_square: cap = CAIRO_LINE_CAP_SQUARE; join = CAIRO_LINE_JOIN_MITER; break; Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 17205) +++ trunk/src_plugins/hid_lesstif/main.c (revision 17206) @@ -2992,11 +2992,11 @@ pcb_printf("set_gc c%s %08lx w%#mS c%d x%d e%d\n", gc->colorname, gc->color, gc->width, gc->cap, gc->xor_set, gc->erase); #endif switch (gc->cap) { - case Square_Cap: + case pcb_cap_square: cap = CapProjecting; join = JoinMiter; break; - case Round_Cap: + case pcb_cap_round: cap = CapRound; join = JoinRound; break; @@ -3071,7 +3071,7 @@ y2 = dy2; set_gc(gc); - if (gc->cap == Square_Cap && x1 == x2 && y1 == y2) { + if (gc->cap == pcb_cap_square && x1 == x2 && y1 == y2) { XFillRectangle(display, pixmap, my_gc, x1 - vw / 2, y1 - vw / 2, vw, vw); if (use_mask()) XFillRectangle(display, mask_bitmap, mask_gc, x1 - vw / 2, y1 - vw / 2, vw, vw); Index: trunk/src_plugins/lib_hid_gl/hidgl.c =================================================================== --- trunk/src_plugins/lib_hid_gl/hidgl.c (revision 17205) +++ trunk/src_plugins/lib_hid_gl/hidgl.c (revision 17206) @@ -324,11 +324,11 @@ } switch (cap) { - case Round_Cap: + case pcb_cap_round: circular_caps = 1; break; - case Square_Cap: + case pcb_cap_square: x1 -= deltax * width / 2. / length; y1 -= deltay * width / 2. / length; x2 += deltax * width / 2. / length; Index: trunk/src_plugins/loghid/hid-logger.c =================================================================== --- trunk/src_plugins/loghid/hid-logger.c (revision 17205) +++ trunk/src_plugins/loghid/hid-logger.c (revision 17206) @@ -110,8 +110,8 @@ { const char *txt = "unknown"; switch (style) { - ENUM_LOG_TEXT(Square_Cap); - ENUM_LOG_TEXT(Round_Cap); + ENUM_LOG_TEXT(pcb_cap_square); + ENUM_LOG_TEXT(pcb_cap_round); } pcb_fprintf(out_, "set_line_cap(gc, %s)\n", txt); delegatee_->set_line_cap(gc, style);