Index: draw_composite.c =================================================================== --- draw_composite.c (revision 11279) +++ draw_composite.c (revision 11280) @@ -39,13 +39,12 @@ unsigned poly_after:1; } comp_ctx_t; -static void comp_fill_board(comp_ctx_t *ctx, int mask_type) +static void comp_fill_board(comp_ctx_t *ctx, int is_before) { /* Skip the mask drawing if the GUI doesn't want this type */ - if ((mask_type == HID_MASK_BEFORE && !ctx->poly_before) || (mask_type == HID_MASK_AFTER && !ctx->poly_after)) + if (((is_before==1) && !ctx->poly_before) || ((is_before == 0) && !ctx->poly_after)) return; - pcb_gui->use_mask(mask_type); pcb_gui->set_color(Output.fgGC, ctx->color); if (ctx->screen == NULL) pcb_gui->fill_rect(Output.fgGC, 0, 0, ctx->pcb->MaxWidth, ctx->pcb->MaxHeight); @@ -55,13 +54,11 @@ static void comp_start_sub_(comp_ctx_t *ctx) { - pcb_gui->use_mask(HID_MASK_CLEAR); pcb_gui->set_drawing_mode(PCB_HID_COMP_NEGATIVE, Output.direct, ctx->screen); } static void comp_start_add_(comp_ctx_t *ctx) { - pcb_gui->use_mask(HID_MASK_SET); pcb_gui->set_drawing_mode(PCB_HID_COMP_POSITIVE, Output.direct, ctx->screen); } @@ -94,16 +91,12 @@ static void comp_finish(comp_ctx_t *ctx) { - if (ctx->thin) { pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, Output.direct, ctx->screen); return; } - pcb_gui->use_mask(HID_MASK_AFTER); - comp_fill_board(ctx, HID_MASK_AFTER); - pcb_gui->use_mask(HID_MASK_OFF); - + comp_fill_board(ctx, 0); pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, Output.direct, ctx->screen); } @@ -114,20 +107,17 @@ if (ctx->thin) return; - pcb_gui->use_mask(HID_MASK_INIT); - if (ctx->invert) negative = !negative; if ((!ctx->thin) && (negative)) { /* old way of drawing the big poly for the negative */ - comp_fill_board(ctx, HID_MASK_BEFORE); + comp_fill_board(ctx, 1); if (!pcb_gui->poly_before) { /* new way */ - pcb_gui->use_mask(HID_MASK_SET); pcb_gui->set_drawing_mode(PCB_HID_COMP_POSITIVE, Output.direct, ctx->screen); - comp_fill_board(ctx, HID_MASK_SET); + comp_fill_board(ctx, 2); } } }