RIPscrip Graphics Protocol Specification +quot;Remote Imaging Protocol+quot; Copyright (c)
------------------------------------------
RIPscrip Graphics Protocol Specification
"Remote Imaging Protocol"
Copyright (c) 1992-1993
TeleGrafix Communications, Inc.
All Rights Reserved
Revision 1.53.00
May 12th, 1993
------------------------------------------
=====================================================================
== INTRODUCTION ==
=====================================================================
As system operators of many bulletin board systems, we've often
wished for some form of Graphical User Interface for our boards. Like
most Sysops, we've come across many solutions. But they all seemed
to fall short in one way or another: inadequate for THIS system,
incomplete, difficult to implement, too complex, or lacking in
graphics development tools. In short, we became frustrated.
So, we decided to write our own Graphical Script Language.
RIPscrip stands for "Remote Imaging Protocol Script" language. This
graphical language is our answer to the graphics needs of the BBS
community and has serious tools for implementation and practical use.
For more information on RIPaint, RIPterm or RIPscrip development
tools, contact:
TeleGrafix Communications, Inc.
16458 Bolsa Chica #15
Huntington Beach, CA 92649
VOICE: (714) 379-2131
FAX : (714) 379-2132
DATA : (714) 379-2133 (ArenaBBS: The Major BBS...32 lines)
=====================================================================
== USE OF RIPscrip LANGUAGE ==
=====================================================================
The RIPscrip language is made publicly available and is freely
licensed by TeleGrafix Communications, Inc. By freely licensed, we
mean that the language can be used in the creation of other products.
It does not mean that RIPscrip is public domain. TeleGrafix maintains
the copyright of the RIPscrip language.
RIPscrip, RIPaint, RIPdraw, and RIPterm are trademarks of TeleGrafix
Communications, Inc. If you make a product that uses RIPscrip, you
must state in your program's "About Box" and documentation that this
product uses RIPscrip and the trademark statement. You may not use
RIPterm, RIPaint, RIPdraw, or RIPterm in the name of your product.
If you have any questions regarding these issues, contact TeleGrafix
Communications, Inc. at 714/379-2131.
=====================================================================
== DEFINITION ==
=====================================================================
RIPscrip is a text based Script language for displaying online
graphics. The script language conforms to 7-bit ASCII, avoiding the
use of Extended ASCII characters. This allows transmission over X.25
networks and other carriers that do not support full 8-bit binary
transfers easily. RIPscrip allows RIPscrip graphical statements to
be mixed with printable ASCII text and [de facto standard]
ANSI/VT-100 directives. RIPscrip can dynamically determine what is
graphics and what is text and display them appropriately in separate
windows (a graphics window and a text window). And if you must have
your own proprietary commands, RIPscrip has room for that too.
=====================================================================
== HOW DOES RIPscrip WORK? ==
=====================================================================
RIPscrip uses a flexible, and very efficient script language for its
graphical statements. Its efficiency stems from its compactness and
developmental planning. It is entirely Object Oriented instead of
Raster Oriented for efficient transmission of data and powerful
editing capabilities (using RIPaint for example). The language is
open ended enough so that literally trillions of different graphics
commands can be implemented as needed. RIPscrip is not a proprietary
protocol standard and is open to suggestion from the rest of the
world.
Earlier Graphical Script Languages (Avatar and Skypix among others),
utilize special command characters to indicate which graphics command
is to be executed. This precludes their use on systems that are
limited to ASCII printable text. Traditional script languages use
English words to accomplish things (eg, "BOX 0,0 100,50"). This kind
of thing is incredibly bulky, especially when you consider that
pictures are usually not simple things, but comprised of hundreds or
thousands of individual graphical operations (eg, line, circles,
fills, text, etc.). With this in mind, a human-readable script
language was completely inappropriate for the relatively limited
bandwidth of conventional modems.
So, one of our main strategies for this language was to make it as
efficient as possible without going completely binary. This allows
the immediate installation of the protocol onto any ASCII text-based
host system -- because the language consists entirely of ASCII
printable characters. We justify the unreadability of the language
by pointing out the limitations of today's modems and phone lines --
the language must be compact.
=====================================================================
== RIPscrip PROTOCOL - GENERAL STRUCTURE ==
=====================================================================
This document describes RIPscrip commands up through version 1.53.00 of
the RIPscrip Protocol Specification.
RIPscrip is organized into 10 levels of graphical commands (low Level-0
to high Level-9). Level-0 commands are the building blocks of RIPscrip.
The basic graphics primitives of the system are all Level-0, including
the commands Line, Rectangle, Circle, Color, Font, etc. Each level of
RIPscrip gets progressively higher-level in concept. For example,
Level-1 commands use Mouse Regions, Icons, and Formatted Text Regions.
The basic syntax rules are as follows:
1. A RIPscrip command line starts at the beginning of a line of text.
A RIPscrip command line moved to the middle of a line of text is
treated as literal text. This prevents people inserting mischievous
things in teleconference messages, or similar pranks. The only
exceptions to this rule is stated below under item 6, "continuation
of long lines", and item 12 "alternate RIPscrip starting sequences".
2. A RIPscrip command line begins with an exclamation mark (!).
3. Every RIPscrip command is preceded by the universal RIPscrip
delimiter, vertical-bar (|)
4. Individual RIPscrip commands may be combined on the same line
providing they are separated by the vertical bar delimiter.
5. RIPscrip commands or command lines may be split across multiple
lines with a backslash (\) just before each split. This helps
RIPscrip commands conform to right margins and escape word wrapping.
An example:
!|c02|L02030405|P0901020102010201020102\
0102010201020102
6. RIPscrip must allow for normal text to be intermixed with
RIPscrip commands. If unrecognized text appears after a RIPscrip
command, on the same line, the text is ignored (the command is not
ignored). A line that does not begin with "!|" is considered raw
text and is routed to the TTY text window (see "8" below).
7. RIPscrip makes provisions for a Graphical Window and a Text
Window. The Graphical Window is where all RIPscrip graphics appear.
The Text Window is where raw text appears. Raw Text includes ANSI
color and cursor movement codes (a subset of VT-100 terminal
emulation).
8. The vertical bar (|) of a RIPscrip command can be followed by a
level number. If the 1st character after (|) is a numeric digit
(1-9), then that's the RIPscrip Command Level. If the very 1st
character is NOT a digit 1-9, then it is the command type character
and the command is a Level-0 command. If the 1st character is a
digit 1-9, and the second character is also a digit, then that
defines a sub-level of a RIPscrip level. For example:
!|L RIPscrip Level-0 Command "L"
!|1L RIPscrip Level-1 Command "L"
!|15L RIPscrip Level-1, sub-level 5 Command "L"
Each of the above examples are unique commands not to be confused
with each other. You may continue the sub-levels up to a maximum
level of 9 (e.g., !|123456789").
9. Every RIPscrip command includes a command type character. In
Level-0 commands, this character immediately follows the vertical
bar. At all other levels, it follows the level digits. The command
type character may be any printable non-decimal-digit character.
10. Following the command type character are 0 or more parameters.
If the command requires a text-string, it is always the LAST
parameter. Numeric parameters DO NOT have any delimiters (commas,
dashes, spaces, etc.). A variable width numeric parameter may be
used as the last parameter. This allows for maximum efficiency.
Numbers are represented in base-36. This compacts numbers down to
roughly 3/5 of their decimal form. This numbering system,
technically called "Hexa-Tri-Decimal", has affectionately been dubbed
"MegaNums". Unlike Hexadecimal which uses 0-9, A-F, MegaNums take
advantage of the entire alphabet, using characters 0-9 and A-Z.
11. An exclamation mark (!) or vertical bar (|) character can appear
in a RIPscrip text parameter by preceding it with a backslash(\). A
literal backslash is represented with a double-backslash (\\).
12. A RIPscrip sequence CAN begin in a column other than column #0,
if the exclamation mark prefix is replaced with a Ctrl-A (Start Of
Header [SOH]) character, or Ctrl-B (STX) character. Since 99.9% of
all BBS' do not allow users to enter most control characters, users
will be unable to begin RIPscrip sequences in the middle of a command
line. Only the host should be able to do this. This prevents people
from cluttering teleconference, or other areas of a host with
spurious RIPscrip sequences.
ANSI SEQUENCES
--------------
RIPscrip predominantly uses non-ANSI command sequences. In a couple of
situations though, an ANSI sequence is allowed to perform a specific
function. There are currently three separate ANSI sequences defined in
the RIPscrip protocol to perform various actions. They are as follows:
ESC[! Query RIPscrip version number. RIPterm will respond with
RIPSCRIPxxyyzz where xx is equal to the major version
number (zero padded), yy is equal to the minor version
number (zero padded), and zz equals the revision code (also
zero padded). For v1.53.00, the returned sequence would be
RIPSCRIP015300. Another example, v1.23.45 would return
RIPSCRIP012345.
ESC[0! Same as ESC [ ! (see above)
ESC[1! Disables all RIPscrip processing. Any RIPscrip sequences are
interpreted as raw text.
ESC[2! Enabled RIPscrip processing. Any RIPscrip sequences will be
parsed and processed.
=====================================================================
== RIPscrip COMMAND REFERENCE ==
=====================================================================
The remainder of this document details the RIPscrip command set.
Each command has these aspects:
SYMBOL - the symbolic constant that is referenced in the
RIPscrip API Library code. This is the universal
name for the command.
LEVEL - The Command Level. Sub-levels are represented
with decimal points (eg, 1.3.5 for Level-1,
Sub-level 3, Sub-Sub-level 5). This is for
discussion purposes only. The decimal points
are never part of the actual command.
COMMAND - The command type character identifying the
command
ARGUMENTS - The arguments or parameters for the command.
Commands that do not require any arguments
after the command type character are shown
here as "". Each argument is shown in
the order it appears in the command, and is
represented by a name. If an argument is
numeric, it is followed by a width specifier
indicating how many MegaNum digits the
argument consists of. (eg, ":2" means a
2-digit MegaNum, or a value between 0 and
1295). If an argument does not have a width
specifier, it is by default a text argument,
and should be the last argument on the line.
If a command is variable length (see POLYGON),
then it will appear with ellipses (...)
FORMAT - This represents the format of the command, with
the starting "!|", the level digits, the
command type character, and the argument list,
with the argument names in angle brackets.
(These arguments are spaced apart, but these
spaces never appear in the physical commands.)
EXAMPLE - An actual example of the RIPscrip command.
DRAW COLOR - If YES, then this command uses or affects the
current Drawing Color.
LINE PATRN - If YES, then this command uses or affects the
current Line Style Pattern.
LINE THICK - If YES, then this command uses or affects the
current Line Style Thickness
FILL COLOR - If YES, then this command uses or affects the
current Fill Color.
FILL PATRN - If YES, then this command uses or affects the
current Fill Pattern.
WRITE MODE - If YES, then this command will take advantage
of the current Write Mode (eg, COPY, or XOR).
FONT SIZES - If YES, then this command uses or affects the
current Font Size.
RIP_TEXT_WINDOW
---------------
Function: Define the size and location of the Text Window
Level: 0
Command: w
Arguments: x0:2, y0:2, x1:2, y1:2, wrap:1, size:1
Format: !|w
Example: !|w00001B0M10
Uses Draw Color: NO
Uses Line Pattern: NO
Uses Line Thick: NO
Uses Fill Color: NO
Uses Fill Pattern: NO
Uses Write Mode: NO
Uses Font Sizes: NO
This command specifies the dimensions of the virtual TTY window that will
display all ASCII/ANSI (non-RIPscrip) data coming across the connection.
(x0,y0) defines the upper-left corner of the window in text-based
character- cell coordinates. (x1,y1) defines the lower-right corner of
the window (inclusive). There may be two simultaneous windows on the
screen, one for TTY text, and one for the display of RIPscrip graphics (a
viewport), and they may overlap.
Bytes received over the modem are first checked for RIPscrip commands.
All bytes that don't conform to the RIPscrip syntax are treated as
ANSI/ASCII and displayed in the TTY window (if defined). User keystrokes
that are echoed by the BBS would also appear in the text window by this
scheme.
The text window may be made invisible, ignoring all non-RIPscrip bytes,
by setting all RIP_TEXT_WINDOW parameters to zero (0). The X and Y
parameters ranges vary depending on the setting of the parameter
which governs the font size used for the output text. Valid settings for
the parameter and the ranges for X/Y values are as follows:
Size Font Size X Range Y Range
------------------------------------------
0 8x8 0-79 0-42
1 7x8 0-90 0-42
2 8x14 0-79 0-24
3 7x14 0-90 0-24
4 16x14 0-39 0-24
The parameter applies to both the horizontal and vertical
dimensions. If is set to 1, then any text that extends beyond the
right margin of the window will wrap to the next line of the window,
scrolling the window up if necessary. If is 0, then any text
going beyond the right margin is truncated and no scrolling is performed;
the cursor remains at the right margin.
NOTE: If the text window currently being defined is identical to the
currently defined text window, the cursor will not be relocated
to the upper-left corner of the window. The only aspect of the
text window that can be different and still be deemed
"identical" is the parameter. For the current and new text
windows to be considered identical, the parameters , ,
, and must be the same.
RIP_VIEWPORT
------------
Function: Define the size and location of the Graphics Window
Level: 0
Command: v
Arguments: x0:2, y0:2, x1:2, y1:2
Format: !|v
Example: !|v00002E1M
Uses Draw Color: NO
Uses Line Pattern: NO
Uses Line Thick: NO
Uses Fill Color: NO
Uses Fill Pattern: NO
Uses Write Mode: NO
Uses Font Sizes: NO
This command defines the (X,Y) pixel boundaries of the RIPscrip graphics
window, which will contain all RIPscrip graphics output. ASCII/ANSI text
will be displayed in the virtual TTY window defined by the
RIP_TEXT_WINDOW command above. (x0,y0) defines the upper-left corner of
the graphics viewport, and (x1,y1) defines the lower-right corner
(inclusive). The viewport may be disabled, so RIPscrip graphics commands
are ignored, by setting all parameters to zero (0).
Graphics displayed in the viewport is "truncated" at this rectangular
border, meaning if a circle would normally extend outside one of the
borders, it will be chopped, only displaying the portion of the circle
that is contained inside the viewport boundaries.
Coordinates are specified based on a 640x350 pixel resolution, meaning X
can be anywhere from 0 - 639, and Y can be anywhere from 0 - 349. x0 must
be less than x1 and y0 must be less than y1 unless all parameters are set
to zero, indicating that the graphics window is disabled.
RIP_RESET_WINDOWS
-----------------
Function: Clear Graphics & Text Windows and reset to full screen
Level: 0
Command: *
Arguments:
Format: !|*
Example: !|*
Uses Draw Color: NO
Uses Line Pattern: NO
Uses Line Thick: NO
Uses Fill Color: NO
Uses Fill Pattern: NO
Uses Write Mode: NO
Uses Font Sizes: NO
This command will set the Text Window to a full 80x43 EGA hi-res text
mode, place the cursor in the upper left corner, clear the screen, and
zoom the Graphics Window to full 640x350 EGA screen. Both windows are
filled with the current graphics background color. Also, all Mouse
Regions are deleted and the Clipboard is erased. A system might use this
function before entering a text only mode that does not support RIP
commands. This command will also restore the default 16-color RIP
palette (see RIP_SET_PALETTE below).
RIP_ERASE_WINDOW
----------------
Function: Clears the Text Window to the current background color
Level: 0
Command: e
Arguments:
Format: !|e
Example: !|e
Uses Draw Color: NO
Uses Line Pattern: NO
Uses Line Thick: NO
Uses Fill Color: NO
Uses Fill Pattern: NO
Uses Write Mode: NO
Uses Font Sizes: NO
This clears the TTY text window to the current graphics background color
and positions the cursor in the upper-left corner of the window. If the
text window is inactive, then this command is ignored. If the text and
graphics windows overlap, then this command will clear the overlapping
portion also.
RIP_ERASE_VIEW
--------------
Function: Clear Graphics Window to current background color
Level: 0
Command: E
Arguments:
Format: !|E
Example: !|E
Uses Draw Color: NO
Uses Line Pattern: NO
Uses Line Thick: NO
Uses Fill Color: NO
Uses Fill Pattern: NO
Uses Write Mode: NO
Uses Font Sizes: NO
This command clears the Graphics Viewport to the current graphics
background color. If the graphics viewport is not active (if the
boundaries are 0,0,0,0), then this command is ignored. If the text and
graphics windows overlap, then this command will clear the overlapping
portion also.
RIP_GOTOXY
----------
Function: Move text cursor to row & column in Text Window
Level: 0
Command: g
Arguments: x:2, y:2
Format: !|g
Example: !|g0509
Uses Draw Color: NO
Uses Line Pattern: NO
Uses Line Thick: NO
Uses Fill Color: NO
Uses Fill Pattern: NO
Uses Write Mode: NO
Uses Font Sizes: NO
This command sets the position of the text cursor in the TTY Text window,
if it is active. If inactive (if the dimensions are 0,0,0,0), then this
command is ignored. This command is equivalent to the ANSI/VT-100
command goto x/y, [x;yH, except that the coordinates of that ANSI
command are 1-based and the coordinates of this RIPscrip command are
0-based.
RIP_HOME
--------
Function: Move cursor to upper-left corner of Text Window
Level: 0
Command: H
Arguments:
Format: !|H
Example: !|H
Uses Draw Color: NO
Uses Line Pattern: NO
Uses Line Thick: NO
Uses Fill Color: NO
Uses Fill Pattern: NO
Uses Write Mode: NO
Uses Font Sizes: NO
This command positions the text cursor to the upper-left corner in the
TTY Text Window, if it is active.
RIP_ERASE_EOL
-------------
Function: Erase current text line from the cursor to end of line
Level: 0
Command: >
Arguments:
Format: !|>
Example: !|>
Uses Draw Color: NO
Uses Line Pattern: NO
Uses Line Thick: NO
Uses Fill Color: NO
Uses Fill Pattern: NO
Uses Write Mode: NO
Uses Font Sizes: NO
This command will erase the current text line in the TTY text window from
the current cursor location (inclusive) to the end of the line. The
erased region is filled with the current graphics background color. This
differs from the ANSI command ESC[K which clears the area with the
current ANSI background color.
RIP_COLOR
---------
Function: Set the current Drawing Color for graphics primitives
Level: 0
Command: c
Arguments: color:2
Format: !|c
Example: !|cA
Uses Draw Color: YES
Uses Line Pattern: NO
Uses Line Thick: NO
Uses Fill Color: NO
Uses Fill Pattern: NO
Uses Write Mode: NO
Uses Font Sizes: NO
This command sets the color for drawing lines, circles, arcs, rectangles,
and other graphics primitives, as well as the color for drawing
graphics-text from the RIP_TEXT class of commands (not from ASCII/ANSI
text). This command does not affect Fill colors or Fill Patterns (see
below). It does affect the borders of graphic objects, for example the
border of an ellipse drawn with the RIP_FILLED_OVAL command. (The
interior of the ellipse would be drawn according to the most recent
RIP_FILL_STYLE command.)
This command chooses one of the colors of the 16-color RIP palette
defined by the RIP_SET_PALETTE. Here is the default 16-color RIP
palette:
Value Color
-------------------------------------------------------
00 Black (00 is always the background color)
01 Blue
02 Green
03 Cyan
04 Red
05 Magenta
06 Brown
07 Light Gray
08 Dark Gray
09 Light Blue
0A Light Green
0B Light Cyan
0C Light Red
0D Light Magenta
0E Yellow
0F White
RIP_SET_PALETTE
---------------
Function: Set 16-color RIP Palette from master 64-color palette
Level: 0
Command: Q
Arguments: c1:2, c2:2, ... c16:2
Format: !|Q ...
Example: !|Q000102030405060708090A0B0C0D0E0F
Uses Draw Color: YES
Uses Line Pattern: NO
Uses Line Thick: NO
Uses Fill Color: NO
Uses Fill Pattern: NO
Uses Write Mode: NO
Uses Font Sizes: NO
This command modifies the 16-color RIP palette by choosing from the 64
colors in the master palette. This allows you to alter the colors in
your RIPscrip graphics scenes. Once a Set Palette command is processed,
any colors on the screen that had their corresponding palette entries
changed will instantly switch to the new color set. You may obtain color
cycling effects by using this command. The default 16-color RIP palette
is restored by the RIP_RESET_WINDOWS command. The default 16-color RIP
palette is:
16-Color RIP Palette Master 64-Color EGA
Color Code Palette Color Code Color
---------------------------------------------------------------
00 0 (00) Black
01 1 (01) Blue
02 2 (02) Green
03 3 (03) Cyan
04 4 (04) Red
05 5 (05) Magenta
06 7 (06) Brown
07 20 (0K) Light Gray
08 56 (1K) Dark Gray
09 57 (1L) Light Blue
0A 58 (1M) Light Green
0B 59 (1N) Light Cyan
0C 60 (1O) Light Red
0D 61 (1P) Light Magenta
0E 62 (1Q) Yellow
0F 63 (1R) White
Color 00 of the 16-color RIP palette is always the background color
(which is typically Black, or color 00 of the 64-color EGA palette).
RIP_ONE_PALETTE
---------------
Function: Set color of 16-color RIP Palette from Master Palette
Level: 0
Command: a
Arguments: color:2 value:2
Format: !|a
Example: !|a051B
Uses Draw Color: YES
Uses Line Pattern: NO
Uses Line Thick: NO
Uses Fill Color: NO
Uses Fill Pattern: NO
Uses Write Mode: NO
Uses Font Sizes: NO
This command changes one color in the 16-color palette. The color number
is sent along with the new color value from the Master Color Palette. The
color must be in the range of 0-63. Once a Set One Palette
command is processed, any colors on the screen that correspond to the
number will be changed instantly to the new color value. You may
obtain color cycling effects by using this command. The default RIP
palette is restored when by RIP_RESET_WINDOWS.
16-Color RIP Palette Master 64-Color EGA
Color Code Palette Color Code Color
---------------------------------------------------------------
00 0 (00) Black
01 1 (01) Blue
02 2 (02) Green
03 3 (03) Cyan
04 4 (04) Red
05 5 (05) Magenta
06 7 (06) Brown
07 20 (0K) Light Gray
08 56 (1K) Dark Gray
09 57 (1L) Light Blue
0A 58 (1M) Light Green
0B 59 (1N) Light Cyan
0C 60 (1O) Light Red
0D 61 (1P) Light Magenta
0E 62 (1Q) Yellow
0F 63 (1R) White
Color 00 of the 16-color RIP palette is always the background color
(which is typically Black, or color 00 of the 64-color EGA palette).
RIP_WRITE_MODE
--------------
Function: Set drawing mode for graphics primitives
Level: 0
Command: W
Arguments: mode:2
Format: !|W
Example: !|W00
Uses Draw Color: NO
Uses Line Pattern: NO
Uses Line Thick: NO
Uses Fill Color: NO
Uses Fill Pattern: NO
Uses Write Mode: YES
Uses Font Sizes: NO
This command sets the current drawing mode for most of the graphics
primitives:
Mode Description
------------------------------------------
00 Normal drawing mode (overwrite)
01 XOR (complimentary) mode
In normal mode, things are drawn in the current drawing color over top of
whatever is in the graphics viewport. This is the typical mode of
operation in a GUI environment.
In the XOR mode, instead of changing each pixel to the current drawing
color, the pixel is inverted (black changes to white, red to green,
etc.). Drawing the same item a second time erases it completely. This
mode is useful for drawing something temporarily, or for animation. The
Rubber Band mode of most paint programs uses a mode like this.
RIP_MOVE
--------
Function: Move the current drawing position to (X,Y)
Level: 0
Command: m
Arguments: x:2, y:2
Format: !|m
Example: !|m0509
Uses Draw Color: NO
Uses Line Pattern: NO
Uses Line Thick: NO
Uses Fill Color: NO
Uses Fill Pattern: NO
Uses Write Mode: NO
Uses Font Sizes: NO
This command moves the current graphics drawing cursor to (x,y). You
could use this to draw text at a certain point, but you'd probably use
RIP_TEXT_XY instead. This command is primarily provided for future
development which will make use of its ability to relocate the current
drawing position without physically drawing anything.
RIP_TEXT
--------
Function: Draw text in current font/color at current location
Level: 0
Command: T
Arguments: text-string
Format: !|T
Example: !|Thello world
Uses Draw Color: YES
Uses Line Pattern: NO
Uses Line Thick: NO
Uses Fill Color: NO
Uses Fill Pattern: NO
Uses Write Mode: YES
Uses Font Sizes: YES
This command displays text at the current location in the graphics
window, as set with the RIP_MOVE command. The text is also affected by
the most recent settings of these commands:
Command Description of Command
-----------------------------------------------------------------
RIP_FONT_STYLE font style (character set, direction, size)
RIP_WRITE_MODE drawing mode (normal or XOR)
RIP_COLOR drawing color (from the 16-color RIP palette)
The drawing position is placed at the end of the last character drawn.
The current drawing position is set immediately to the right of the drawn
text. Subsequent Line, Circle or other such commands will not affect
this position. This provides a means so that you can quickly do another
RIP_TEXT command (presumably in another color) at a later time and have
the text show up immediately after the previous text.
RIP_TEXT_XY
-----------
Function: Draw text in current font/color at specific location
Level: 0
Command: @
Arguments: x:2, y:2 and text-string
Format: !|@
Example: !|@0011hello world
Uses Draw Color: YES
Uses Line Pattern: NO
Uses Line Thick: NO
Uses Fill Color: NO
Uses Fill Pattern: NO
Uses Write Mode: YES
Uses Font Sizes: YES
This command is an efficient combination of RIP_MOVE and RIP_TEXT. The
text is drawn at the specified location according to the same settings as
apply to RIP_TEXT (see above).
The current drawing position is set immediately to the right of the drawn
text. Subsequent Line, Circle or other such commands will not affect
this position. This provides a means so that you can quickly do another
RIP_TEXT command (presumably in another color) at a later time and have
the text show up immediately after the previous text.
RIP_FONT_STYLE
--------------
Function: Select the current font style, orientation and size
Level: 0
Command: Y
Arguments: font:2, direction:2, size:2, res:2
Format: !|Y
Example: !|Y01000400
Uses Draw Color: NO
Uses Line Pattern: NO
Uses Line Thick: NO
Uses Fill Color: NO
Uses Fill Pattern: NO
Uses Write Mode: NO
Uses Font Sizes: YES
This command sets the font, direction and size for RIP_TEXT commands.
Font Description of Font
---------------------------------------------
00 Default 8x8 font Bit-Mapped
01 Triplex Font Scalable
02 Small Font Scalable
03 Sans Serif Font Scalable
04 Gothic [Old English] Font Scalable
05 Script Font Scalable
06 Simplex Font Scalable
07 Triplex Script Font Scalable
08 Complex Font Scalable
09 European Font Scalable
0A Bold Font Scalable
For the Direction parameter, use 00 to indicate horizontal and 01 for
vertical.
For the Size parameter, use 01 for the normal default size, 02 for x2
magnification, 03 for x3 magnification, ... , and 0A for x10
magnification.
NOTE: The Default font is bit-mapped and looks best when drawn in
size 1. In sizes greater than one, the individual pixels are
enlarged, giving a jagged look. This may not be the desired
effect. The fonts 1 - 4 are smooth scalable vector fonts.
RIP_PIXEL
---------
Function: Draws a one pixel using current drawing color
Level: 0
Command: X
Arguments: x:2, y:2
Format: !|X
Example: !|X1122
Uses Draw Color: YES
Uses Line Pattern: NO
Uses Line Thick: NO
Uses Fill Color: NO
Uses Fill Pattern: NO
Uses Write Mode: NO
Uses Font Sizes: NO
This command will draw a single pixel in the current drawing color at the
given (x,y) graphics position. This command is included for
completeness, but in practice it would be extremely inefficient to make
much use of it.
RIP_LINE
--------
Function: Draw a line in the current color/line style
Level: 0
Command: L
Arguments: x0:2, y0:2, x1:2, y1:2
Format: !|L
Example: !|L00010A0E
Uses Draw Color: YES
Uses Line Pattern: YES
Uses Line Thick: YES
Uses Fill Color: NO
Uses Fill Pattern: NO
Uses Write Mode: YES
Uses Font Sizes: NO
This command will draw a line in the current drawing color, using the
current line style, pattern and thickness. The line is drawn from (x0,y0)
to (x1,y1) in the graphics viewport.
RIP_RECTANGLE
-------------
Function: Draw a rectangle in current color/line style
Level: 0
Command: R
Arguments: x0:2, y0:2, x1:2, y1:2
Format: !|R
Example: !|R00010A0E
Uses Draw Color: YES
Uses Line Pattern: YES
Uses Line Thick: YES
Uses Fill Color: NO
Uses Fill Pattern: NO
Uses Write Mode: YES
Uses Font Sizes: NO
This command draws a rectangle in the current drawing color, using the
current line style, pattern and thickness. (x0,y0) and (x1,y1) are any
two opposing corners of the rectangle. If x0=x1 or y0=y1 then the
command will draw a single vertical or horizontal line. The rectangle
interior is not filled by RIP_RECTANGLE.
RIP_BAR
-------
Function: Draw solid, filled rectangle with fill color/pattern
Level: 0
Command: B
Arguments: x0:2, y0:2, x1:2, y1:2
Format: !|B
Example: !|B00010A0E
Uses Draw Color: NO
Uses Line Pattern: NO
Uses Line Thick: NO
Uses Fill Color: YES
Uses Fill Pattern: YES
Uses Write Mode: NO
Uses Font Sizes: NO
This command fills a rectangular region with the current fill color and
pattern. No border is drawn.
RIP_CIRCLE
----------
Function: Draw a circle in the current color and line thickness
Level: 0
Command: C
Arguments: x_center:2, y_center:2, radius:2
Format: !|C
Example: !|C1E180M
Uses Draw Color: YES
Uses Line Pattern: NO
Uses Line Thick: YES
Uses Fill Color: NO
Uses Fill Pattern: NO
Uses Write Mode: NO
Uses Font Sizes: NO
This command draws a circle in the current drawing color and line
thickness. The is in pixel units. This command understands
aspect ratios and will draw a truly circular circle instead of an oblong
circle (ellipse) like on other graphics systems. The aspect ratio is
currently based on the EGA 640x350 resolution and is understood by both
the GUI designer and the Terminal Program.
NOTE: This command uses the line thickness setting, but not the line
patterns. In other words, you can draw a circle with a thick
or a thin border, but not a dashed or dotted border.
RIP_OVAL
--------
Function: Draw elliptical arc in the current color/line style
Level: 0
Command: O
Arguments: x:2, y:2, st_ang:2, end_ang:2, x_rad:2, y_rad:2
Format: !|O
Example: 1E1A18003G150Z
Uses Draw Color: YES
Uses Line Pattern: NO
Uses Line Thick: YES
Uses Fill Color: NO
Uses Fill Pattern: NO
Uses Write Mode: NO
Uses Font Sizes: NO
This command draws an elliptical arc similar to the circular RIP_ARC
command. The center of the ellipse is (x,y) and the arc is drawn
starting from and proceeding counterclockwise to (see
RIP_ARC above for details).
The X radius is half the full width of the ellipse, the Y radius is half
the full height. The ellipse is drawn according to the current line
thickness, but the current line pattern has no effect.
RIP_FILLED_OVAL
---------------
Function: Draw filled ellipse using current color/fill pattern
Level: 0
Command: o
Arguments: x_center:2, y_center:2, x_rad:2, y_rad:2
Format: !|o
Example: !|o1G2B0M0G
Uses Draw Color: YES
Uses Line Pattern: NO
Uses Line Thick: YES
Uses Fill Color: YES
Uses Fill Pattern: YES
Uses Write Mode: NO
Uses Font Sizes: NO
This command draws a complete filled ellipse on the screen. The interior
of the ellipse is drawn using the current fill pattern and fill color.
The outline of the ellipse is drawn using the current drawing color and
line thickness.
RIP_ARC
-------
Function: Draw circular arc in current color/line thickness
Level: 0
Command: A
Arguments: x:2, y:2, start_ang:2, end_ang:2, radius:2
Format: !|A
Example: !|A1E18003G15
Uses Draw Color: YES
Uses Line Pattern: NO
Uses Line Thick: YES
Uses Fill Color: NO
Uses Fill Pattern: NO
Uses Write Mode: NO
Uses Font Sizes: NO
This command draws a circular arc, or a segment of a circle. Drawing
begins at and terminates at . The angles are
represented starting at zero for the 3 o'clock position and increasing
counterclockwise through a full circle to 360:
The arc drawing begins at the and continues counter-
clockwise to the . A full circle will be displayed if
=0 and =360. This command recognizes aspect ratios
like the circle command does. It does not take advantage of line
patterns but does comply with line thickness.
If both angles are equal, nothing is drawn.
RIP_OVAL_ARC
------------
Function: Draw an elliptical arc
Level: 0
Command: V
Arguments: x:2, y:2, st_ang:2, e_ang:2, radx:2 rady:2
Format: !|V
Example: !|V1E18003G151Q
Uses Draw Color: YES
Uses Line Pattern: NO
Uses Line Thick: YES
Uses Fill Color: NO
Uses Fill Pattern: NO
Uses Write Mode: NO
Uses Font Sizes: NO
This command draws an elliptical arc, or a segment of an ellipse. Drawing
begins at and terminates at . The angles are represented
starting at zero for 3 o'clock position and increasing counterclockwise
through a full ellipse at 360 degrees:
The arc drawing begins at the and continues counterclockwise to
the . A complete ellipse will be displayed if =0 and
=360. This command does not utilize "aspect ratios" because of
the nature of an Ellipse. It does not take advantage of line patterns
but does comply with line thickness.
RIP_PIE_SLICE
-------------
Function: Draws a circular pie slice
Level: 0
Command: I
Arguments: x:2, y:2, start_ang:2, end_ang:2, radius:2
Format: !|I
Example: !|I1E18003G15
Uses Draw Color: YES
Uses Line Pattern: NO
Uses Line Thick: YES
Uses Fill Color: YES
Uses Fill Pattern: YES
Uses Write Mode: NO
Uses Font Sizes: NO
This command draws a "pie slice". The slice is circular. It obeys all of
the same commands as the Arc command described above. The ends of the
arc are connected to the Center-Point of the Arc with two straight
lines. These two lines converge at the Center-Point. The interior of
the Slice is filled with the current Fill Color and Pattern. The
exterior (outline) of the Slice is drawn using the current drawing color
and line thickness. The Line Pattern feature does not apply to this
command.
RIP_OVAL_PIE_SLICE
------------------
Function: Draws an elliptical pie slice
Level: 0
Command: i
Arguments: x:2, y:2, st_ang:2, e_ang:2, radx:2 rady:2
Format: !|i
Example: !|i1E18003G151Q
Uses Draw Color: YES
Uses Line Pattern: NO
Uses Line Thick: YES
Uses Fill Color: YES
Uses Fill Pattern: YES
Uses Write Mode: NO
Uses Font Sizes: NO
This command draws an "elliptical pie slice". It obeys all of the same
commands as the Elliptical Arc command described above. The ends of the
arc are connected to the Center-Point of the Arc with two straight lines.
These two lines converge at the Center-Point. The interior of the Slice
is filled with the current Fill Color and Pattern. The exterior
(outline) of the Slice is drawn using the current drawing color and line
thickness. The Line Pattern feature does not apply to this command.
RIP_BEZIER
----------
Function: Draw a bezier curve
Level: 0
Command: Z
Arguments: x1:2 y1:2 x2:2 y2:2 x3:2 y3:2 x4:2 y4:2 cnt:2
Format: !|Z
Example: !|Z0A0B0C0D0E0F0G0H1G
Uses Draw Color: YES
Uses Line Pattern: YES
Uses Line Thick: YES
Uses Fill Color: NO
Uses Fill Pattern: NO
Uses Write Mode: YES
Uses Font Sizes: NO
This command provides customizable curves. Four control points are used
to create the shape of the curve. The curves beginning point is at point
(x1,y1) and it ends at (x4,y4). Points (x2,y2) and (x3,y3) are not
necessarily on the curve, but are used to pull the curve in their
direction. The diagram below indicates how points 2 and 3 can be
utilized to form the desired curve. Note that points 2 and 3 are not
actually on the curve, but points 1 and 4 are.
NOTE: Points 2 and 3 are not actually on the curve - points 1 and 4 are.
The last parameter of this command is the parameter. This
determines how many "segments" the curve should be drawn in. Each
segment is in fact, a straight line. The more segments you allow, the
smoother the curve may be. If a curve does not have a significant amount
of "curviness" then a low "count" can improve performance of the curve
drawing. Bezier Curves use "floating point" math internally for its
processing. All parameters specified for this command are simple
integers however.
RIP_POLYGON
-----------
Function: Draw a polygon in the current color, line style, thickness
Level: 0
Command: P
Arguments: npoints:2, x1:2, y1:2, ... xn:2, yn:2
Format: !|P ...
Example: !|P03010105090905
Uses Draw Color: YES
Uses Line Pattern: YES
Uses Line Thick: YES
Uses Fill Color: NO
Uses Fill Pattern: NO
Uses Write Mode: YES
Uses Font Sizes: NO
This command will draw a multi-sided closed polygon. The polygon is
drawn using the current drawing color, line pattern and thickness. The
parameter is between 2 and 512 and indicates how many (x,y)
coordinate pairs will follow, which is also the number of sides of the
polygon. The polygon interior is not filled by RIP_POLYGON.
The polygon is enclosed by the last vertex between xn,yn and x1,y1. In
other words, you do not have to connect the end to the beginning - it is
automatically done for you.
RIP_FILL_POLYGON
----------------
Function: Draw a filled polygon using drawing color & fill settings
Level: 0
Command: p
Arguments: npoints:2, x1:2, y1:2, ... xn:2, yn:2
Format: !|p ...
Example: !|p03010105050909
Uses Draw Color: YES
Uses Line Pattern: YES
Uses Line Thick: YES
Uses Fill Color: YES
Uses Fill Pattern: YES
Uses Write Mode: YES
Uses Font Sizes: NO
This command is identical to RIP_POLYGON, except that the interior of the
polygon is filled with the current fill color and fill pattern. The actual
outline of the polygon is drawn using the current drawing color, line
pattern and thickness.
NOTE: You will get unusual effects if the lines of the polygon overlap,
creating a polygon with internal "gaps". (The rule is this:
regions that are "inside" the polygon an even number of times
due to overlap are NOT filled.) The interior fill does not utilize
Write Mode, but the outline of the polygon does.
RIP_FILL
--------
Function: Flood fill screen area with the current fill settings
Level: 0
Command: F
Arguments: x:2, y:2, border:2
Format: !|F
Example: !|F25090F
Uses Draw Color: NO
Uses Line Pattern: NO
Uses Line Thick: NO
Uses Fill Color: YES
Uses Fill Pattern: YES
Uses Write Mode: NO
Uses Font Sizes: NO
This command performs a "flood fill" emanating from the given
point. The fill "oozes" in all directions up to color, but the
border itself is not changed. Whatever is inside the border that's not
the border color gets changed to the current fill color and fill
pattern. If the border color does not completely enclose the
point, the fill will continue to the edges of the viewport.
RIP_LINE_STYLE
--------------
Function: Defines a line style and thickness
Level: 0
Command: =
Arguments: style:2, user_pat:4, thick:2
Format: !|= |