[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: pcb.git: branch: master updated (81c9e2b71b621cebc070624e84397eef4af1598f)
The branch, master has been updated
via 81c9e2b71b621cebc070624e84397eef4af1598f (commit)
from 0b59748da88acdd0463c4d29fbc1bba744854e0e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/draw.c | 70 ++++++++++++++++++++++++++++++++++++---------
src/hid.h | 3 ++
src/hid/common/hidnogui.c | 7 ++++
3 files changed, 66 insertions(+), 14 deletions(-)
=================
Commit Messages
=================
commit 81c9e2b71b621cebc070624e84397eef4af1598f
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
Add end_layer() function to HID API to mark the end of a layer's drawing
This is going to be useful for the GTK/GL renderer to manage sub-
compositing translucent objects within each layer.
:100644 100644 e1ae2dc... 6c3d709... M src/draw.c
:100644 100644 3919db0... eeb09ab... M src/hid.h
:100644 100644 5289c71... 08061fe... M src/hid/common/hidnogui.c
=========
Changes
=========
commit 81c9e2b71b621cebc070624e84397eef4af1598f
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
Add end_layer() function to HID API to mark the end of a layer's drawing
This is going to be useful for the GTK/GL renderer to manage sub-
compositing translucent objects within each layer.
diff --git a/src/draw.c b/src/draw.c
index e1ae2dc..6c3d709 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -693,6 +693,7 @@ DrawEverything (BoxTypePtr drawn_area)
DrawLayer (&(PCB->Data->Layer[max_copper_layer + side]), drawn_area);
}
r_search (PCB->Data->pad_tree, drawn_area, NULL, pad_callback, &side);
+ gui->end_layer ();
}
/* draw all layers in layerstack order */
@@ -701,8 +702,11 @@ DrawEverything (BoxTypePtr drawn_area)
int group = drawn_groups[i];
if (gui->set_layer (0, group, 0))
- if (DrawLayerGroup (group, drawn_area) && !gui->gui)
- DrawPPV (group, drawn_area);
+ {
+ if (DrawLayerGroup (group, drawn_area) && !gui->gui)
+ DrawPPV (group, drawn_area);
+ gui->end_layer ();
+ }
}
if (TEST_FLAG (CHECKPLANESFLAG, PCB) && gui->gui)
@@ -716,24 +720,42 @@ DrawEverything (BoxTypePtr drawn_area)
CountHoles (&plated, &unplated, drawn_area);
if (plated && gui->set_layer ("plated-drill", SL (PDRILL, 0), 0))
- DrawHoles (true, false, drawn_area);
+ {
+ DrawHoles (true, false, drawn_area);
+ gui->end_layer ();
+ }
if (unplated && gui->set_layer ("unplated-drill", SL (PDRILL, 0), 0))
- DrawHoles (false, true, drawn_area);
+ {
+ DrawHoles (false, true, drawn_area);
+ gui->end_layer ();
+ }
}
/* Draw the solder mask if turned on */
if (gui->set_layer ("componentmask", SL (MASK, TOP), 0))
- DrawMask (COMPONENT_LAYER, drawn_area);
+ {
+ DrawMask (COMPONENT_LAYER, drawn_area);
+ gui->end_layer ();
+ }
if (gui->set_layer ("soldermask", SL (MASK, BOTTOM), 0))
- DrawMask (SOLDER_LAYER, drawn_area);
+ {
+ DrawMask (SOLDER_LAYER, drawn_area);
+ gui->end_layer ();
+ }
if (gui->set_layer ("topsilk", SL (SILK, TOP), 0))
- DrawSilk (COMPONENT_LAYER, drawn_area);
+ {
+ DrawSilk (COMPONENT_LAYER, drawn_area);
+ gui->end_layer ();
+ }
if (gui->set_layer ("bottomsilk", SL (SILK, BOTTOM), 0))
- DrawSilk (SOLDER_LAYER, drawn_area);
+ {
+ DrawSilk (SOLDER_LAYER, drawn_area);
+ gui->end_layer ();
+ }
if (gui->gui)
{
@@ -743,27 +765,47 @@ DrawEverything (BoxTypePtr drawn_area)
NULL);
/* Draw rat lines on top */
if (gui->set_layer ("rats", SL (RATS, 0), 0))
- DrawRats(drawn_area);
+ {
+ DrawRats(drawn_area);
+ gui->end_layer ();
+ }
}
paste_empty = IsPasteEmpty (COMPONENT_LAYER);
if (gui->set_layer ("toppaste", SL (PASTE, TOP), paste_empty))
- DrawPaste (COMPONENT_LAYER, drawn_area);
+ {
+ DrawPaste (COMPONENT_LAYER, drawn_area);
+ gui->end_layer ();
+ }
paste_empty = IsPasteEmpty (SOLDER_LAYER);
if (gui->set_layer ("bottompaste", SL (PASTE, BOTTOM), paste_empty))
- DrawPaste (SOLDER_LAYER, drawn_area);
+ {
+ DrawPaste (SOLDER_LAYER, drawn_area);
+ gui->end_layer ();
+ }
doing_assy = true;
+
if (gui->set_layer ("topassembly", SL (ASSY, TOP), 0))
- PrintAssembly (COMPONENT_LAYER, drawn_area);
+ {
+ PrintAssembly (COMPONENT_LAYER, drawn_area);
+ gui->end_layer ();
+ }
if (gui->set_layer ("bottomassembly", SL (ASSY, BOTTOM), 0))
- PrintAssembly (SOLDER_LAYER, drawn_area);
+ {
+ PrintAssembly (SOLDER_LAYER, drawn_area);
+ gui->end_layer ();
+ }
+
doing_assy = false;
if (gui->set_layer ("fab", SL (FAB, 0), 0))
- PrintFab (Output.fgGC);
+ {
+ PrintFab (Output.fgGC);
+ gui->end_layer ();
+ }
}
static void
diff --git a/src/hid.h b/src/hid.h
index 3919db0..eeb09ab 100644
--- a/src/hid.h
+++ b/src/hid.h
@@ -311,6 +311,9 @@ typedef enum
layer is empty, if zero it may be non-empty. */
int (*set_layer) (const char *name_, int group_, int _empty);
+ /* Tell the GUI the layer last selected has been finished with */
+ void (*end_layer) (void);
+
/* Drawing Functions. Coordinates and distances are ALWAYS in PCB's
default coordinates (1/100 mil at the time this comment was
written). Angles are always in degrees, with 0 being "right"
diff --git a/src/hid/common/hidnogui.c b/src/hid/common/hidnogui.c
index 5289c71..08061fe 100644
--- a/src/hid/common/hidnogui.c
+++ b/src/hid/common/hidnogui.c
@@ -68,6 +68,11 @@ nogui_set_layer (const char *name, int idx, int empty)
return 0;
}
+static void
+nogui_end_layer (void)
+{
+}
+
static hidGC
nogui_make_gc (void)
{
@@ -456,6 +461,7 @@ HID hid_nogui = {
0 /* nogui_notify_crosshair_change */ ,
0 /* nogui_notify_mark_change */ ,
nogui_set_layer,
+ nogui_end_layer,
nogui_make_gc,
nogui_destroy_gc,
nogui_use_mask,
@@ -521,6 +527,7 @@ apply_default_hid (HID * d, HID * s)
AD (notify_crosshair_change);
AD (notify_mark_change);
AD (set_layer);
+ AD (end_layer);
AD (make_gc);
AD (destroy_gc);
AD (use_mask);
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs