Index: trunk/src/draw.c =================================================================== --- trunk/src/draw.c (revision 13257) +++ trunk/src/draw.c (revision 13258) @@ -60,7 +60,7 @@ #define LARGE_TEXT_SIZE 3 #define N_TEXT_SIZES 4 -pcb_output_t Output; /* some widgets ... used for drawing */ +pcb_output_t pcb_draw_out; /* global context used for drawing */ /* --------------------------------------------------------------------------- * some local identifiers @@ -251,10 +251,10 @@ side = PCB_SWAP_IDENT ? PCB_COMPONENT_SIDE : PCB_SOLDER_SIDE; pcb_draw_silk(PCB_LYT_INVISIBLE_SIDE(), drawn_area); - pcb_gui->set_drawing_mode(PCB_HID_COMP_RESET, Output.direct, drawn_area); - pcb_gui->set_drawing_mode(PCB_HID_COMP_POSITIVE, Output.direct, drawn_area); + 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_r_search(PCB->Data->pad_tree, drawn_area, NULL, pcb_pad_draw_callback, &side, NULL); - pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, Output.direct, drawn_area); + pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, pcb_draw_out.direct, drawn_area); pcb_gui->end_layer(); } @@ -287,13 +287,13 @@ goto finish; /* Draw pins, pads, vias below silk */ - pcb_gui->set_drawing_mode(PCB_HID_COMP_RESET, Output.direct, drawn_area); - pcb_gui->set_drawing_mode(PCB_HID_COMP_POSITIVE, Output.direct, drawn_area); + 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); if (pcb_gui->gui) pcb_draw_ppv(PCB_SWAP_IDENT ? solder : component, drawn_area); else if (!pcb_gui->holes_after) DrawEverything_holes(side_copper_grp, drawn_area); - pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, Output.direct, drawn_area); + pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, pcb_draw_out.direct, drawn_area); /* Draw the solder mask if turned on */ gid = pcb_layergrp_get_top_mask(); @@ -320,10 +320,10 @@ if (pcb_gui->holes_after) { - pcb_gui->set_drawing_mode(PCB_HID_COMP_RESET, Output.direct, drawn_area); - pcb_gui->set_drawing_mode(PCB_HID_COMP_POSITIVE, Output.direct, drawn_area); + 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); DrawEverything_holes(side_copper_grp, drawn_area); - pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, Output.direct, drawn_area); + pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, pcb_draw_out.direct, drawn_area); } gid = pcb_layergrp_get_top_paste(); @@ -357,19 +357,19 @@ } if (pcb_layer_gui_set_vlayer(PCB, PCB_VLY_FAB, 0)) { - pcb_stub_draw_fab(Output.fgGC, &hid_exp); + pcb_stub_draw_fab(pcb_draw_out.fgGC, &hid_exp); pcb_gui->end_layer(); } if (pcb_layer_gui_set_vlayer(PCB, PCB_VLY_CSECT, 0)) { - pcb_stub_draw_csect(Output.fgGC, &hid_exp); + pcb_stub_draw_csect(pcb_draw_out.fgGC, &hid_exp); pcb_gui->end_layer(); } if (pcb_gui->gui) { /* Draw element Marks */ - pcb_gui->set_drawing_mode(PCB_HID_COMP_RESET, Output.direct, drawn_area); - pcb_gui->set_drawing_mode(PCB_HID_COMP_POSITIVE, Output.direct, drawn_area); + 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); if (PCB->PinOn) pcb_r_search(PCB->Data->element_tree, drawn_area, NULL, pcb_elem_mark_draw_callback, NULL, NULL); @@ -380,22 +380,22 @@ if (PCB->padstack_mark_on) pcb_draw_pstk_marks(drawn_area); - pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, Output.direct, drawn_area); + pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, pcb_draw_out.direct, drawn_area); /* Draw rat lines on top */ if (pcb_layer_gui_set_vlayer(PCB, PCB_VLY_RATS, 0)) { - pcb_gui->set_drawing_mode(PCB_HID_COMP_RESET, Output.direct, drawn_area); - pcb_gui->set_drawing_mode(PCB_HID_COMP_POSITIVE, Output.direct, drawn_area); + 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_draw_rats(drawn_area); - pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, Output.direct, drawn_area); + pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, pcb_draw_out.direct, drawn_area); pcb_gui->end_layer(); } /* Draw pins' and pads' names */ - pcb_gui->set_drawing_mode(PCB_HID_COMP_RESET, Output.direct, drawn_area); - pcb_gui->set_drawing_mode(PCB_HID_COMP_POSITIVE, Output.direct, drawn_area); + 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_draw_ppv_names(PCB_SWAP_IDENT ? solder : component, drawn_area); - pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, Output.direct, drawn_area); + pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, pcb_draw_out.direct, drawn_area); } /* find the first ui layer in use */ @@ -413,8 +413,8 @@ for(i = 0; i < vtlayer_len(&pcb_uilayer); i++) if ((pcb_uilayer.array[i].meta.real.cookie != NULL) && (pcb_uilayer.array[i].meta.real.vis)) { if (!have_canvas) { - pcb_gui->set_drawing_mode(PCB_HID_COMP_RESET, Output.direct, drawn_area); - pcb_gui->set_drawing_mode(PCB_HID_COMP_POSITIVE, Output.direct, drawn_area); + 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); have_canvas = 1; } pcb_draw_layer(pcb_uilayer.array+i, drawn_area); @@ -421,7 +421,7 @@ } pcb_gui->end_layer(); if (have_canvas) - pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, Output.direct, drawn_area); + pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, pcb_draw_out.direct, drawn_area); } @@ -554,9 +554,9 @@ lflg = pcb_layer_flags_(Layer); if (PCB_LAYERFLG_ON_VISIBLE_SIDE(lflg)) - Output.active_padGC = Output.padGC; + pcb_draw_out.active_padGC = pcb_draw_out.padGC; else - Output.active_padGC = Output.backpadGC; + pcb_draw_out.active_padGC = pcb_draw_out.backpadGC; if (lflg & PCB_LYT_COPPER) { /* print the non-clearing polys */ @@ -596,13 +596,13 @@ auto-outline magically disappear when you first add something to the outline layer. */ if ((lflg & PCB_LYT_OUTLINE) && pcb_layer_is_empty_(PCB, Layer)) { - pcb_gui->set_color(Output.fgGC, Layer->meta.real.color); - pcb_gui->set_line_width(Output.fgGC, PCB->minWid); - pcb_gui->draw_rect(Output.fgGC, 0, 0, PCB->MaxWidth, PCB->MaxHeight); + pcb_gui->set_color(pcb_draw_out.fgGC, Layer->meta.real.color); + pcb_gui->set_line_width(pcb_draw_out.fgGC, PCB->minWid); + pcb_gui->draw_rect(pcb_draw_out.fgGC, 0, 0, PCB->MaxWidth, PCB->MaxHeight); } out:; - Output.active_padGC = NULL; + pcb_draw_out.active_padGC = NULL; } /* --------------------------------------------------------------------------- @@ -618,8 +618,8 @@ pcb_layer_id_t *layers = PCB->LayerGroups.grp[group].lid; unsigned int gflg = pcb_layergrp_flags(PCB, group); - pcb_gui->set_drawing_mode(PCB_HID_COMP_RESET, Output.direct, drawn_area); - pcb_gui->set_drawing_mode(PCB_HID_COMP_POSITIVE, Output.direct, drawn_area); + 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); if (gflg & PCB_LYT_OUTLINE) rv = 0; @@ -639,7 +639,7 @@ if (gflg & PCB_LYT_COPPER) pcb_draw_pstks(group, drawn_area, (CURRENT->meta.real.grp == group), 0); - pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, Output.direct, drawn_area); + pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, pcb_draw_out.direct, drawn_area); } void pcb_erase_obj(int type, void *lptr, void *ptr) @@ -762,19 +762,19 @@ vtp0_truncate(&delayed_labels, 0); pcb_gui = hid; - Output.fgGC = pcb_gui->make_gc(); - Output.padGC = pcb_gui->make_gc(); - Output.backpadGC = pcb_gui->make_gc(); - Output.padselGC = pcb_gui->make_gc(); - Output.drillGC = pcb_gui->make_gc(); - Output.pmGC = pcb_gui->make_gc(); - Output.direct = 1; + pcb_draw_out.fgGC = pcb_gui->make_gc(); + pcb_draw_out.padGC = pcb_gui->make_gc(); + pcb_draw_out.backpadGC = pcb_gui->make_gc(); + pcb_draw_out.padselGC = pcb_gui->make_gc(); + pcb_draw_out.drillGC = pcb_gui->make_gc(); + pcb_draw_out.pmGC = pcb_gui->make_gc(); + pcb_draw_out.direct = 1; - hid->set_color(Output.pmGC, "erase"); - hid->set_color(Output.drillGC, "drill"); - hid->set_color(Output.padGC, conf_core.appearance.color.pin); - hid->set_color(Output.backpadGC, conf_core.appearance.color.invisible_objects); - hid->set_color(Output.padselGC, conf_core.appearance.color.pin_selected); + hid->set_color(pcb_draw_out.pmGC, "erase"); + hid->set_color(pcb_draw_out.drillGC, "drill"); + hid->set_color(pcb_draw_out.padGC, conf_core.appearance.color.pin); + hid->set_color(pcb_draw_out.backpadGC, conf_core.appearance.color.invisible_objects); + hid->set_color(pcb_draw_out.padselGC, conf_core.appearance.color.pin_selected); return old_gui; } @@ -781,12 +781,12 @@ static void expose_end(pcb_hid_t *old_gui) { - pcb_gui->destroy_gc(Output.fgGC); - pcb_gui->destroy_gc(Output.padGC); - pcb_gui->destroy_gc(Output.backpadGC); - pcb_gui->destroy_gc(Output.padselGC); - pcb_gui->destroy_gc(Output.drillGC); - pcb_gui->destroy_gc(Output.pmGC); + pcb_gui->destroy_gc(pcb_draw_out.fgGC); + pcb_gui->destroy_gc(pcb_draw_out.padGC); + pcb_gui->destroy_gc(pcb_draw_out.backpadGC); + pcb_gui->destroy_gc(pcb_draw_out.padselGC); + pcb_gui->destroy_gc(pcb_draw_out.drillGC); + pcb_gui->destroy_gc(pcb_draw_out.pmGC); pcb_gui = old_gui; delayed_labels_enabled = pcb_false; @@ -853,7 +853,7 @@ if ((pcb_layer_gui_set_vlayer(PCB, PCB_VLY_CSECT, 0)) || (e->force)) { pcb_gui->set_drawing_mode(PCB_HID_COMP_RESET, 1, &e->view); pcb_gui->set_drawing_mode(PCB_HID_COMP_POSITIVE, 1, &e->view); - pcb_stub_draw_csect(Output.fgGC, e); + pcb_stub_draw_csect(pcb_draw_out.fgGC, e); pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, 1, &e->view); pcb_gui->end_layer(); } @@ -862,7 +862,7 @@ if ((pcb_layer_gui_set_vlayer(PCB, PCB_VLY_DIALOG, 0)) || (e->force)) { pcb_gui->set_drawing_mode(PCB_HID_COMP_RESET, 1, &e->view); pcb_gui->set_drawing_mode(PCB_HID_COMP_POSITIVE, 1, &e->view); - e->dialog_draw(Output.fgGC, e); + e->dialog_draw(pcb_draw_out.fgGC, e); pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, 1, &e->view); pcb_gui->end_layer(); } @@ -946,7 +946,7 @@ char buff[128]; label = lab_with_intconn(intconn, lab, buff, sizeof(buff)); - pcb_gui->set_color(Output.fgGC, conf_core.appearance.color.pin_name); + pcb_gui->set_color(pcb_draw_out.fgGC, conf_core.appearance.color.pin_name); pcb_term_label_setup_(&text, x, y, scale, vert, centered, label); Index: trunk/src/draw.h =================================================================== --- trunk/src/draw.h (revision 13257) +++ trunk/src/draw.h (revision 13258) @@ -43,7 +43,7 @@ unsigned direct:1; /* starts as 1 and becomes 0 before the first compositing layer group is reset */ } pcb_output_t; -extern pcb_output_t Output; +extern pcb_output_t pcb_draw_out; /* Temporarily inhibid drawing if this is non-zero. A function that calls a lot of other functions that would call pcb_draw() a lot in turn may increase @@ -92,8 +92,8 @@ #ifdef PCB_BBOX_DEBUG #define PCB_DRAW_BBOX(obj) \ do { \ - pcb_gui->set_line_width(Output.fgGC, 0); \ - pcb_gui->draw_rect(Output.fgGC, obj->BoundingBox.X1, obj->BoundingBox.Y1, obj->BoundingBox.X2, obj->BoundingBox.Y2); \ + pcb_gui->set_line_width(pcb_draw_out.fgGC, 0); \ + pcb_gui->draw_rect(pcb_draw_out.fgGC, obj->BoundingBox.X1, obj->BoundingBox.Y1, obj->BoundingBox.X2, obj->BoundingBox.Y2); \ } while(0) #else #define PCB_DRAW_BBOX(obj) Index: trunk/src/draw_composite.c =================================================================== --- trunk/src/draw_composite.c (revision 13257) +++ trunk/src/draw_composite.c (revision 13258) @@ -40,28 +40,28 @@ static void comp_fill_board(comp_ctx_t *ctx) { - pcb_gui->set_color(Output.fgGC, ctx->color); + pcb_gui->set_color(pcb_draw_out.fgGC, ctx->color); if (ctx->screen == NULL) - pcb_gui->fill_rect(Output.fgGC, 0, 0, ctx->pcb->MaxWidth, ctx->pcb->MaxHeight); + pcb_gui->fill_rect(pcb_draw_out.fgGC, 0, 0, ctx->pcb->MaxWidth, ctx->pcb->MaxHeight); else - pcb_gui->fill_rect(Output.fgGC, ctx->screen->X1, ctx->screen->Y1, ctx->screen->X2, ctx->screen->Y2); + pcb_gui->fill_rect(pcb_draw_out.fgGC, ctx->screen->X1, ctx->screen->Y1, ctx->screen->X2, ctx->screen->Y2); } static void comp_start_sub_(comp_ctx_t *ctx) { - pcb_gui->set_drawing_mode(PCB_HID_COMP_NEGATIVE, Output.direct, ctx->screen); + pcb_gui->set_drawing_mode(PCB_HID_COMP_NEGATIVE, pcb_draw_out.direct, ctx->screen); } static void comp_start_add_(comp_ctx_t *ctx) { - pcb_gui->set_drawing_mode(PCB_HID_COMP_POSITIVE, Output.direct, ctx->screen); + pcb_gui->set_drawing_mode(PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, ctx->screen); } static void comp_start_sub(comp_ctx_t *ctx) { if (ctx->thin) { - pcb_gui->set_drawing_mode(PCB_HID_COMP_POSITIVE, Output.direct, ctx->screen); - pcb_gui->set_color(Output.pmGC, ctx->color); + pcb_gui->set_drawing_mode(PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, ctx->screen); + pcb_gui->set_color(pcb_draw_out.pmGC, ctx->color); return; } @@ -74,7 +74,7 @@ static void comp_start_add(comp_ctx_t *ctx) { if (ctx->thin) { - pcb_gui->set_drawing_mode(PCB_HID_COMP_POSITIVE, Output.direct, ctx->screen); + pcb_gui->set_drawing_mode(PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, ctx->screen); return; } @@ -87,16 +87,16 @@ static void comp_finish(comp_ctx_t *ctx) { if (ctx->thin) { - pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, Output.direct, ctx->screen); + pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, pcb_draw_out.direct, ctx->screen); return; } - pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, Output.direct, ctx->screen); + pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, pcb_draw_out.direct, ctx->screen); } static void comp_init(comp_ctx_t *ctx, int negative) { - pcb_gui->set_drawing_mode(PCB_HID_COMP_RESET, Output.direct, ctx->screen); + pcb_gui->set_drawing_mode(PCB_HID_COMP_RESET, pcb_draw_out.direct, ctx->screen); if (ctx->thin) return; @@ -106,7 +106,7 @@ if ((!ctx->thin) && (negative)) { /* drawing the big poly for the negative */ - pcb_gui->set_drawing_mode(PCB_HID_COMP_POSITIVE, Output.direct, ctx->screen); + pcb_gui->set_drawing_mode(PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, ctx->screen); comp_fill_board(ctx); } } @@ -134,8 +134,8 @@ { const char *old_color = l->meta.real.color; - pcb_hid_gc_t old_fg = Output.fgGC; - Output.fgGC = Output.pmGC; + pcb_hid_gc_t old_fg = pcb_draw_out.fgGC; + pcb_draw_out.fgGC = pcb_draw_out.pmGC; l->meta.real.color = ctx->color; if (!want_add) l->meta.real.color = "erase"; @@ -143,7 +143,7 @@ draw_auto(ctx, auto_data); pcb_draw_layer(l, ctx->screen); l->meta.real.color = old_color; - Output.fgGC = old_fg; + pcb_draw_out.fgGC = old_fg; } } if (!adding) @@ -175,7 +175,7 @@ int is_comp = pcb_draw_layergrp_is_comp(ctx->grp); if (is_comp) - Output.direct = 0; + pcb_draw_out.direct = 0; comp_draw_layer_real(ctx, draw_auto, auto_data); } Index: trunk/src/draw_ly_spec.c =================================================================== --- trunk/src/draw_ly_spec.c (revision 13257) +++ trunk/src/draw_ly_spec.c (revision 13258) @@ -53,10 +53,10 @@ cctx.invert = 0; if ((cctx.grp == NULL) || (cctx.grp->len == 0)) { /* fallback: no layers -> original code: draw a single auto-add */ - pcb_gui->set_drawing_mode(PCB_HID_COMP_RESET, Output.direct, cctx.screen); - pcb_gui->set_drawing_mode(PCB_HID_COMP_POSITIVE, Output.direct, cctx.screen); + pcb_gui->set_drawing_mode(PCB_HID_COMP_RESET, pcb_draw_out.direct, cctx.screen); + pcb_gui->set_drawing_mode(PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, cctx.screen); pcb_pad_paste_draw(side, drawn_area); - pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, Output.direct, cctx.screen); + pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, pcb_draw_out.direct, cctx.screen); } else { comp_draw_layer(&cctx, pcb_draw_paste_auto_, &side); @@ -90,7 +90,7 @@ cctx.invert = pcb_gui->mask_invert; if (!cctx.invert) - Output.direct = 0; + pcb_draw_out.direct = 0; if ((cctx.grp == NULL) || (cctx.grp->len == 0)) { /* fallback: no layers -> original code: draw a single auto-sub */ comp_init(&cctx, 1); @@ -150,11 +150,11 @@ if (pcb_is_silk_old_style(&cctx, lid)) { /* fallback: implicit layer -> original code: draw auto+manual */ - pcb_gui->set_drawing_mode(PCB_HID_COMP_RESET, Output.direct, cctx.screen); - pcb_gui->set_drawing_mode(PCB_HID_COMP_POSITIVE, Output.direct, cctx.screen); + pcb_gui->set_drawing_mode(PCB_HID_COMP_RESET, pcb_draw_out.direct, cctx.screen); + pcb_gui->set_drawing_mode(PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, cctx.screen); pcb_draw_layer(LAYER_PTR(lid), cctx.screen); pcb_draw_silk_auto(&cctx, &lyt_side); - pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, Output.direct, cctx.screen); + pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, pcb_draw_out.direct, cctx.screen); } else { comp_draw_layer(&cctx, pcb_draw_silk_auto, &lyt_side); @@ -167,10 +167,10 @@ static void pcb_draw_rats(const pcb_box_t *drawn_area) { - pcb_gui->set_drawing_mode(PCB_HID_COMP_RESET, Output.direct, drawn_area); - pcb_gui->set_drawing_mode(PCB_HID_COMP_POSITIVE, Output.direct, drawn_area); + 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_r_search(PCB->Data->rat_tree, drawn_area, NULL, pcb_rat_draw_callback, NULL, NULL); - pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, Output.direct, drawn_area); + pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, pcb_draw_out.direct, drawn_area); } static void pcb_draw_assembly(unsigned int lyt_side, const pcb_box_t *drawn_area) @@ -181,9 +181,9 @@ return; pcb_draw_doing_assy = pcb_true; - pcb_gui->set_draw_faded(Output.fgGC, 1); + pcb_gui->set_draw_faded(pcb_draw_out.fgGC, 1); DrawLayerGroup(side_group, drawn_area, 0); - pcb_gui->set_draw_faded(Output.fgGC, 0); + pcb_gui->set_draw_faded(pcb_draw_out.fgGC, 0); /* draw package */ pcb_draw_silk(lyt_side, drawn_area); Index: trunk/src/obj_arc.c =================================================================== --- trunk/src/obj_arc.c (revision 13257) +++ trunk/src/obj_arc.c (revision 13258) @@ -845,25 +845,25 @@ if (!conf_core.editor.thin_draw && !conf_core.editor.wireframe_draw) { if ((allow_term_gfx) && pcb_draw_term_need_gfx(arc)) { - pcb_gui->set_line_width(Output.active_padGC, arc->Thickness); - pcb_gui->draw_arc(Output.active_padGC, arc->X, arc->Y, arc->Width, arc->Height, arc->StartAngle, arc->Delta); - pcb_gui->set_line_width(Output.fgGC, PCB_DRAW_TERM_GFX_WIDTH); + pcb_gui->set_line_width(pcb_draw_out.active_padGC, arc->Thickness); + pcb_gui->draw_arc(pcb_draw_out.active_padGC, arc->X, arc->Y, arc->Width, arc->Height, arc->StartAngle, arc->Delta); + pcb_gui->set_line_width(pcb_draw_out.fgGC, PCB_DRAW_TERM_GFX_WIDTH); } else - pcb_gui->set_line_width(Output.fgGC, arc->Thickness); - pcb_gui->set_line_cap(Output.fgGC, Trace_Cap); - pcb_gui->draw_arc(Output.fgGC, arc->X, arc->Y, arc->Width, arc->Height, arc->StartAngle, arc->Delta); + pcb_gui->set_line_width(pcb_draw_out.fgGC, arc->Thickness); + pcb_gui->set_line_cap(pcb_draw_out.fgGC, Trace_Cap); + 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(Output.fgGC, 0); - pcb_gui->set_line_cap(Output.fgGC, Trace_Cap); + pcb_gui->set_line_width(pcb_draw_out.fgGC, 0); + pcb_gui->set_line_cap(pcb_draw_out.fgGC, Trace_Cap); if(conf_core.editor.thin_draw) - pcb_gui->draw_arc(Output.fgGC, arc->X, arc->Y, arc->Width, arc->Height, arc->StartAngle, arc->Delta); + pcb_gui->draw_arc(pcb_draw_out.fgGC, arc->X, arc->Y, arc->Width, arc->Height, arc->StartAngle, arc->Delta); if(conf_core.editor.wireframe_draw) - pcb_draw_wireframe_arc(Output.fgGC,arc); + pcb_draw_wireframe_arc(pcb_draw_out.fgGC,arc); } if (arc->term != NULL) { if ((pcb_draw_doing_pinout) || PCB_FLAG_TEST(PCB_FLAG_TERMNAME, arc)) @@ -897,7 +897,7 @@ pcb_lighten_color(color, buf, 1.75); color = buf; } - pcb_gui->set_color(Output.fgGC, color); + pcb_gui->set_color(pcb_draw_out.fgGC, color); pcb_arc_draw_(arc, allow_term_gfx); } Index: trunk/src/obj_elem.c =================================================================== --- trunk/src/obj_elem.c (revision 13257) +++ trunk/src/obj_elem.c (revision 13258) @@ -1844,18 +1844,18 @@ if ((conf_core.editor.hide_names && pcb_gui->gui) || PCB_FLAG_TEST(PCB_FLAG_HIDENAME, element)) return; if (pcb_draw_doing_pinout || pcb_draw_doing_assy) - pcb_gui->set_color(Output.fgGC, conf_core.appearance.color.element); + pcb_gui->set_color(pcb_draw_out.fgGC, conf_core.appearance.color.element); else if (PCB_FLAG_TEST(PCB_FLAG_SELECTED, &PCB_ELEM_TEXT_VISIBLE(PCB, element))) - pcb_gui->set_color(Output.fgGC, conf_core.appearance.color.element_selected); + pcb_gui->set_color(pcb_draw_out.fgGC, conf_core.appearance.color.element_selected); else if (PCB_FRONT(element)) { #warning TODO: why do we test for Names flag here instead of elements flag? if (PCB_FLAG_TEST(PCB_FLAG_NONETLIST, element)) - pcb_gui->set_color(Output.fgGC, conf_core.appearance.color.element_nonetlist); + pcb_gui->set_color(pcb_draw_out.fgGC, conf_core.appearance.color.element_nonetlist); else - pcb_gui->set_color(Output.fgGC, conf_core.appearance.color.element); + pcb_gui->set_color(pcb_draw_out.fgGC, conf_core.appearance.color.element); } else - pcb_gui->set_color(Output.fgGC, conf_core.appearance.color.invisible_objects); + pcb_gui->set_color(pcb_draw_out.fgGC, conf_core.appearance.color.invisible_objects); pcb_text_draw_(&PCB_ELEM_TEXT_VISIBLE(PCB, element), PCB->minSlk, 0); @@ -1895,13 +1895,13 @@ { /* set color and draw lines, arcs, text and pins */ if (pcb_draw_doing_pinout || pcb_draw_doing_assy) - pcb_gui->set_color(Output.fgGC, conf_core.appearance.color.element); + pcb_gui->set_color(pcb_draw_out.fgGC, conf_core.appearance.color.element); else if (PCB_FLAG_TEST(PCB_FLAG_SELECTED, element)) - pcb_gui->set_color(Output.fgGC, conf_core.appearance.color.element_selected); + pcb_gui->set_color(pcb_draw_out.fgGC, conf_core.appearance.color.element_selected); else if (PCB_FRONT(element)) - pcb_gui->set_color(Output.fgGC, conf_core.appearance.color.element); + pcb_gui->set_color(pcb_draw_out.fgGC, conf_core.appearance.color.element); else - pcb_gui->set_color(Output.fgGC, conf_core.appearance.color.invisible_objects); + pcb_gui->set_color(pcb_draw_out.fgGC, conf_core.appearance.color.invisible_objects); /* draw lines, arcs, text and pins */ PCB_ELEMENT_PCB_LINE_LOOP(element); @@ -1952,13 +1952,13 @@ mark_size = MIN(mark_size, pad0->Thickness / 2); } - pcb_gui->set_color(Output.fgGC, invisible ? conf_core.appearance.color.invisible_mark : conf_core.appearance.color.element); - pcb_gui->set_line_cap(Output.fgGC, Trace_Cap); - pcb_gui->set_line_width(Output.fgGC, 0); - pcb_gui->draw_line(Output.fgGC, X - mark_size, Y, X, Y - mark_size); - pcb_gui->draw_line(Output.fgGC, X + mark_size, Y, X, Y - mark_size); - pcb_gui->draw_line(Output.fgGC, X - mark_size, Y, X, Y + mark_size); - pcb_gui->draw_line(Output.fgGC, X + mark_size, Y, X, Y + mark_size); + pcb_gui->set_color(pcb_draw_out.fgGC, invisible ? conf_core.appearance.color.invisible_mark : conf_core.appearance.color.element); + pcb_gui->set_line_cap(pcb_draw_out.fgGC, Trace_Cap); + pcb_gui->set_line_width(pcb_draw_out.fgGC, 0); + pcb_gui->draw_line(pcb_draw_out.fgGC, X - mark_size, Y, X, Y - mark_size); + pcb_gui->draw_line(pcb_draw_out.fgGC, X + mark_size, Y, X, Y - mark_size); + pcb_gui->draw_line(pcb_draw_out.fgGC, X - mark_size, Y, X, Y + mark_size); + pcb_gui->draw_line(pcb_draw_out.fgGC, X + mark_size, Y, X, Y + mark_size); /* * If an element is locked, place a "L" on top of the "diamond". @@ -1966,8 +1966,8 @@ * works even for color blind users. */ if (PCB_FLAG_TEST(PCB_FLAG_LOCK, e)) { - pcb_gui->draw_line(Output.fgGC, X, Y, X + 2 * mark_size, Y); - pcb_gui->draw_line(Output.fgGC, X, Y, X, Y - 4 * mark_size); + pcb_gui->draw_line(pcb_draw_out.fgGC, X, Y, X + 2 * mark_size, Y); + pcb_gui->draw_line(pcb_draw_out.fgGC, X, Y, X, Y - 4 * mark_size); } } Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 13257) +++ trunk/src/obj_line.c (revision 13258) @@ -991,27 +991,27 @@ void pcb_line_draw_(pcb_line_t *line, int allow_term_gfx) { PCB_DRAW_BBOX(line); - pcb_gui->set_line_cap(Output.fgGC, Trace_Cap); + pcb_gui->set_line_cap(pcb_draw_out.fgGC, Trace_Cap); 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(Output.active_padGC, line->Thickness); - pcb_gui->draw_line(Output.active_padGC, line->Point1.X, line->Point1.Y, line->Point2.X, line->Point2.Y); - pcb_gui->set_line_width(Output.fgGC, PCB_DRAW_TERM_GFX_WIDTH); + pcb_gui->set_line_width(pcb_draw_out.active_padGC, line->Thickness); + pcb_gui->draw_line(pcb_draw_out.active_padGC, line->Point1.X, line->Point1.Y, line->Point2.X, line->Point2.Y); + pcb_gui->set_line_width(pcb_draw_out.fgGC, PCB_DRAW_TERM_GFX_WIDTH); } else - pcb_gui->set_line_width(Output.fgGC, line->Thickness); - pcb_gui->draw_line(Output.fgGC, line->Point1.X, line->Point1.Y, line->Point2.X, line->Point2.Y); + pcb_gui->set_line_width(pcb_draw_out.fgGC, line->Thickness); + pcb_gui->draw_line(pcb_draw_out.fgGC, line->Point1.X, line->Point1.Y, line->Point2.X, line->Point2.Y); } else { if(conf_core.editor.thin_draw) { - pcb_gui->set_line_width(Output.fgGC, 0); - pcb_gui->draw_line(Output.fgGC, line->Point1.X, line->Point1.Y, line->Point2.X, line->Point2.Y); + pcb_gui->set_line_width(pcb_draw_out.fgGC, 0); + pcb_gui->draw_line(pcb_draw_out.fgGC, line->Point1.X, line->Point1.Y, line->Point2.X, line->Point2.Y); } if(conf_core.editor.wireframe_draw) { - pcb_gui->set_line_width(Output.fgGC, 0); - pcb_draw_wireframe_line(Output.fgGC, line->Point1.X, line->Point1.Y, line->Point2.X, line->Point2.Y, line->Thickness, 0); + pcb_gui->set_line_width(pcb_draw_out.fgGC, 0); + pcb_draw_wireframe_line(pcb_draw_out.fgGC, line->Point1.X, line->Point1.Y, line->Point2.X, line->Point2.Y, line->Thickness, 0); } } @@ -1048,7 +1048,7 @@ color = buf; } - pcb_gui->set_color(Output.fgGC, color); + pcb_gui->set_color(pcb_draw_out.fgGC, color); pcb_line_draw_(line, allow_term_gfx); } Index: trunk/src/obj_pad.c =================================================================== --- trunk/src/obj_pad.c (revision 13257) +++ trunk/src/obj_pad.c (revision 13258) @@ -456,7 +456,7 @@ box.Y1 = pad->Point1.Y + (flip_y ? -y_off : y_off); } - pcb_gui->set_color(Output.fgGC, conf_core.appearance.color.pin_name); + pcb_gui->set_color(pcb_draw_out.fgGC, conf_core.appearance.color.pin_name); text.Flags = (flip_x ^ flip_y) ? pcb_flag_make (PCB_FLAG_ONSOLDER) : pcb_no_flags(); /* Set font height to approx 90% of pin thickness */ @@ -488,7 +488,7 @@ char buf[sizeof("#XXXXXX")]; if (pcb_draw_doing_pinout) - pcb_gui->set_color(Output.fgGC, conf_core.appearance.color.pin); + pcb_gui->set_color(pcb_draw_out.fgGC, conf_core.appearance.color.pin); else if (PCB_FLAG_TEST(PCB_FLAG_WARN | PCB_FLAG_SELECTED | PCB_FLAG_FOUND, pad)) { if (PCB_FLAG_TEST(PCB_FLAG_WARN, pad)) color = conf_core.appearance.color.warn; @@ -512,9 +512,9 @@ } if (color != NULL) - pcb_gui->set_color(Output.fgGC, color); + pcb_gui->set_color(pcb_draw_out.fgGC, color); - _draw_pad(Output.fgGC, pad, pcb_false, pcb_false); + _draw_pad(pcb_draw_out.fgGC, pad, pcb_false, pcb_false); if (pcb_draw_doing_pinout) draw_pad_name(pad); @@ -547,7 +547,7 @@ pcb_pad_t *pad = (pcb_pad_t *) b; int *side = cl; if (PCB_ON_SIDE(pad, *side) && pad->Mask) - _draw_pad(Output.pmGC, pad, pcb_true, pcb_true); + _draw_pad(pcb_draw_out.pmGC, pad, pcb_true, pcb_true); return PCB_R_DIR_FOUND_CONTINUE; } @@ -554,7 +554,7 @@ /* draws solder paste layer for a given side of the board - only pads get paste */ void pcb_pad_paste_draw(int side, const pcb_box_t * drawn_area) { - pcb_gui->set_color(Output.fgGC, conf_core.appearance.color.paste); + pcb_gui->set_color(pcb_draw_out.fgGC, conf_core.appearance.color.paste); PCB_PAD_ALL_LOOP(PCB->Data); { if (PCB_ON_SIDE(pad, side) && !PCB_FLAG_TEST(PCB_FLAG_NOPASTE, pad) && pad->Mask > 0) { @@ -562,9 +562,9 @@ if (conf_core.design.paste_adjust) pad->Thickness = max(0, pad->Thickness + conf_core.design.paste_adjust); if (pad->Mask < pad->Thickness) - _draw_pad(Output.fgGC, pad, pcb_true, pcb_true); + _draw_pad(pcb_draw_out.fgGC, pad, pcb_true, pcb_true); else - _draw_pad(Output.fgGC, pad, pcb_false, pcb_false); + _draw_pad(pcb_draw_out.fgGC, pad, pcb_false, pcb_false); pad->Thickness = save_thickness; } } Index: trunk/src/obj_pinvia.c =================================================================== --- trunk/src/obj_pinvia.c (revision 13257) +++ trunk/src/obj_pinvia.c (revision 13258) @@ -1019,7 +1019,7 @@ color = conf_core.appearance.color.pin; } - pcb_gui->set_color(Output.fgGC, color); + pcb_gui->set_color(pcb_draw_out.fgGC, color); } static void _draw_pv_name(pcb_pin_t * pv) @@ -1069,9 +1069,9 @@ static void _draw_pv(pcb_pin_t *pv, pcb_bool draw_hole) { if (conf_core.editor.thin_draw || conf_core.editor.wireframe_draw) - pcb_gui->thindraw_pcb_pv(Output.fgGC, Output.fgGC, pv, draw_hole, pcb_false); + pcb_gui->thindraw_pcb_pv(pcb_draw_out.fgGC, pcb_draw_out.fgGC, pv, draw_hole, pcb_false); else - pcb_gui->fill_pcb_pv(Output.fgGC, Output.drillGC, pv, draw_hole, pcb_false); + pcb_gui->fill_pcb_pv(pcb_draw_out.fgGC, pcb_draw_out.drillGC, pv, draw_hole, pcb_false); if (!PCB_FLAG_TEST(PCB_FLAG_HOLE, pv) && pcb_draw_doing_pinout) _draw_pv_name(pv); @@ -1105,9 +1105,9 @@ { pcb_pin_t *pin = (pcb_pin_t *) b; if (conf_core.editor.thin_draw || conf_core.editor.thin_draw_poly || conf_core.editor.wireframe_draw) - pcb_gui->thindraw_pcb_pv(Output.pmGC, Output.pmGC, pin, pcb_false, pcb_true); + pcb_gui->thindraw_pcb_pv(pcb_draw_out.pmGC, pcb_draw_out.pmGC, pin, pcb_false, pcb_true); else - pcb_gui->fill_pcb_pv(Output.pmGC, Output.pmGC, pin, pcb_false, pcb_true); + pcb_gui->fill_pcb_pv(pcb_draw_out.pmGC, pcb_draw_out.pmGC, pin, pcb_false, pcb_true); return PCB_R_DIR_FOUND_CONTINUE; } @@ -1142,13 +1142,13 @@ if (conf_core.editor.thin_draw || conf_core.editor.wireframe_draw) { if (!PCB_FLAG_TEST(PCB_FLAG_HOLE, pv)) { - pcb_gui->set_line_cap(Output.fgGC, Round_Cap); - pcb_gui->set_line_width(Output.fgGC, 0); - pcb_gui->draw_arc(Output.fgGC, pv->X, pv->Y, pv->DrillingHole / 2, pv->DrillingHole / 2, 0, 360); + pcb_gui->set_line_cap(pcb_draw_out.fgGC, Round_Cap); + pcb_gui->set_line_width(pcb_draw_out.fgGC, 0); + pcb_gui->draw_arc(pcb_draw_out.fgGC, pv->X, pv->Y, pv->DrillingHole / 2, pv->DrillingHole / 2, 0, 360); } } else - pcb_gui->fill_circle(Output.drillGC, pv->X, pv->Y, pv->DrillingHole / 2); + pcb_gui->fill_circle(pcb_draw_out.drillGC, pv->X, pv->Y, pv->DrillingHole / 2); if (PCB_FLAG_TEST(PCB_FLAG_HOLE, pv)) { if (PCB_FLAG_TEST(PCB_FLAG_WARN, pv)) @@ -1163,11 +1163,11 @@ pcb_lighten_color(color, buf, 1.75); color = buf; } - pcb_gui->set_color(Output.fgGC, color); + pcb_gui->set_color(pcb_draw_out.fgGC, color); - pcb_gui->set_line_cap(Output.fgGC, Round_Cap); - pcb_gui->set_line_width(Output.fgGC, 0); - pcb_gui->draw_arc(Output.fgGC, pv->X, pv->Y, pv->DrillingHole / 2, pv->DrillingHole / 2, 0, 360); + pcb_gui->set_line_cap(pcb_draw_out.fgGC, Round_Cap); + pcb_gui->set_line_width(pcb_draw_out.fgGC, 0); + pcb_gui->draw_arc(pcb_draw_out.fgGC, pv->X, pv->Y, pv->DrillingHole / 2, pv->DrillingHole / 2, 0, 360); } return PCB_R_DIR_FOUND_CONTINUE; } Index: trunk/src/obj_poly.c =================================================================== --- trunk/src/obj_poly.c (revision 13257) +++ trunk/src/obj_poly.c (revision 13258) @@ -981,7 +981,7 @@ { if ((pcb_gui->thindraw_pcb_polygon != NULL) && (conf_core.editor.thin_draw || conf_core.editor.thin_draw_poly || conf_core.editor.wireframe_draw)) { - pcb_gui->thindraw_pcb_polygon(Output.fgGC, polygon, drawn_area); + pcb_gui->thindraw_pcb_polygon(pcb_draw_out.fgGC, polygon, drawn_area); } else { if ((allow_term_gfx) && pcb_draw_term_need_gfx(polygon)) { @@ -988,10 +988,10 @@ pcb_vnode_t *n, *head; int i; - pcb_gui->fill_pcb_polygon(Output.active_padGC, polygon, drawn_area); + pcb_gui->fill_pcb_polygon(pcb_draw_out.active_padGC, polygon, drawn_area); head = &polygon->Clipped->contours->head; - pcb_gui->set_line_cap(Output.fgGC, Square_Cap); + pcb_gui->set_line_cap(pcb_draw_out.fgGC, Square_Cap); 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; @@ -999,12 +999,12 @@ #warning subc TODO: check if x;y is within the poly, but use a cheaper method than the official r = PCB_DRAW_TERM_GFX_WIDTH; - pcb_gui->set_line_width(Output.fgGC, r); - pcb_gui->draw_line(Output.fgGC, x, y, x, y); + pcb_gui->set_line_width(pcb_draw_out.fgGC, r); + pcb_gui->draw_line(pcb_draw_out.fgGC, x, y, x, y); } } else - pcb_gui->fill_pcb_polygon(Output.fgGC, polygon, drawn_area); + pcb_gui->fill_pcb_polygon(pcb_draw_out.fgGC, polygon, drawn_area); } /* If checking planes, thin-draw any pieces which have been clipped away */ @@ -1012,7 +1012,7 @@ pcb_poly_t poly = *polygon; for (poly.Clipped = polygon->Clipped->f; poly.Clipped != polygon->Clipped; poly.Clipped = poly.Clipped->f) - pcb_gui->thindraw_pcb_polygon(Output.fgGC, &poly, drawn_area); + pcb_gui->thindraw_pcb_polygon(pcb_draw_out.fgGC, &poly, drawn_area); } if (polygon->term != NULL) { @@ -1044,7 +1044,7 @@ PCB_OBJ_COLOR_ON_BOUND_LAYER(color, layer); else color = layer->meta.real.color; - pcb_gui->set_color(Output.fgGC, color); + pcb_gui->set_color(pcb_draw_out.fgGC, color); pcb_poly_draw_(polygon, drawn_area, allow_term_gfx); } Index: trunk/src/obj_pstk.c =================================================================== --- trunk/src/obj_pstk.c (revision 13257) +++ trunk/src/obj_pstk.c (revision 13258) @@ -288,12 +288,12 @@ } - pcb_gui->set_color(Output.fgGC, color); + pcb_gui->set_color(pcb_draw_out.fgGC, color); } static void set_ps_annot_color(pcb_hid_gc_t gc, pcb_pstk_t *ps) { - pcb_gui->set_color(Output.fgGC, PCB_FLAG_TEST(PCB_FLAG_SELECTED, ps) ? + pcb_gui->set_color(pcb_draw_out.fgGC, PCB_FLAG_TEST(PCB_FLAG_SELECTED, ps) ? conf_core.appearance.color.subc_selected : conf_core.appearance.color.padstackmark); } @@ -301,15 +301,15 @@ { switch(shape->shape) { case PCB_PSSH_POLY: - pcb_gui->fill_polygon_offs(Output.fgGC, shape->data.poly.len, shape->data.poly.x, shape->data.poly.y, ps->x, ps->y); + 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(Output.fgGC, shape->data.line.square ? Square_Cap : Round_Cap); - pcb_gui->set_line_width(Output.fgGC, shape->data.line.thickness); - pcb_gui->draw_line(Output.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); + pcb_gui->set_line_cap(pcb_draw_out.fgGC, shape->data.line.square ? Square_Cap : Round_Cap); + 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; case PCB_PSSH_CIRC: - pcb_gui->fill_circle(Output.fgGC, ps->x + shape->data.circ.x, ps->y + shape->data.circ.y, shape->data.circ.dia/2); + pcb_gui->fill_circle(pcb_draw_out.fgGC, ps->x + shape->data.circ.x, ps->y + shape->data.circ.y, shape->data.circ.dia/2); break; } } @@ -344,14 +344,14 @@ shape = pcb_pstk_shape_gid(ctx->pcb, ps, ctx->gid, ctx->comb, &grp); if (shape != NULL) { - pcb_gui->set_draw_xor(Output.fgGC, 0); + pcb_gui->set_draw_xor(pcb_draw_out.fgGC, 0); set_ps_color(ps, ctx->is_current, grp->type); if (conf_core.editor.thin_draw || conf_core.editor.wireframe_draw) { - pcb_gui->set_line_width(Output.fgGC, 0); - pcb_pstk_draw_shape_thin(Output.fgGC, ps, shape); + pcb_gui->set_line_width(pcb_draw_out.fgGC, 0); + pcb_pstk_draw_shape_thin(pcb_draw_out.fgGC, ps, shape); } else - pcb_pstk_draw_shape_solid(Output.fgGC, ps, shape); + pcb_pstk_draw_shape_solid(pcb_draw_out.fgGC, ps, shape); } return PCB_R_DIR_FOUND_CONTINUE; @@ -371,12 +371,12 @@ mark += proto->hdia/2; /* draw the cross using xor */ - set_ps_annot_color(Output.fgGC, ps); - pcb_gui->set_line_width(Output.fgGC, -3); - pcb_gui->set_draw_xor(Output.fgGC, 1); - pcb_gui->draw_line(Output.fgGC, ps->x-mark, ps->y, ps->x+mark, ps->y); - pcb_gui->draw_line(Output.fgGC, ps->x, ps->y-mark, ps->x, ps->y+mark); - pcb_gui->set_draw_xor(Output.fgGC, 0); + set_ps_annot_color(pcb_draw_out.fgGC, ps); + pcb_gui->set_line_width(pcb_draw_out.fgGC, -3); + pcb_gui->set_draw_xor(pcb_draw_out.fgGC, 1); + pcb_gui->draw_line(pcb_draw_out.fgGC, ps->x-mark, ps->y, ps->x+mark, ps->y); + pcb_gui->draw_line(pcb_draw_out.fgGC, ps->x, ps->y-mark, ps->x, ps->y+mark); + pcb_gui->set_draw_xor(pcb_draw_out.fgGC, 0); /* draw the label if enabled, after everything else is drawn */ if (ps->term != NULL) { @@ -418,7 +418,7 @@ return PCB_R_DIR_NOT_FOUND; /* actual hole */ - pcb_gui->fill_circle(Output.drillGC, ps->x, ps->y, proto->hdia / 2); + pcb_gui->fill_circle(pcb_draw_out.drillGC, ps->x, ps->y, proto->hdia / 2); /* indicate unplated holes with an arc; unplated holes are more rare than plated holes, thus unplated holes are indicated */ @@ -425,11 +425,11 @@ if (!proto->hplated) { pcb_coord_t r = proto->hdia / 2; r += r/8; /* +12.5% */ - pcb_gui->set_color(Output.fgGC, PCB_FLAG_TEST(PCB_FLAG_SELECTED, ps) ? conf_core.appearance.color.subc_selected : conf_core.appearance.color.subc); - pcb_gui->set_line_width(Output.fgGC, 0); - pcb_gui->set_draw_xor(Output.fgGC, 1); - pcb_gui->draw_arc(Output.fgGC, ps->x, ps->y, r, r, 20, 290); - pcb_gui->set_draw_xor(Output.fgGC, 0); + pcb_gui->set_color(pcb_draw_out.fgGC, PCB_FLAG_TEST(PCB_FLAG_SELECTED, ps) ? conf_core.appearance.color.subc_selected : conf_core.appearance.color.subc); + pcb_gui->set_line_width(pcb_draw_out.fgGC, 0); + pcb_gui->set_draw_xor(pcb_draw_out.fgGC, 1); + pcb_gui->draw_arc(pcb_draw_out.fgGC, ps->x, ps->y, r, r, 20, 290); + pcb_gui->set_draw_xor(pcb_draw_out.fgGC, 0); } return PCB_R_DIR_FOUND_CONTINUE; Index: trunk/src/obj_rat.c =================================================================== --- trunk/src/obj_rat.c (revision 13257) +++ trunk/src/obj_rat.c (revision 13258) @@ -225,15 +225,15 @@ if (PCB_FLAG_TEST(PCB_FLAG_SELECTED | PCB_FLAG_FOUND, rat)) { if (PCB_FLAG_TEST(PCB_FLAG_SELECTED, rat)) - pcb_gui->set_color(Output.fgGC, conf_core.appearance.color.rat_selected); + pcb_gui->set_color(pcb_draw_out.fgGC, conf_core.appearance.color.rat_selected); else - pcb_gui->set_color(Output.fgGC, conf_core.appearance.color.connected); + pcb_gui->set_color(pcb_draw_out.fgGC, conf_core.appearance.color.connected); } else if (PCB_HAS_COLOROVERRIDE(rat)) { - pcb_gui->set_color(Output.fgGC, rat->override_color); + pcb_gui->set_color(pcb_draw_out.fgGC, rat->override_color); } else - pcb_gui->set_color(Output.fgGC, conf_core.appearance.color.rat); + pcb_gui->set_color(pcb_draw_out.fgGC, conf_core.appearance.color.rat); if (conf_core.appearance.rat_thickness < 20) rat->Thickness = pcb_pixel_slop * conf_core.appearance.rat_thickness; @@ -242,10 +242,10 @@ int w = rat->Thickness; if (conf_core.editor.thin_draw || conf_core.editor.wireframe_draw) - pcb_gui->set_line_width(Output.fgGC, 0); + pcb_gui->set_line_width(pcb_draw_out.fgGC, 0); else - pcb_gui->set_line_width(Output.fgGC, w); - pcb_gui->draw_arc(Output.fgGC, rat->Point1.X, rat->Point1.Y, w * 2, w * 2, 0, 360); + pcb_gui->set_line_width(pcb_draw_out.fgGC, w); + pcb_gui->draw_arc(pcb_draw_out.fgGC, rat->Point1.X, rat->Point1.Y, w * 2, w * 2, 0, 360); } else pcb_line_draw_((pcb_line_t *) rat, 0); Index: trunk/src/obj_subc.c =================================================================== --- trunk/src/obj_subc.c (revision 13257) +++ trunk/src/obj_subc.c (revision 13258) @@ -1423,21 +1423,21 @@ pcb_box_t *bb = &subc->BoundingBox; int selected = PCB_FLAG_TEST(PCB_FLAG_SELECTED, subc); - pcb_gui->set_color(Output.fgGC, conf_core.appearance.color.element); - pcb_gui->set_line_cap(Output.fgGC, Trace_Cap); - pcb_gui->set_line_width(Output.fgGC, 0); - pcb_gui->set_draw_xor(Output.fgGC, 1); + pcb_gui->set_color(pcb_draw_out.fgGC, conf_core.appearance.color.element); + pcb_gui->set_line_cap(pcb_draw_out.fgGC, Trace_Cap); + pcb_gui->set_line_width(pcb_draw_out.fgGC, 0); + pcb_gui->set_draw_xor(pcb_draw_out.fgGC, 1); pcb_subc_draw_origin(subc, 0, 0); - pcb_gui->set_draw_xor(Output.fgGC, 0); + pcb_gui->set_draw_xor(pcb_draw_out.fgGC, 0); - pcb_gui->set_color(Output.fgGC, selected ? conf_core.appearance.color.subc_selected : conf_core.appearance.color.subc); - pcb_gui->set_line_width(Output.fgGC, 0); - pcb_gui->set_draw_xor(Output.fgGC, 1); - pcb_draw_dashed_line(Output.fgGC, bb->X1, bb->Y1, bb->X2, bb->Y1); - pcb_draw_dashed_line(Output.fgGC, bb->X1, bb->Y1, bb->X1, bb->Y2); - pcb_draw_dashed_line(Output.fgGC, bb->X2, bb->Y2, bb->X2, bb->Y1); - pcb_draw_dashed_line(Output.fgGC, bb->X2, bb->Y2, bb->X1, bb->Y2); - pcb_gui->set_draw_xor(Output.fgGC, 0); + pcb_gui->set_color(pcb_draw_out.fgGC, selected ? conf_core.appearance.color.subc_selected : conf_core.appearance.color.subc); + pcb_gui->set_line_width(pcb_draw_out.fgGC, 0); + pcb_gui->set_draw_xor(pcb_draw_out.fgGC, 1); + pcb_draw_dashed_line(pcb_draw_out.fgGC, bb->X1, bb->Y1, bb->X2, bb->Y1); + pcb_draw_dashed_line(pcb_draw_out.fgGC, bb->X1, bb->Y1, bb->X1, bb->Y2); + pcb_draw_dashed_line(pcb_draw_out.fgGC, bb->X2, bb->Y2, bb->X2, bb->Y1); + pcb_draw_dashed_line(pcb_draw_out.fgGC, bb->X2, bb->Y2, bb->X1, bb->Y2); + pcb_gui->set_draw_xor(pcb_draw_out.fgGC, 0); if (subc->refdes != NULL) pcb_term_label_draw(bb->X1, bb->Y1, 50.0, 0, 0, subc->refdes, subc->intconn); Index: trunk/src/obj_text.c =================================================================== --- trunk/src/obj_text.c (revision 13257) +++ trunk/src/obj_text.c (revision 13258) @@ -732,7 +732,7 @@ } if (!xordraw) - pcb_gui->fill_polygon(Output.fgGC, poly->PointN, x, y); + pcb_gui->fill_polygon(pcb_draw_out.fgGC, poly->PointN, x, y); } @@ -840,7 +840,7 @@ defaultsymbol.Y1 += Text->Y; defaultsymbol.X2 += Text->X; defaultsymbol.Y2 += Text->Y; - pcb_gui->fill_rect(Output.fgGC, defaultsymbol.X1, defaultsymbol.Y1, defaultsymbol.X2, defaultsymbol.Y2); + pcb_gui->fill_rect(pcb_draw_out.fgGC, defaultsymbol.X1, defaultsymbol.Y1, defaultsymbol.X2, defaultsymbol.Y2); /* move on to next cursor position */ x += size; @@ -900,17 +900,17 @@ unsigned int flg = 0; if (PCB_FLAG_TEST(PCB_FLAG_SELECTED, text)) - pcb_gui->set_color(Output.fgGC, layer->meta.real.selected_color); + pcb_gui->set_color(pcb_draw_out.fgGC, layer->meta.real.selected_color); else if (PCB_HAS_COLOROVERRIDE(text)) { - pcb_gui->set_color(Output.fgGC, text->override_color); + pcb_gui->set_color(pcb_draw_out.fgGC, text->override_color); } else if (layer->is_bound) { const char *color; PCB_OBJ_COLOR_ON_BOUND_LAYER(color, layer); - pcb_gui->set_color(Output.fgGC, color); + pcb_gui->set_color(pcb_draw_out.fgGC, color); } else - pcb_gui->set_color(Output.fgGC, layer->meta.real.color); + pcb_gui->set_color(pcb_draw_out.fgGC, layer->meta.real.color); if ((!layer->is_bound) && (layer->meta.real.grp >= 0)) flg = pcb_layergrp_flags(PCB, layer->meta.real.grp);