VARKON Version 1.15 1997-12-29
All entities in VARKON have a PEN, LEVEL and BLANK attribute. Many entities have other attributes as well. The PEN attribute is used by VARKON to control color. Pen 1 (default) is usually black, pen 2 red, pen 3 green etc. Pen colors are defined in the VARKON INI-file(s). LEVEL is analogous to levels or layers in other systems. VARKON supports a maximum of 2000 levels (level 0 through 1999). Each level can be individually blanked (invisible) or unblanked (visible) in each graphical window. A line on level 10 for example may be visible in one window but invisible in another window. This is useful for showing different kinds of information from the same model in different windows. BLANK is used to make an entity totally invisible. This saves space and increases performance.
Lines, arcs and curves may use the WIDTH attribute to control their "thickness". Default value is 0.0 which means that drawing is done with a line as narrow as possible, usually 1 pixel. With a WIDTH value > 0 the entity is drawn using the number of pixels required with respect to the specified width and current scale.
When a new job is started all attributes have default values and these
values remain until explicitly changed using....
set(attribute=value);
The current value of an attribute can be temporarily overridden when an
entity is created by supplying the name of the attribute and its value
in the statement that creates the entity. If the current linefont is solid
(LFONT=0) and we want to create a single dashed line (LFONT=1)
without changing the global LFONT attribute this is how it would
be done......
lin_free(id,p1,p2:LFONT=1);
All entities including part take an optional list of attributes
as input. An attribute supplied like this is only valid for one entity.
The global value is not changed.
Attribute values are saved and copied on calls between modules. If MODULE
A calls MODULE B then B will inherit all values from A. If B changes
an attribute using the set procedure the change will only be valid
while B executes. When control returns to A again its original values are
restored. set_basic can be used to override this behavior and change
an attribute not only in the module currently executing but also in all
modules earlier in the call chain.
A nice way to set attributes and call a module at the same time is the
following...
part(id,name(parameters):LEVEL=5,PEN=10);
In this example the LEVEL attribute is set to 5 and the PEN
attribute is set to 10 when a module is called for. As long as the called
module doesn't change them they will keep these values while the module
executes but are restored to their original values when control returns
back to the caller.
A module that needs to know the current value of an attribute can use one
of many act_xxx functions. There is one for every attribute. The current
value of LEVEL for example is act_lev() and the current value
of PEN is act_pen().
Copyright © Microform AB Henningholmsgatan 4 S-703 69 Örebro SWEDEN E-mail: info@microform.se
VARKON Homepage | Index |