ACON
Home/Topics |
Commands
The drawing attribute commands include:
Line Type,
Line Width,
Line Grey,
RGB Colour,
CMYK Colour,
Line Colour,
Fill Grey,
Fill Colour,
Bezier Curve Control,
Font,
GSave and
GRestore.
The drawing primitives include:
Arrow,
Draw,
Draw Filled,
Objstart, and
Objend.
There are currently 433 predefined colours .
This command allows the user to specify the type
of line style subsequently drawn on the output device.
- There is 1 parameter:
- line type - the type of line to use in subsequent commands.
0 = Solid line
1 = Dashed
2 = Dotted
3 = Dash-Dot
4 = Dash-Dot-Dot
Line_Type(line type);
Line_Type(0);
initial program state - solid line
See the example VonB Curves
This command allows the user to specify the width
of lines subsequently drawn on the output device.
- There is 1 parameter:
- line width - the width of line to use in subsequent
commands in NDC units.
Line_WidthLine Width(width NDC´s);
Line_Width(mm(0.5));
initial program state - 0.25 pts
See the example Shaded Contours
This command allows the user to specify the grey
level of lines subsequently drawn on the output device. The value
should be a decimal number which represents a grey level, for
example 0 is 100% black, while 1.0 is white, and 0.5 is 50% grey.
- There is 1 parameter:
- line grey - the grey level to use when drawing lines (0.0 - 1.0).
Line_Grey(grey value);
Line_Grey(0.5);
initial program state - stroke lines in black
(0.0)
This command allows the user to specify a RGB colour
name and corresponding RGB values. The values should be integer
numbers (0 through 65535) which represents the saturation level
for each of the primary colours, for example 0,0,0 is 100% black,
while 65535,65535,65535 is white, and 65535,0,0 is pure red. About
16 million different colours are available to choose from.
With the current version of ACON,
the RGB_Colour() and CMYK_Colour()
commands should be issued before the Illustrator_Output("name",3)
command to ensure that the colours are recorded as custom colours
within Illustrator. Colours may be redefined. The last definition
of a colour before opening the Illustrator file will be recorded
in the output file. Note that Illustrator ´prefers´ only a single
definition of a colour; thus when simultaneously opening 2 files
in Illustrator with different definitions of the same custom colour
one definition will be replaced by the other.
- There are 4 parameters:
- colour name - the name of the custom colour.
red value - an integer value representing the red
component of the colour (0 - 65535).
green value - an integer value representing the green
component of the colour (0 - 65535).
blue value - an integer value representing the blue
component of the colour (0 - 65535).
RGB_ColourRGB Colour("colour name",red value,green value,blue value);
RGB_Colour("Redish",65535,35535,5000);
See predefined colours
This command allows the user to specify a CMYK colour
name and corresponding CMYK values. The values should be real
numbers (0.0 through 1.0) which represents the saturation level
for each of the CMYK (cyan, magenta, yellow, black) colours, for
example 0,0,0,1 is 100% black, while 1,0,0,0 is pure cyan.
With the current version of ACON,
the RGB_Colour() and CMYK_Colour()
commands should be issued before the Illustrator_Output("name",3)
command to ensure that the colours are recorded as custom colours
within Illustrator. Colours may be redefined. The last definition
of a colour before opening the Illustrator file will be recorded
in the output file. Note that Illustrator ´prefers´ only a single
definition of a colour; thus when simultaneously opening 2 files
in Illustrator with different definitions of the same custom colour
one definition will be replaced by the other.
- There are 5 parameters:
- colour name - the name of the custom colour.
cyan value - an real value representing the cyan
component of the colour (0 - 1.0).
magenta value - an real value representing the magenta
component of the colour (0 - 1.0).
yellow value - an real value representing the yellow
component of the colour (0 - 1.0).
black value - an real value representing the black
component of the colour (0 - 1.0).
CMYK_ColourCMYK Colour("colour
name",cyan value,magenta value,yellow value,black value);
CMYK_Colour("Redish",0.9,0.9,0.1,0);
See predefined colours
This command allows the user to specify the colour
of lines subsequently drawn on the output device. The colour must
have previously been defined using the RGB_Colour() or CMYK_Colour()
commands.
- There is 1 parameter:
- colour name - the name of the previously defined colour.
Line_ColourLine Colour("colour name");
Line_Colour("Orange");
initial program state - lines are drawn in black
See predefined colours
This command allows the user to specify the grey
level of the filling of objects subsequently drawn on the output
device. The value should be a decimal number which represents
a grey level, for example 0 is 100% black, while 1.0 is white,
and 0.5 is 50% grey. Note that text is considered a filled object.
- There is 1 parameter:
- grey value - a real value representing the grey level (0 - 1.0)
Fill_Grey(grey value);
Fill_Grey(0.5);
initial program state - fill in black (0.0)
See the example Histogram
This command allows the user to specify the colour
of filled objects subsequently drawn on the output device. The
colour must have previously been defined using the RGB_Colour()
or CMYK_Colour() commands.
- There is 1 parameter:
- colour name - the name of the previously defined colour.
Fill_ColourFill Colour("colour name");
Fill_Colour("Orange");
initial program state - objects are filled in black
See predefined colours
This command allows the user to specify the curvature
of bezier lines subsequently drawn on the output device. The curvature
of the line expressed as the distance of the bezier control point
of a vertice from the vertice. The value should be a decimal number
which represents the relative distance of the control point in
from its root vertice. A value of 0.0 will generate straight line
segments, while a value of about 0.38 will generate smooth curves.
Bezier curves are drawn (when this control value is not 0.0) for
the commands: Data_Line, Overlay_File,
Fill_Overlay_File, Overlay_xyp_File,
and Draw_Line.
- There is 1 parameter:
- control distance - the relative distance of the additional
control point from its vertice.
Bezier_Curve_Control(control distance);
Bezier_Curve_Control(0.1);
initial program state - no bezier curves (0.0)
This command allows the user to specify the name
of the font subsequently used when drawing text on the output
device. The value should be a character string which is the name
of the font.
Helvetica and Times-Roman are encoded into Illustrator output files by default.
ACON does not download any other fonts to the printer. Use of any other font is dependent
on the installed fonts on the host computer and the laser printer.
- There is 1 parameter:
- font name - a name of the font to use.
Font("font name");
Font("Helvetica");
initial program state - Times-Roman
This command is used in conjunction with the GRestore command,
and allows the user to save the current colour, line and character attributes
(line_grey, fill_grey, line_colour, fill_colour, line_width, line_type, character_height,
character_alignment, and character rotation). This is useful when you want to change some of
these attributes, and restore them to their previous condition without having to remember the
previous state.
Use the GSave command to save the current attributes, change the attributes as
you wish, and then later, use the GRestore command to reset the attributes to the values they had when
the GSave command was issued.
GSave();
This command is used in conjunction with the GSave command,
and allows the user to restore the current colour, line and character attributes
(line_grey, fill_grey, line_colour, fill_colour, line_width, line_type, character_height,
character_alignment, and character rotation). This is useful when you want to change some of
these attributes, and restore them to their previous condition without having to remember the
previous state.
Use the GSave command to save the current attributes, change the attributes as
you wish, and then later, use the GRestore command to reset the attributes to the values they had when
the GSave command was issued.
GRestore();
This command draws an arrow on the current output
device from the starting coordinate pointing to the ending coordinate.
This command should be issued between matching Objstart,
Objend function calls to add the vector to a plotted
object.
- There are 5 parameters:
- x start ndc - starting x axis coord. in NDC units.
- y start ndc - starting y axis coord. in NDC units.
- x end ndc - ending x axis coord. in NDC units.
- y end ndc - ending y axis coord. in NDC units.
- width - +ive width, this is the arrow shaft width
in NDCs. Arrow is drawn as a filled outline.
- -ive width, this is arrowhead width only. Arrow
is drawn using stroked lines.
arrow(start x position NDC´s,y position NDC´s,end
x position NDC´s,y position NDC´s,width);
/* draw a filled arrow */
objstart("my arrow");
arrow(mm(100),mm(100),mm(115),mm(100),mm(4.0));
objend("my arrow");

/* draw stroked arrows */
objstart("my arrows");
arrow(xuser(-66.5),yuser(43.5),xuser(-66.0),yuser(43.5),mm(-4.0));
arrow(xuser(-65.8),yuser(43.5),xuser(-65.3),yuser(43.5),mm(-4.0));
objend("my arrows");

See the examples Filled Arrows or
Stroked Arrows.
This command draws a vector to the output device.
This command should be issued between matching Objstart,
Objend function calls to add the vector to a plotted
object.
- There are 3 parameters:
- x position - the x axis coord. in NDC units.
- y position - the y axis coord. in NDC units.
- pen - pen up/down flag (0 =pen up, 1 =
pen down, 2 or greater = pen down, last call in vector)
draw(x position NDC´s,y position NDC´s,pen);
objstart("triangle");
draw(mm(50),mm(100),0);
draw(mm(25),mm(50),1);
draw(mm(75),mm(50),1);
draw(mm(50),mm(100),2);
objend("triangle");

See the example User Defined Functions.
This command sets the mode for the draw command.
- There is 1 parameter:
- draw mode - stroked polylines, no filling (0, the
default)
or filled polygons, no stroked vectors (1)
draw_filled(draw mode);
/* draw a shaded triangle using the current fill_grey level */
objstart("triangle");
draw_filled(1);
draw(mm(50),mm(100),0);
draw(mm(25),mm(50),1);
draw(mm(75),mm(50),1);
draw(mm(50),mm(100),2);
objend("triangle");

initial program state - stroked polylines, no
filling
This command ends the definition of a plotted object
to the output device. This command should be preceeded by an Objstart
command, and drawing commands, to define the plotted object.
- There is 1 parameter:
- name - a character string naming the plotted object.
objend(name);
objstart("my data");
draw_marker(mm(50),cm(5 * 3));
draw_marker(xuser(-67.5),yuser(42.3));
objend("my data");
See the example Filled Arrows.
This command begins the definition of a plotted object
to the output device. This command should be followed by drawing
commands, and finally an Objend command to define
the plotted object.
There is 1 parameter:
name - a character string naming the plotted object.
objstart(name);
objstart("my data");
draw_marker(mm(50),cm(5 * 3));
draw_marker(xuser(-67.5),yuser(42.3));
objend("my data");
See the example Filled Arrows.





ACON
Home/Topics |
Commands
|