Colors and linewidth selection

Exercise

Having control of colors and linewidth when displaying lines

  • Implementation follows these steps:
  • Establish a group folder under Shared Commands and call it Color, Linewidth and Display. This is a container for the next commands.
  • Establish a group folder under Shared Commands -> Color, Linewidth and Display and call it Color selection and Display.
  • Create a scripted command for each of the colors: black, blue, brown, green, red, turquoise, white, yellow. Example:
    col red
    dis liw $::linewidth ;# display in red with line width from settings below.
  • Establish a group folder under Shared Commands -> Color, Linewidth and Display and call it Linewidth selection.
  • Create a scripted command for 5 linewidth selections. Example selection 3 : set ::linewidth 3 . (::linewidth is global and known all over).


The first arrangement look like this. It is fully functionable. The user first specify the linewidth. Then execute the color and display script under Color selection and Display while the data to be displayed is highlighted.


The next arrangement have changed all the script icons to better visual symbols. This is done in Edit mode for each script. Click on the script icon and browse in your own icon. The icons are generate using the Gimp program.

Exercise

Transfer the scripted color and linewidth settings to the toolbar

  • Implementation follows these steps:
  • Create a toolbar group called Color selection and Display.
  • For each script activate Add to Toolbar -> Color selection and Display.
  • Edit each command and apply Filters setting to only Datasets and Category -> Generic.

Adding all the color and linewidth selection scripts to the toolbar group establish a convenient display situation when color and linewidth shall be specified. The user can now just highlight the dataset and click on the selected icons: first the linewidth icon, then the icon for color and display.


The result of creating a user group of the color and linewidth display handling

The group of toolbar icons can be placed anywhere along the sides of the interface. Try this an select your preference.

After making toolbar icons out of the commands, you may delete the folder entries in Shared Commands and only keep it as toolbar commands.

Displaying white color when the background color is white

A white line displayed on a white background will not be visible. Therefore the program shifts to black automatically. But sometimes the lines to be displayed are placed on a solid surface of a certain color. And the user really wants white even if the background color is white. This is solved in the script for white color:
col whi nobgc ;# color is white and no test on background color