Документ взят из кэша поисковой машины. Адрес оригинального документа : http://hea-www.harvard.edu/RD/saotng/fixregions.html
Дата изменения: Unknown
Дата индексирования: Tue Oct 2 00:25:23 2012
Кодировка:

Поисковые слова: п п п п р п р п р п р п р п п р п п р п п р п п р п п р п п р п п р п
Fixing and Freeing Region Markers

Fixing and Freeing Region Markers

Region markers can be moved, resized, rotated, zoomed, deleted, and can change geometric type. There often are cases where one wants to disable one or more of these capabilities for a given marker. For example, markers placed on astronomical catalog positions should be fixed so that one cannot accidentally move them off the specified position. Or, one might want to prevent a complicated marker from being deleted.

SAOtng supports the capability of disabling or "fixing" the following marker attributes:

Parameters can be fixed using the fix option of the regions public access point (for fixing classes of markers) or by means of a fix keyword in the definition of an externally loaded marker.

The syntax for setting parameters via the regions' "fix" option is:

  echo "regions fix [cur|new|all] [+|-][fix param] ...
If "cur" is specified as the first option, then the fix parameters are applied to currently existing markers. If "new" is specified, they are applied to any newly created markers. If "all" is specified, then the parameters are applied both to current and new markers. If none of these are specified, the default is "new".

After specifying which markers are targeted, a list of fix specifications are entered. These can be any of the list of 7 fix parameters listed above. To turn on fixing of a specification, use "+" as a prefix. To turn off fixing, use the "-" suffix. If neither suffix is supplied, "+" is assumed. In addition, the keyword "all" and "none" are used to specify all of the parameters or none of them.

For example, to disable the ability to move and resize all new markers:

    echo "regions fix position +size" | xpaset SAOtng
To disable deletion of new markers:
    echo "regions fix new delete" | xpaset SAOtng
To disable all fixing of parameters for current markers (i.e., to free all current markers):
    echo "regions fix -all" | xpaset SAOtng
To fix all parameters for all markers:
    echo "regions fix all all" | xpaset SAOtng

The specification of fix params is relative (or additive), that is, new specifications are added to existing ones. Thus, if a marker already has its size fixed, and rotation is then fixed, the size remains fixed. To set fix params from a known state, use "all" or "none" as the first argument in the fix list. For example:

    echo "regions fix none size" | xpaset SAOtng
ensures that the current markers will only have their size fixed, regardless of what fix states previously were in effect, while:
    echo "regions fix all -position -size" | xpaset SAOtng
will disable all fix params, and then sets position and size.

Note that there is an ambiguity in syntax that has "all" as the first keyword. In the command:

    echo "regions fix all -position -size" | xpaset SAOtng
the "all" refers to "which markers", i.e. it means "unset position and size for all markers", not "set all fix params for current markers and then unset position and size". To do the latter, you can use syntax such as:
    echo "regions fix cur all -position -size" | xpaset SAOtng
or
    echo "regions fix +all -position -size" | xpaset SAOtng

When loading markers externally via the regions public access point, fix params can be specified for individual markers using the "fix:" keyword in the comment field. Consider the following region specification file:

  # source1: position is fixed
  # fix: position
  circle 200 200 30  # source1
  # fix: size
  # source2 fix: size
  circle 200 250 30  # source2
  # source3: free
  circle 200 300 30  # source3
  # fix: all -delete
  circle 200 350 30  # source4
The "fix:" keyword is used to specify a different set of fix params for each marker (except for source3, which is left free). Note that the keyword can be placed before or after the text label that also forms part of the comments preceding each marker. (This means, of course, that any comment beginning with "# fix:" is considered to be a fix parameter.)

Note that a fix command can be added to a region file to set the global fix state. Thus, to fix all markers in the current file and then reset the state:

  fix none position size
  circle 200 200 30  # source1
  circle 200 250 30  # source2
  fix none position
  circle 200 300 30  # source3
  circle 200 350 30  # source4
  fix none

Fix parameters can be set globally to be applied to all new (or existing) markers. This can be done initially using the -fix switch on the command line. The syntax for the -fix switch is:

  -fix  [+|-][fix1],[+|-][fix2],...
Note that use of commas to delineate fix params instead of spaces (to avoid problems with the shell).

Alternatively, the top-level Markers menu has options that allow you to display or edit the current global values. Newly created markers automatically will take on these values unless specifically given other fix params using the "fix:" keyword. Also you can apply these new global values to existing markers or free all markers from this menu.

Once a marker is created, its fix parameters can be displayed or changed using the options in the menu attached to the right mouse button within the marker. You can display current values, edit them, or free the marker completely. You also can reset the fix parameters to take on the global value for fixing markers.

Note that when editing markers using the marker menu option, the current fix parameters are displayed in the dialog box, preceded by "none". This ensures that all parameters initially are turned off, then the parameters specified are turned back on. If, instead, you want to add to the current list, delete the "none" parameter.

One final note: there are known problems in panning and zooming polygons that have had zoomsize fixed. We hope to fix this in a future revision.


Last Updated February 14, 1998