Index: trunk/src/draw_composite.c =================================================================== --- trunk/src/draw_composite.c (revision 11279) +++ trunk/src/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); } } } Index: trunk/src/draw_ly_spec.c =================================================================== --- trunk/src/draw_ly_spec.c (revision 11279) +++ trunk/src/draw_ly_spec.c (revision 11280) @@ -154,19 +154,10 @@ static void pcb_draw_rats(const pcb_box_t *drawn_area) { - /* - * lesstif allows positive AND negative drawing in HID_MASK_CLEAR. - * gtk only allows negative drawing. - * using the mask here is to get rat transparency - */ - if (pcb_gui->can_mask_clear_rats) - pcb_gui->use_mask(HID_MASK_CLEAR); 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_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); - if (pcb_gui->can_mask_clear_rats) - pcb_gui->use_mask(HID_MASK_OFF); } static void pcb_draw_assembly(unsigned int lyt_side, const pcb_box_t *drawn_area) Index: trunk/src/hid.h =================================================================== --- trunk/src/hid.h (revision 11279) +++ trunk/src/hid.h (revision 11280) @@ -128,18 +128,6 @@ int (*throw_drc_dialog) (void); } pcb_hid_drc_gui_t; -typedef enum pcb_mask_op_s { - HID_MASK_OFF, /* Flushes the buffer and return to non-mask operation. */ - - HID_MASK_BEFORE, /* Polygons being drawn before clears. */ - - HID_MASK_INIT, /* Initialize a new rendering layer for compositing layers */ - HID_MASK_CLEAR, /* negative-draw on the rendering layer */ - HID_MASK_SET, /* positive-draw on the rendering layer */ - - HID_MASK_AFTER /* Polygons being drawn after clears. */ -} pcb_mask_op_t; - typedef enum pcb_composite_op_s { PCB_HID_COMP_RESET, /* reset (allocate and clear) the sketch canvas */ PCB_HID_COMP_POSITIVE, /* draw subsequent objects in positive, with color */ @@ -266,19 +254,6 @@ pcb_hid_gc_t (*make_gc) (void); void (*destroy_gc) (pcb_hid_gc_t gc_); - /* Special note about the "erase" color: To use this color, you must - use this function to tell the HID when you're using it. At the - beginning of a layer redraw cycle (i.e. after set_layer), call - use_mask() to redirect output to a buffer. Draw to the buffer - (using regular HID calls) using regular and "erase" colors. Then - call use_mask(HID_MASK_OFF) to flush the buffer to the HID. If - you use the "erase" color when use_mask is disabled, it simply - draws in the background color. - - OBSOLETE, do not use it, use set_drawing_mode() and render_burst() - */ - void (*use_mask) (pcb_mask_op_t use_it_); - /* Composite layer drawing: manipulate the sketch canvas and set positive or negative drawing mode. The canvas covers the screen box. */ void (*set_drawing_mode)(pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *screen); Index: trunk/src/hid_extents.c =================================================================== --- trunk/src/hid_extents.c (revision 11279) +++ trunk/src/hid_extents.c (revision 11280) @@ -37,10 +37,6 @@ free(gc); } -static void extents_use_mask(pcb_mask_op_t use_it) -{ -} - static void extents_set_drawing_mode(pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *screen) { } @@ -138,7 +134,6 @@ extents_hid.set_layer_group = extents_set_layer_group; extents_hid.make_gc = extents_make_gc; extents_hid.destroy_gc = extents_destroy_gc; - extents_hid.use_mask = extents_use_mask; extents_hid.set_drawing_mode = extents_set_drawing_mode; extents_hid.render_burst = extents_render_burst; extents_hid.set_color = extents_set_color; Index: trunk/src/hid_nogui.c =================================================================== --- trunk/src/hid_nogui.c (revision 11279) +++ trunk/src/hid_nogui.c (revision 11280) @@ -65,14 +65,9 @@ { } -static void nogui_use_mask(pcb_mask_op_t use_it) -{ - CRASH("use_mask"); -} - static void nogui_set_drawing_mode(pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *screen) { -#warning make these crash after the transition +#warning TODO: make this crash after the transition /* CRASH("set_drawing_mode");*/ } @@ -417,7 +412,6 @@ hid->end_layer = nogui_end_layer; hid->make_gc = nogui_make_gc; hid->destroy_gc = nogui_destroy_gc; - hid->use_mask = nogui_use_mask; hid->set_drawing_mode = nogui_set_drawing_mode; hid->render_burst = nogui_render_burst; hid->set_color = nogui_set_color; Index: trunk/src_plugins/export_dxf/dxf.c =================================================================== --- trunk/src_plugins/export_dxf/dxf.c (revision 11279) +++ trunk/src_plugins/export_dxf/dxf.c (revision 11280) @@ -378,10 +378,6 @@ free(gc); } -static void dxf_use_mask(pcb_mask_op_t use_it) -{ -} - static void dxf_set_drawing_mode(pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *screen) { if (direct) @@ -490,7 +486,6 @@ dxf_hid.set_layer_group = dxf_set_layer_group; dxf_hid.make_gc = dxf_make_gc; dxf_hid.destroy_gc = dxf_destroy_gc; - dxf_hid.use_mask = dxf_use_mask; dxf_hid.set_drawing_mode = dxf_set_drawing_mode; dxf_hid.set_color = dxf_set_color; dxf_hid.set_line_cap = dxf_set_line_cap; Index: trunk/src_plugins/export_gcode/gcode.c =================================================================== --- trunk/src_plugins/export_gcode/gcode.c (revision 11279) +++ trunk/src_plugins/export_gcode/gcode.c (revision 11280) @@ -587,11 +587,6 @@ free(gc); } -static void gcode_use_mask(pcb_mask_op_t use_it) -{ - /* does nothing */ -} - static void gcode_set_color(pcb_hid_gc_t gc, const char *name) { if (gcode_im == NULL) { @@ -904,7 +899,6 @@ gcode_hid.set_layer_group = gcode_set_layer_group; gcode_hid.make_gc = gcode_make_gc; gcode_hid.destroy_gc = gcode_destroy_gc; - gcode_hid.use_mask = gcode_use_mask; gcode_hid.set_color = gcode_set_color; gcode_hid.set_line_cap = gcode_set_line_cap; gcode_hid.set_line_width = gcode_set_line_width; Index: trunk/src_plugins/export_gerber/gerber.c =================================================================== --- trunk/src_plugins/export_gerber/gerber.c (revision 11279) +++ trunk/src_plugins/export_gerber/gerber.c (revision 11280) @@ -46,7 +46,6 @@ static void gerber_parse_arguments(int *argc, char ***argv); static pcb_hid_gc_t gerber_make_gc(void); static void gerber_destroy_gc(pcb_hid_gc_t gc); -static void gerber_use_mask(pcb_mask_op_t use_it); static void gerber_set_color(pcb_hid_gc_t gc, const char *name); static void gerber_set_line_cap(pcb_hid_gc_t gc, pcb_cap_style_t style); static void gerber_set_line_width(pcb_hid_gc_t gc, pcb_coord_t width); @@ -885,11 +884,6 @@ free(gc); } -static void gerber_use_mask(pcb_mask_op_t use_it) -{ -} - - static void gerber_set_drawing_mode(pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *drw_screen) { gerber_drawing_mode = op; @@ -1317,7 +1311,6 @@ gerber_hid.set_layer_group = gerber_set_layer_group; gerber_hid.make_gc = gerber_make_gc; gerber_hid.destroy_gc = gerber_destroy_gc; - gerber_hid.use_mask = gerber_use_mask; gerber_hid.set_drawing_mode = gerber_set_drawing_mode; gerber_hid.set_color = gerber_set_color; gerber_hid.set_line_cap = gerber_set_line_cap; Index: trunk/src_plugins/export_nelma/nelma.c =================================================================== --- trunk/src_plugins/export_nelma/nelma.c (revision 11279) +++ trunk/src_plugins/export_nelma/nelma.c (revision 11280) @@ -693,11 +693,6 @@ free(gc); } -static void nelma_use_mask(pcb_mask_op_t use_it) -{ - /* does nothing */ -} - static void nelma_set_color(pcb_hid_gc_t gc, const char *name) { if (nelma_im == NULL) { @@ -989,7 +984,6 @@ nelma_hid.set_layer_group = nelma_set_layer_group; nelma_hid.make_gc = nelma_make_gc; nelma_hid.destroy_gc = nelma_destroy_gc; - nelma_hid.use_mask = nelma_use_mask; nelma_hid.set_color = nelma_set_color; nelma_hid.set_line_cap = nelma_set_line_cap; nelma_hid.set_line_width = nelma_set_line_width; Index: trunk/src_plugins/export_openscad/export_openscad.c =================================================================== --- trunk/src_plugins/export_openscad/export_openscad.c (revision 11279) +++ trunk/src_plugins/export_openscad/export_openscad.c (revision 11280) @@ -272,10 +272,6 @@ free(gc); } -static void openscad_use_mask(pcb_mask_op_t use_it) -{ -} - static void openscad_set_drawing_mode(pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *screen) { if (direct) @@ -416,7 +412,6 @@ openscad_hid.set_layer_group = openscad_set_layer_group; openscad_hid.make_gc = openscad_make_gc; openscad_hid.destroy_gc = openscad_destroy_gc; - openscad_hid.use_mask = openscad_use_mask; openscad_hid.set_drawing_mode = openscad_set_drawing_mode; openscad_hid.set_color = openscad_set_color; openscad_hid.set_line_cap = openscad_set_line_cap; Index: trunk/src_plugins/export_png/png.c =================================================================== --- trunk/src_plugins/export_png/png.c (revision 11279) +++ trunk/src_plugins/export_png/png.c (revision 11280) @@ -1246,10 +1246,6 @@ free(gc); } -static void png_use_mask(pcb_mask_op_t use_it) -{ -} - static pcb_composite_op_t drawing_mode; static void png_set_drawing_mode(pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *screen) { @@ -1262,7 +1258,7 @@ if (comp_im == NULL) { comp_im = gdImageCreate(gdImageSX(im), gdImageSY(im)); if (!comp_im) { - pcb_message(PCB_MSG_ERROR, "png_use_mask(): gdImageCreate(%d, %d) returned NULL. Corrupt export!\n", gdImageSY(im), gdImageSY(im)); + pcb_message(PCB_MSG_ERROR, "png_set_drawing_mode(): gdImageCreate(%d, %d) returned NULL. Corrupt export!\n", gdImageSY(im), gdImageSY(im)); return; } } @@ -1699,7 +1695,6 @@ png_hid.set_layer_group = png_set_layer_group; png_hid.make_gc = png_make_gc; png_hid.destroy_gc = png_destroy_gc; - png_hid.use_mask = png_use_mask; png_hid.set_drawing_mode = png_set_drawing_mode; png_hid.set_color = png_set_color; png_hid.set_line_cap = png_set_line_cap; Index: trunk/src_plugins/export_ps/eps.c =================================================================== --- trunk/src_plugins/export_ps/eps.c (revision 11279) +++ trunk/src_plugins/export_ps/eps.c (revision 11280) @@ -34,7 +34,6 @@ static int eps_set_layer_group(pcb_layergrp_id_t group, pcb_layer_id_t layer, unsigned int flags, int is_empty); static pcb_hid_gc_t eps_make_gc(void); static void eps_destroy_gc(pcb_hid_gc_t gc); -static void eps_use_mask(pcb_mask_op_t use_it); static void eps_set_color(pcb_hid_gc_t gc, const char *name); static void eps_set_line_cap(pcb_hid_gc_t gc, pcb_cap_style_t style); static void eps_set_line_width(pcb_hid_gc_t gc, pcb_coord_t width); @@ -416,10 +415,6 @@ free(gc); } -static void eps_use_mask(pcb_mask_op_t use_it) -{ -} - static void eps_set_drawing_mode(pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *screen) { if (direct) @@ -651,7 +646,6 @@ eps_hid.set_layer_group = eps_set_layer_group; eps_hid.make_gc = eps_make_gc; eps_hid.destroy_gc = eps_destroy_gc; - eps_hid.use_mask = eps_use_mask; eps_hid.set_drawing_mode = eps_set_drawing_mode; eps_hid.set_color = eps_set_color; eps_hid.set_line_cap = eps_set_line_cap; Index: trunk/src_plugins/export_ps/ps.c =================================================================== --- trunk/src_plugins/export_ps/ps.c (revision 11279) +++ trunk/src_plugins/export_ps/ps.c (revision 11280) @@ -981,10 +981,6 @@ free(gc); } -static void ps_use_mask(pcb_mask_op_t use_it) -{ -} - static void ps_set_drawing_mode(pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *screen) { global.drawing_mode = op; @@ -1597,7 +1593,6 @@ hid->set_layer_group = ps_set_layer_group; hid->make_gc = ps_make_gc; hid->destroy_gc = ps_destroy_gc; - hid->use_mask = ps_use_mask; hid->set_drawing_mode = ps_set_drawing_mode; hid->set_color = ps_set_color; hid->set_line_cap = ps_set_line_cap; Index: trunk/src_plugins/export_svg/svg.c =================================================================== --- trunk/src_plugins/export_svg/svg.c (revision 11279) +++ trunk/src_plugins/export_svg/svg.c (revision 11280) @@ -409,10 +409,6 @@ free(gc); } -static void svg_use_mask(pcb_mask_op_t use_it) -{ -} - static void svg_set_drawing_mode(pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *screen) { drawing_mode = op; @@ -819,7 +815,6 @@ svg_hid.set_layer_group = svg_set_layer_group; svg_hid.make_gc = svg_make_gc; svg_hid.destroy_gc = svg_destroy_gc; - svg_hid.use_mask = svg_use_mask; svg_hid.set_drawing_mode = svg_set_drawing_mode; svg_hid.set_color = svg_set_color; svg_hid.set_line_cap = svg_set_line_cap; Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid.c (revision 11279) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid.c (revision 11280) @@ -67,7 +67,6 @@ h->hid->fill_rect = gpmi_hid_fill_rect; h->hid->fill_pcb_pv = gpmi_hid_fill_pcb_pv; h->hid->fill_pcb_pad = gpmi_hid_fill_pcb_pad; - h->hid->use_mask = gpmi_hid_use_mask; h->attr_num = 0; h->attr = NULL; Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid_callbacks.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid_callbacks.c (revision 11279) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid_callbacks.c (revision 11280) @@ -158,12 +158,6 @@ gpmi_event(h->module, HIDE_fill_rect, h, gc, x1, y1, x2, y2); } -void gpmi_hid_use_mask(pcb_mask_op_t use_it) -{ - gpmi_hid_t *h = hid_gpmi_data_get(pcb_exporter); - gpmi_event(h->module, HIDE_use_mask, h, use_it); -} - void gpmi_hid_fill_pcb_pv(pcb_hid_gc_t fg_gc, pcb_hid_gc_t bg_gc, pcb_pin_t *pad, pcb_bool drawHole, pcb_bool mask) { gpmi_hid_t *h = hid_gpmi_data_get(pcb_exporter); Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid_callbacks.h =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid_callbacks.h (revision 11279) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid_callbacks.h (revision 11280) @@ -19,4 +19,3 @@ void gpmi_hid_fill_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2); void gpmi_hid_fill_pcb_pv(pcb_hid_gc_t fg_gc, pcb_hid_gc_t bg_gc, pcb_pin_t *pad, pcb_bool drawHole, pcb_bool mask); void gpmi_hid_fill_pcb_pad(pcb_hid_gc_t gc, pcb_pad_t * pad, pcb_bool clear, pcb_bool mask); -void gpmi_hid_use_mask(pcb_mask_op_t use_it); Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid_events.h =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid_events.h (revision 11279) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid_events.h (revision 11280) @@ -47,9 +47,6 @@ /* PCB callback events for drawing: draw a filled rectangle */ gpmi_define_event(HIDE_fill_rect)(void *hid, void *gc, int x1, int y1, int x2, int y2); -/* PCB callback events for drawing: TODO */ -gpmi_define_event(HIDE_use_mask)(void *hid, int use_it); - /* PCB callback events for drawing: create a new graphical context */ gpmi_define_event(HIDE_make_gc)(void *hid, void *gc); Index: trunk/src_plugins/hid_batch/batch.c =================================================================== --- trunk/src_plugins/hid_batch/batch.c (revision 11279) +++ trunk/src_plugins/hid_batch/batch.c (revision 11280) @@ -170,10 +170,6 @@ { } -static void batch_use_mask(pcb_mask_op_t use_it) -{ -} - static void batch_set_color(pcb_hid_gc_t gc, const char *name) { } @@ -350,7 +346,6 @@ batch_hid.set_layer_group = batch_set_layer_group; batch_hid.make_gc = batch_make_gc; batch_hid.destroy_gc = batch_destroy_gc; - batch_hid.use_mask = batch_use_mask; batch_hid.set_color = batch_set_color; batch_hid.set_line_cap = batch_set_line_cap; batch_hid.set_line_width = batch_set_line_width; Index: trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c =================================================================== --- trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c (revision 11279) +++ trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c (revision 11280) @@ -464,11 +464,6 @@ curr_drawing_mode = op; } -static void ghid_gdk_use_mask(pcb_mask_op_t use_it) -{ -} - - typedef struct { int color_set; GdkColor color; @@ -1413,7 +1408,6 @@ hid->set_layer_group = ghid_gdk_set_layer_group; hid->make_gc = ghid_gdk_make_gc; hid->destroy_gc = ghid_gdk_destroy_gc; - hid->use_mask = ghid_gdk_use_mask; hid->set_drawing_mode = ghid_gdk_set_drawing_mode; hid->set_color = ghid_gdk_set_color; hid->set_line_cap = ghid_gdk_set_line_cap; Index: trunk/src_plugins/hid_gtk2_gl/gtkhid-gl.c =================================================================== --- trunk/src_plugins/hid_gtk2_gl/gtkhid-gl.c (revision 11279) +++ trunk/src_plugins/hid_gtk2_gl/gtkhid-gl.c (revision 11280) @@ -301,61 +301,6 @@ glDisable(GL_TEXTURE_2D); } -void ghid_gl_use_mask(pcb_mask_op_t use_it) -{ -#if 0 - static int stencil_bit = 0; - - if (use_it == cur_mask) - return; - - /* Flush out any existing geoemtry to be rendered */ - hidgl_flush_triangles(&buffer); - - switch (use_it) { - case HID_MASK_BEFORE: - /* The HID asks not to receive this mask type, so warn if we get it */ - g_return_if_reached(); - - case HID_MASK_INIT: - glColorMask(0, 0, 0, 0); /* Disable writting in color buffer */ - glEnable(GL_STENCIL_TEST); /* Enable Stencil test */ - stencil_bit = hidgl_assign_clear_stencil_bit(); /* Get a new (clean) bitplane to stencil with */ - break; - - case HID_MASK_SET: - /* Write '1' to the stencil buffer where we should draw (on mask: "red", "solid")*/ - glStencilFunc(GL_ALWAYS, stencil_bit, stencil_bit); /* Always pass stencil test, write stencil_bit */ - glStencilMask(stencil_bit); /* Only write to our subcompositing stencil bitplane */ - glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); /* Stencil pass => replace stencil value (with 1) */ - break; - - case HID_MASK_CLEAR: - /* Write '0' to the stencil buffer where we should clear (on mask: "cutout", "transparent"). */ - glStencilFunc(GL_ALWAYS, stencil_bit, stencil_bit); /* Always pass stencil test, write stencil_bit */ - glStencilMask(stencil_bit); /* Only write to our subcompositing stencil bitplane */ - glStencilOp(GL_KEEP, GL_KEEP, GL_ZERO); /* Stencil pass => replace stencil value (with 1) */ - break; - - case HID_MASK_AFTER: - /* Drawing operations as masked to areas where the stencil buffer is '0' */ - glColorMask(1, 1, 1, 1); /* Enable drawing of r, g, b & a */ - glStencilFunc(GL_NOTEQUAL, 0, stencil_bit); /* Draw only where our bit of the stencil buffer is clear */ - glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); /* Stencil buffer read only */ - break; - - case HID_MASK_OFF: - /* Disable stenciling */ - hidgl_return_stencil_bit(stencil_bit); /* Relinquish any bitplane we previously used */ - glDisable(GL_STENCIL_TEST); /* Disable Stencil test */ - break; - } - cur_mask = use_it; -#endif - -} - - /* Config helper functions for when the user changes color preferences. | set_special colors used in the gtkhid. */ @@ -1216,7 +1161,6 @@ hid->set_layer_group = ghid_gl_set_layer_group; hid->make_gc = ghid_gl_make_gc; hid->destroy_gc = ghid_gl_destroy_gc; - hid->use_mask = ghid_gl_use_mask; hid->set_color = ghid_gl_set_color; hid->set_line_cap = ghid_gl_set_line_cap; hid->set_line_width = ghid_gl_set_line_width; Index: trunk/src_plugins/hid_gtk3_cairo/gtkhid-cairo.c =================================================================== --- trunk/src_plugins/hid_gtk3_cairo/gtkhid-cairo.c (revision 11279) +++ trunk/src_plugins/hid_gtk3_cairo/gtkhid-cairo.c (revision 11280) @@ -627,13 +627,6 @@ curr_drawing_mode = op; } -//#define WHICH_GC(gc) (cur_mask == HID_MASK_CLEAR ? priv->mask_gc : (gc)->gc) - -static void ghid_cairo_use_mask(pcb_mask_op_t use_it) -{ -} - - typedef struct { int color_set; GdkRGBA color; @@ -1624,7 +1617,6 @@ hid->end_layer = ghid_cairo_end_layer_group; hid->make_gc = ghid_cairo_make_gc; hid->destroy_gc = ghid_cairo_destroy_gc; - hid->use_mask = ghid_cairo_use_mask; hid->render_burst = ghid_cairo_render_burst; hid->set_drawing_mode = ghid_cairo_set_drawing_mode; hid->set_color = ghid_cairo_set_color; Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 11279) +++ trunk/src_plugins/hid_lesstif/main.c (revision 11280) @@ -235,7 +235,6 @@ static pcb_composite_op_t lesstif_drawing_mode = 0; #define use_mask() ((lesstif_drawing_mode == PCB_HID_COMP_POSITIVE) || (lesstif_drawing_mode == PCB_HID_COMP_NEGATIVE)) -static void lesstif_use_mask(pcb_mask_op_t use_it); static void zoom_max(); static void zoom_to(double factor, int x, int y); static void zoom_by(double factor, int x, int y); @@ -2285,7 +2284,6 @@ int mx, my; pcb_hid_expose_ctx_t ctx; - lesstif_use_mask(0); pixmap = main_pixmap; mx = view_width; my = view_height; @@ -2354,8 +2352,8 @@ } DrawBackgroundImage(); pcb_hid_expose_all(&lesstif_hid, &ctx); + lesstif_drawing_mode = PCB_HID_COMP_POSITIVE; draw_grid(); - lesstif_use_mask(0); show_crosshair(0); /* To keep the drawn / not drawn info correct */ XSetFunction(display, my_gc, GXcopy); XCopyArea(display, main_pixmap, window, my_gc, 0, 0, view_width, view_height, 0, 0); @@ -2809,10 +2807,6 @@ free(gc); } -static void lesstif_use_mask(pcb_mask_op_t use_it) -{ -} - static void lesstif_set_drawing_mode(pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *drw_screen) { lesstif_drawing_mode = op; @@ -3752,7 +3746,6 @@ lesstif_hid.set_layer_group = lesstif_set_layer_group; lesstif_hid.make_gc = lesstif_make_gc; lesstif_hid.destroy_gc = lesstif_destroy_gc; - lesstif_hid.use_mask = lesstif_use_mask; lesstif_hid.set_drawing_mode = lesstif_set_drawing_mode; lesstif_hid.set_color = lesstif_set_color; lesstif_hid.set_line_cap = lesstif_set_line_cap; Index: trunk/src_plugins/hid_remote/remote.c =================================================================== --- trunk/src_plugins/hid_remote/remote.c (revision 11279) +++ trunk/src_plugins/hid_remote/remote.c (revision 11280) @@ -200,10 +200,6 @@ proto_send_del_gc(idx); } -static void remote_use_mask(pcb_mask_op_t mask) -{ -} - static const char *drawing_mode_names[] = { "reset", "positive", "negative", "flush"}; static void remote_set_drawing_mode(pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *drw_screen) { @@ -436,7 +432,6 @@ remote_hid.set_layer_group = remote_set_layer_group; remote_hid.make_gc = remote_make_gc; remote_hid.destroy_gc = remote_destroy_gc; - remote_hid.use_mask = remote_use_mask; remote_hid.set_drawing_mode = remote_set_drawing_mode; remote_hid.set_color = remote_set_color; remote_hid.set_line_cap = remote_set_line_cap; Index: trunk/src_plugins/loghid/hid-logger.c =================================================================== --- trunk/src_plugins/loghid/hid-logger.c (revision 11279) +++ trunk/src_plugins/loghid/hid-logger.c (revision 11280) @@ -81,12 +81,6 @@ delegatee_->destroy_gc(gc); } -static void log_use_mask(pcb_mask_op_t use_it) -{ - pcb_fprintf(out_, "use_mask(%x)\n", use_it); - delegatee_->use_mask(use_it); -} - static void log_set_drawing_mode(pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *screen) { pcb_fprintf(out_, "set_drawing_mode(%d,%d,[%mm;%mm,%mm;%mm])\n", op, direct, screen->X1, screen->Y1, screen->X2, screen->Y2); @@ -260,7 +254,6 @@ REGISTER_IF_NOT_NULL(end_layer); REGISTER_IF_NOT_NULL(make_gc); REGISTER_IF_NOT_NULL(destroy_gc); - REGISTER_IF_NOT_NULL(use_mask); REGISTER_IF_NOT_NULL(set_drawing_mode); REGISTER_IF_NOT_NULL(render_burst); REGISTER_IF_NOT_NULL(set_color);