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

Re: gEDA-user: PCB, I lost my layer colors



Hi,

I've just pushed another revision of the patch set
to gitorious;

git clone git://gitorious.org/~ineiev/pcb/clon_ineieva.git
cd clon_ineieva
git checkout -b attributes origin/attributes

should work, or in case it has already been cloned,

git fetch origin; git checkout master
git branch -D attributes
git checkout -b attributes origin/attributes

I think it works as I intended;
so I probably won't change it until further feedback.

In short, it introduces layer attributes; then
it parses some of them to assign the current colour set.

There are two colour sets in the program: the first is defined
in Settings structure (program colours),
the second lives in PCB (board colours).

Program colours are affected with command line options like
--layer-color-1.

When loading the board, if there is no attribute for
some colour in PCB, the corresponding program colour is copied.

Actually displayed colours are switched with flag
ignore_board_colors and action
IgnoreBoardColors(0|1|toggle); they are connected to
checkbuttons "Use program colors" in GTK hid Preferences
(the Colors Tab) and in Lesstif hid Settings menu.

Copper layer colours are modified with actions:

SetLayerColor(all|c|number|\"name\", colour[, normal|selected])
assigns board colours

CopyProgramLayerColor(all|c|number|\"name\"[, normal|selected])
fills board colours with program values

AdoptBoardLayerColor(all|c|number|\"name\"[, normal|selected])
fills program colours with board values

In GTK hid, there are separate expanders to set program and board
layer colours.

Special (main) colours like vias and elements are handled with actions:
SetMainColor(all|Via|SelectedVia|Pin
  |SelectedPin|PinName|Element|SelectedElement
  |Rat|SelectedRat|Background|InvisibleObject
  |InvisibleMark|Connected|Warn|Black|Mask, colour)

CopyProgramMainColor(all|Via|SelectedVia|Pin
  |SelectedPin|PinName|Element|SelectedElement
  |Rat|SelectedRat|Background|InvisibleObject
  |InvisibleMark|Connected|Warn|Black|Mask)

AdoptBoardMainColor(all|Via|SelectedVia|Pin
  |SelectedPin|PinName|Element|SelectedElement
  |Rat|SelectedRat|Background|InvisibleObject
  |InvisibleMark|Connected|Warn|Black|Mask)

I didn't connected main colours to GTK hid Preferences buttons
(because they mostly had no effect before, and I felt that
it was out of scope of the patch set), with notable exception
of background colour, which is hardwired to displayed
background colour.

Silkscreen colour settings are never used for historical reasons;
all silkscreen objects are drawn with "Element" colour.

I'm uncertain about preserve_layer_attributes flag; it is to
enable user to save the board in backward-compatible format.
if it is not needed, I'll cut it off.

Any ideas?
Ineiev


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