Xerox Xerox Printer Access Facility (XPAF) Support & Software 用户指南
Examples
Long form:
BEGIN SECTION NUSEC; LOGO NEW0 AT 0,0 USING INK 2;
TEXT AT 1,1 USING FONT 3 AND INK 1 ’Acme Weather Balloons’ END
SECTION;
TEXT AT 1,1 USING FONT 3 AND INK 1 ’Acme Weather Balloons’ END
SECTION;
There is no short form.
SECTION definitions
The BEGIN SECTION command informs the compiler that what
follows includes the END SECTION command and lines up to form a
logical collection of commands that may be invoked as needed to
build a complete form.
logical collection of commands that may be invoked as needed to
build a complete form.
Most XFG commands may be found within a SECTION and these
commands are documented in the SECTION command description.
The key point to remember is that coordinates within the SECTION
definition are relative to 0, 0. Also, if the GRID command is specified,
then the GRID is only valid within the bounds of the defining
SECTION. The GRID command is a local variable and its scope is that
of the defining SECTION. Other statements within the section will
then use the local GRID command to determine the placement of
lines, boxes, text, etc. Remember that these placement values are still
relative to 0, 0.
commands are documented in the SECTION command description.
The key point to remember is that coordinates within the SECTION
definition are relative to 0, 0. Also, if the GRID command is specified,
then the GRID is only valid within the bounds of the defining
SECTION. The GRID command is a local variable and its scope is that
of the defining SECTION. Other statements within the section will
then use the local GRID command to determine the placement of
lines, boxes, text, etc. Remember that these placement values are still
relative to 0, 0.
The final placement of the elements is defined by the DO
SECTION command.
SECTION command.
SECTION invocation
A SECTION is invoked by using the DO SECTION command.
This command names the desired SECTION as well as the origin of
the SECTION. The AT parameter takes on the role of the ORIGIN
command for the SECTION and is used to determine the final
placement of lines, boxes, text, etc. The final placement is computed
as follows:
the SECTION. The AT parameter takes on the role of the ORIGIN
command for the SECTION and is used to determine the final
placement of lines, boxes, text, etc. The final placement is computed
as follows:
xFinal=xOrigin + xValue * xGrid
and
yFinal=yOrigin + yValue * yGrid
xValue and yValue are taken from the selected command.
xGrid and yGrid are taken from the active GRID command.
xOrigin and yOrigin are taken from the DO SECTION command that
invokes the section.
If a GRID command has not been defined within the SECTION, the GRID
that is in effect for the FORM is used.
that is in effect for the FORM is used.
DO SECTION command
Use the DO SECTION command to invoke a defined section.
You must first define a section before you can invoke it. You can repeat
sections at absolute or incremental coordinates. You can also repeat a
section in the same location. This command is useful for sections
containing relative coordinates.
You must first define a section before you can invoke it. You can repeat
sections at absolute or incremental coordinates. You can also repeat a
section in the same location. This command is useful for sections
containing relative coordinates.
Figure 4–20 shows the DO SECTION command syntax flow.
XPAF Forms Generator
45
User Guide and Reference