[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: pcb insulator layer



> I've done a quick look at the pcb draw.c code and see no mention of exporting,

draw.c doesn't call the exporters.  The exporters call draw.c.  They
redirect the "gui" to their own routines, then just ask for a
board-sized redraw.

> PinTypePtr seems to be used for either a pin or a via.

Yes.  They're the same physically.

> In this routine, the name of SetPVColor but no mention of layer
> suggests there's a current layer state before coming to this
> routine.

Yes.  Vias are always drawn in the same color, regardless of which
layer they're used in.

> I'm unclear about this:
>   * draws one non-copper layer
>   */
> void
> DrawLayer (LayerTypePtr Layer, BoxType * screen)
> 
> Does this mean "always call DrawLayerGroup" for copper layers?

DrawLayerGroup is for copper layers.  DrawLayer is for silk, rats, mask, etc.

> I found export mentioned in main.c  if (gui->exporter)  then gui->do_export (0);
> 
> do_export seems to be in another file...

Invoking the exporter is usually done via the active HID (lesstif,
gtk), or from the command line (main.c).  You don't need to worry
about that.

> I see screen as the parameter coming form somewhere else in DrawTop.

Look at the very bottom of draw.c.  hid_expose_callback() is what the
exporters call to get everything drawn.

> I haven't found where yet.  Is DrawTop a good template for a routine
> that would be called when exporting a layer with a name match like
> insul*?  Outline is handled in DrawLayerGroup with a name compare
> that changes rv and returns it, so that isn't where the action is
> either.

Since your insulator layer is using a copper layer, you have to go
through DrawLayerGroup (or DrawEverything) and check the layer name to
see if it's your layer.  DrawLayerGroup is fine if the stuff on your
layer is just lines, arcs, and text.  If you need SMT pads, or pins
but not vias, you need to edit DrawEverything.


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user