Index: trunk/src/draw.c =================================================================== --- trunk/src/draw.c (revision 27540) +++ trunk/src/draw.c (revision 27541) @@ -160,7 +160,7 @@ if (pcb_draw_inhibit) return; if (pcb_draw_invalidated.X1 <= pcb_draw_invalidated.X2 && pcb_draw_invalidated.Y1 <= pcb_draw_invalidated.Y2) - pcb_gui->invalidate_lr(pcb_gui, pcb_draw_invalidated.X1, pcb_draw_invalidated.X2, pcb_draw_invalidated.Y1, pcb_draw_invalidated.Y2); + pcb_render->invalidate_lr(pcb_render, pcb_draw_invalidated.X1, pcb_draw_invalidated.X2, pcb_draw_invalidated.Y1, pcb_draw_invalidated.Y2); /* shrink the update block */ pcb_draw_invalidated.X1 = pcb_draw_invalidated.Y1 = COORD_MAX; @@ -174,12 +174,12 @@ if (plated && pcb_layer_gui_set_vlayer(PCB, PCB_VLY_PLATED_DRILL, 0, &info->xform_exporter)) { pcb_draw_pstk_holes(info, gid, PCB_PHOLE_PLATED); - pcb_render->end_layer(pcb_gui); + pcb_render->end_layer(pcb_render); } if (unplated && pcb_layer_gui_set_vlayer(PCB, PCB_VLY_UNPLATED_DRILL, 0, &info->xform_exporter)) { pcb_draw_pstk_holes(info, gid, PCB_PHOLE_UNPLATED); - pcb_render->end_layer(pcb_gui); + pcb_render->end_layer(pcb_render); } } @@ -209,22 +209,22 @@ if (set_vlayer(info, lvly_drawn->top_assy, lvly_drawn->top_assy_enable, PCB_VLY_TOP_ASSY)) { pcb_draw_assembly(info, PCB_LYT_TOP); - pcb_render->end_layer(pcb_gui); + pcb_render->end_layer(pcb_render); } if (set_vlayer(info, lvly_drawn->bot_assy, lvly_drawn->bot_assy_enable, PCB_VLY_BOTTOM_ASSY)) { pcb_draw_assembly(info, PCB_LYT_BOTTOM); - pcb_render->end_layer(pcb_gui); + pcb_render->end_layer(pcb_render); } if (set_vlayer(info, lvly_drawn->top_fab, lvly_drawn->top_fab_enable, PCB_VLY_FAB)) { pcb_stub_draw_fab(info, pcb_draw_out.fgGC, &hid_exp); - pcb_render->end_layer(pcb_gui); + pcb_render->end_layer(pcb_render); } if (pcb_layer_gui_set_vlayer(PCB, PCB_VLY_CSECT, 0, &info->xform_exporter)) { pcb_stub_draw_csect(pcb_draw_out.fgGC, &hid_exp); - pcb_render->end_layer(pcb_gui); + pcb_render->end_layer(pcb_render); } } @@ -249,8 +249,8 @@ ly = pcb_uilayers.array[i]; if ((ly != NULL) && (ly->meta.real.vis)) { if (!have_canvas) { - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); have_canvas = 1; } pcb_draw_layer(info, ly); @@ -257,8 +257,8 @@ } } if (have_canvas) - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); - pcb_render->end_layer(pcb_gui); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); + pcb_render->end_layer(pcb_render); } } @@ -266,8 +266,8 @@ static void draw_xor_marks(pcb_draw_info_t *info) { int per_side = conf_core.appearance.subc_layer_per_side; - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_POSITIVE_XOR, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_POSITIVE_XOR, pcb_draw_out.direct, info->drawn_area); pcb_hid_set_line_cap(pcb_draw_out.fgGC, pcb_cap_round); pcb_hid_set_line_width(pcb_draw_out.fgGC, 0); @@ -286,17 +286,17 @@ pcb_event(&PCB->hidlib, PCB_EVENT_GUI_DRAW_OVERLAY_XOR, "p", &pcb_draw_out.fgGC, NULL); pcb_hid_set_draw_xor(pcb_draw_out.fgGC, 0); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); } static void draw_rats(const pcb_box_t *drawn_area) { if (pcb_layer_gui_set_vlayer(PCB, PCB_VLY_RATS, 0, NULL)) { - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_RESET, pcb_draw_out.direct, drawn_area); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_RESET, pcb_draw_out.direct, drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, drawn_area); pcb_draw_rats(drawn_area); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, drawn_area); - pcb_render->end_layer(pcb_gui); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, drawn_area); + pcb_render->end_layer(pcb_render); } } @@ -304,12 +304,12 @@ { int per_side = conf_core.appearance.subc_layer_per_side; - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); /* Draw pins' and pads' names */ - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); pcb_hid_set_line_cap(pcb_draw_out.fgGC, pcb_cap_round); pcb_hid_set_line_width(pcb_draw_out.fgGC, 0); if (PCB->SubcOn) { @@ -321,7 +321,7 @@ pcb_draw_pstk_labels(info); } pcb_draw_pstk_names(info, conf_core.editor.show_solder_side ? solder : component, info->drawn_area); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); } static int has_auto(pcb_layergrp_t *grp) @@ -362,7 +362,7 @@ } } - pcb_render->render_burst(pcb_gui, PCB_HID_BURST_START, info->drawn_area); + pcb_render->render_burst(pcb_render, PCB_HID_BURST_START, info->drawn_area); memset(do_group, 0, sizeof(do_group)); lvly.top_fab = -1; @@ -415,10 +415,10 @@ pcb_draw_silk_doc(info, side, PCB_LYT_DOC, 0, 1); pcb_draw_silk_doc(info, side, PCB_LYT_SILK, 0, 1); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); - pcb_render->end_layer(pcb_gui); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); + pcb_render->end_layer(pcb_render); } /* Draw far side doc and silks */ @@ -449,7 +449,7 @@ } pcb_draw_layer_grp(info, group, is_current); - pcb_render->end_layer(pcb_gui); + pcb_render->end_layer(pcb_render); } } @@ -457,23 +457,23 @@ goto finish; /* Draw padstacks below silk */ - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); if (pcb_render->gui) pcb_draw_ppv(info, conf_core.editor.show_solder_side ? solder : component); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); /* Draw the solder mask if turned on */ gid = pcb_layergrp_get_top_mask(); if ((gid >= 0) && (pcb_layer_gui_set_glayer(PCB, gid, 0, &info->xform_exporter))) { pcb_draw_mask(info, PCB_COMPONENT_SIDE); - pcb_render->end_layer(pcb_gui); + pcb_render->end_layer(pcb_render); } gid = pcb_layergrp_get_bottom_mask(); if ((gid >= 0) && (pcb_layer_gui_set_glayer(PCB, gid, 0, &info->xform_exporter))) { pcb_draw_mask(info, PCB_SOLDER_SIDE); - pcb_render->end_layer(pcb_gui); + pcb_render->end_layer(pcb_render); } /* Draw doc and silks */ @@ -488,10 +488,10 @@ } { /* holes_after: draw holes after copper, silk and mask, to make sure it punches through everything. */ - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); draw_everything_holes(info, side_copper_grp); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); } gid = pcb_layergrp_get_top_paste(); @@ -499,7 +499,7 @@ paste_empty = pcb_layergrp_is_empty(PCB, gid); if ((gid >= 0) && (pcb_layer_gui_set_glayer(PCB, gid, paste_empty, &info->xform_exporter))) { pcb_draw_paste(info, PCB_COMPONENT_SIDE); - pcb_render->end_layer(pcb_gui); + pcb_render->end_layer(pcb_render); } gid = pcb_layergrp_get_bottom_paste(); @@ -507,7 +507,7 @@ paste_empty = pcb_layergrp_is_empty(PCB, gid); if ((gid >= 0) && (pcb_layer_gui_set_glayer(PCB, gid, paste_empty, &info->xform_exporter))) { pcb_draw_paste(info, PCB_SOLDER_SIDE); - pcb_render->end_layer(pcb_gui); + pcb_render->end_layer(pcb_render); } pcb_draw_boundary_mech(info); @@ -756,8 +756,8 @@ static void pcb_draw_info_setup(pcb_draw_info_t *info, pcb_board_t *pcb) { info->pcb = pcb; - info->exporting = (pcb_gui->exporter || pcb_gui->printer); - info->export_name = pcb_gui->name; + info->exporting = (pcb_render->exporter || pcb_render->printer); + info->export_name = pcb_render->name; if (info->exporting) { strcpy(info->noexport_name, "noexport:"); strncpy(info->noexport_name+9, info->export_name, sizeof(info->noexport_name)-10); @@ -890,8 +890,8 @@ pcb_layergrp_t *grp = pcb_get_layergrp(PCB, group); unsigned int gflg = grp->ltype; - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); for (i = n_entries - 1; i >= 0; i--) { layernum = layers[i]; @@ -918,7 +918,7 @@ if (!pcb_render->gui) pcb_draw_ppv(info, group); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); } void pcb_erase_obj(int type, void *lptr, void *ptr) @@ -1106,11 +1106,11 @@ pcb_output_t save; expose_begin(&save, hid); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_RESET, 1, &e->view); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_POSITIVE, 1, &e->view); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_RESET, 1, &e->view); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_POSITIVE, 1, &e->view); e->expose_cb(pcb_draw_out.fgGC, e); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_FLUSH, 1, &e->view); - pcb_render->end_layer(pcb_gui); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_FLUSH, 1, &e->view); + pcb_render->end_layer(pcb_render); expose_end(&save); } Index: trunk/src/draw_composite.c =================================================================== --- trunk/src/draw_composite.c (revision 27540) +++ trunk/src/draw_composite.c (revision 27541) @@ -50,18 +50,18 @@ static void comp_start_sub_(comp_ctx_t *ctx) { - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_NEGATIVE, pcb_draw_out.direct, ctx->info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_NEGATIVE, pcb_draw_out.direct, ctx->info->drawn_area); } static void comp_start_add_(comp_ctx_t *ctx) { - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, ctx->info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, ctx->info->drawn_area); } static void comp_start_sub(comp_ctx_t *ctx) { if (ctx->thin) { - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, ctx->info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, ctx->info->drawn_area); pcb_render->set_color(pcb_draw_out.pmGC, ctx->color); return; } @@ -75,7 +75,7 @@ static void comp_start_add(comp_ctx_t *ctx) { if (ctx->thin) { - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, ctx->info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, ctx->info->drawn_area); return; } @@ -87,12 +87,12 @@ static void comp_finish(comp_ctx_t *ctx) { - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, ctx->info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, ctx->info->drawn_area); } static void comp_init(comp_ctx_t *ctx, int negative) { - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_RESET, pcb_draw_out.direct, ctx->info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_RESET, pcb_draw_out.direct, ctx->info->drawn_area); if (ctx->thin) return; @@ -102,7 +102,7 @@ if ((!ctx->thin) && (negative)) { /* drawing the big poly for the negative */ - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, ctx->info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, ctx->info->drawn_area); comp_fill_board(ctx); } } Index: trunk/src/draw_ly_spec.c =================================================================== --- trunk/src/draw_ly_spec.c (revision 27540) +++ trunk/src/draw_ly_spec.c (revision 27541) @@ -60,9 +60,9 @@ cctx.invert = 0; if ((cctx.grp == NULL) || (cctx.grp->len == 0)) { /* fallback: no layers -> original code: draw a single auto-add */ - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); } else { comp_draw_layer(&cctx, pcb_draw_paste_auto_, &side); @@ -95,7 +95,7 @@ cctx.gid = gid; cctx.color = ly != NULL ? &ly->meta.real.color : &conf_core.appearance.color.mask; cctx.thin = conf_core.editor.thin_draw || conf_core.editor.thin_draw_poly || conf_core.editor.wireframe_draw; - cctx.invert = pcb_gui->mask_invert; + cctx.invert = pcb_render->mask_invert; if (!cctx.invert) pcb_draw_out.direct = 0; @@ -163,11 +163,11 @@ if ((lyt_type & PCB_LYT_SILK) && (pcb_is_silk_old_style(&cctx, lid))) { /* fallback: implicit layer -> original code: draw auto+manual */ - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); pcb_draw_layer(info, LAYER_PTR(lid)); pcb_draw_silk_auto(&cctx, &lyt_side); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); } else { comp_draw_layer(&cctx, pcb_draw_silk_auto, &lyt_side); @@ -174,7 +174,7 @@ comp_finish(&cctx); } if (setgrp) - pcb_render->end_layer(pcb_gui); + pcb_render->end_layer(pcb_render); } } @@ -248,24 +248,24 @@ if (pcb_layer_gui_set_layer(gid, g, (numobj == 0), &info->xform_exporter)) { /* boundary does NOT support compisiting, everything is drawn in positive */ - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); for(n = 0; n < g->len; n++) { pcb_layer_t *ly = LAYER_PTR(g->lid[n]); pcb_draw_layer(info, ly); } - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); - pcb_render->end_layer(pcb_gui); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); + pcb_render->end_layer(pcb_render); } } if ((count == 0) && (goutl != NULL) && (pcb_layer_gui_set_layer(goutid, goutl, 0, &info->xform))) { /* The implicit outline rectangle (or automatic outline rectanlge). - We should check for pcb_gui->gui here, but it's kinda cool seeing the + We should check for pcb_render->gui here, but it's kinda cool seeing the auto-outline magically disappear when you first add something to the outline layer. */ - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); pcb_render->set_color(pcb_draw_out.fgGC, &PCB->Data->Layer[goutl->lid[0]].meta.real.color); pcb_hid_set_line_cap(pcb_draw_out.fgGC, pcb_cap_round); @@ -272,8 +272,8 @@ pcb_hid_set_line_width(pcb_draw_out.fgGC, conf_core.design.min_wid); pcb_render->draw_rect(pcb_draw_out.fgGC, 0, 0, PCB->hidlib.size_x, PCB->hidlib.size_y); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); - pcb_render->end_layer(pcb_gui); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); + pcb_render->end_layer(pcb_render); } /* draw slots */ @@ -284,20 +284,20 @@ if ((uslot != NULL) && (uslot->meta.real.vis)) { if (pcb_layer_gui_set_glayer(PCB, uslot->meta.real.grp, unplated > 0, &info->xform)) { - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); pcb_draw_pstk_slots(info, uslot->meta.real.grp, PCB_PHOLE_UNPLATED | PCB_PHOLE_BB); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); - pcb_render->end_layer(pcb_gui); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); + pcb_render->end_layer(pcb_render); } } if ((pslot != NULL) && (pslot->meta.real.vis)) { if (pcb_layer_gui_set_glayer(PCB, pslot->meta.real.grp, plated > 0, &info->xform)) { - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); pcb_draw_pstk_slots(info, pslot->meta.real.grp, PCB_PHOLE_PLATED | PCB_PHOLE_BB); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); - pcb_render->end_layer(pcb_gui); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); + pcb_render->end_layer(pcb_render); } } } @@ -307,10 +307,10 @@ static void pcb_draw_rats(const pcb_box_t *drawn_area) { - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_RESET, pcb_draw_out.direct, drawn_area); - pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_RESET, pcb_draw_out.direct, drawn_area); + pcb_render->set_drawing_mode(pcb_render, 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_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, drawn_area); + pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, drawn_area); } static void pcb_draw_assembly(pcb_draw_info_t *info, pcb_layer_type_t lyt_side)