Skip to content

Instantly share code, notes, and snippets.

@m0rb
Created May 14, 2022 13:13
Show Gist options
  • Save m0rb/b20a1eb13c2eaac552719a6bf6c9a9ea to your computer and use it in GitHub Desktop.
Save m0rb/b20a1eb13c2eaac552719a6bf6c9a9ea to your computer and use it in GitHub Desktop.
RIPscrip 2.0 Alpha 4 Spec
This file has been truncated, but you can view the full file.
TABLE OF CONTENTS
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
1 þ Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1 þ Use of the RIPscrip Language . . . . . . . . . . . . . . . . 3
1.2 þ Definition . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 þ How Does RIPscrip Work? . . . . . . . . . . . . . . . . . . . 5
1.4 þ Revision History Notation . . . . . . . . . . . . . . . . . . 6
1.4.1 þ Revision 2.A4 . . . . . . . . . . . . . . . . . . . . . . . . 7
1.4.2 þ Revision 2.A3 . . . . . . . . . . . . . . . . . . . . . . . . 10
1.4.3 þ Revision 2.A2 . . . . . . . . . . . . . . . . . . . . . . . . 11
1.4.4 þ Revision 2.A1 . . . . . . . . . . . . . . . . . . . . . . . . 13
1.4.5 þ Revision 2.A0 . . . . . . . . . . . . . . . . . . . . . . . . 17
1.5 þ Differences from 1.54 and 2.00 formats . . . . . . . . . . . 18
1.6 þ Backward Compatibility Topics . . . . . . . . . . . . . . . . 19
2 þ How RIPscrip is Designed - Fundamental Topics . . . . . . . . 20
2.1 þ Drawing Ports - What Are They? . . . . . . . . . . . . . . . 21
2.1.1 þ Screen Drawing Ports . . . . . . . . . . . . . . . . . . . . 22
2.1.2 þ Offscreen Drawing Ports (Clipboard Ports) . . . . . . . . . . 23
2.1.3 þ Ports and Coordinates . . . . . . . . . . . . . . . . . . . . 24
2.1.4 þ Ports and Viewports . . . . . . . . . . . . . . . . . . . . . 26
2.1.5 þ Ports, Viewports and Graphical Operations . . . . . . . . . . 28
2.1.6 þ Copying data from one port to another . . . . . . . . . . . . 29
2.2 þ Data Tables - A Fundamental 2.0 Concept . . . . . . . . . . . 31
2.2.1 þ Types of Data Tables . . . . . . . . . . . . . . . . . . . . 32
2.2.1.1 þ Drawing Port Table . . . . . . . . . . . . . . . . . . . . . 33
2.2.1.2 þ Color Palette Table . . . . . . . . . . . . . . . . . . . . . 34
2.2.1.3 þ Graphical Style Table . . . . . . . . . . . . . . . . . . . . 35
2.2.1.4 þ Button Style Table . . . . . . . . . . . . . . . . . . . . . 36
2.2.1.5 þ Text Window Table . . . . . . . . . . . . . . . . . . . . . . 37
2.2.1.6 þ Environment Table . . . . . . . . . . . . . . . . . . . . . . 38
2.2.1.7 þ Mouse Field Table . . . . . . . . . . . . . . . . . . . . . . 39
2.2.2 þ Protected Data Table Entries . . . . . . . . . . . . . . . . 40
2.3 þ Data Backup Areas . . . . . . . . . . . . . . . . . . . . . . 42
2.3.1 þ Data Backup Areas - Protection and Restoration . . . . . . . 47
2.3.2 þ Invidual Data Backup Areas . . . . . . . . . . . . . . . . . 48
2.3.2.1 þ Button Style Table Save Area . . . . . . . . . . . . . . . . 49
2.3.2.2 þ Graphical Style Table Save Area . . . . . . . . . . . . . . . 50
2.3.2.3 þ Drawing Port Table Save Area . . . . . . . . . . . . . . . . 51
2.3.2.4 þ Text Window Table Save Area . . . . . . . . . . . . . . . . . 52
2.3.2.5 þ Color Palette Table Save Area . . . . . . . . . . . . . . . . 53
2.3.2.6 þ Mouse Field Table Save Area . . . . . . . . . . . . . . . . . 54
2.3.2.7 þ Screen Save Area . . . . . . . . . . . . . . . . . . . . . . 55
2.3.2.8 þ Environment Table Save Area . . . . . . . . . . . . . . . . . 56
2.4 þ Numerical Parameters - Formats and Base-Math Variations . . . 58
2.5 þ World Coordinate Systems . . . . . . . . . . . . . . . . . . 61
2.6 þ The Mathematics of Graphics and Coordinates . . . . . . . . . 62
2.7 þ Color Palettes and Hardware - Color Translation . . . . . . . 70
2.7.1 þ Color Palettes and Hardware - The Drawing Palette . . . . . . 74
2.7.2 þ Color Palettes - Palette Mapping and Direct RGB Mode . . . . 76
2.7.3 þ Default RGB Values of Color Lookup Table . . . . . . . . . . 78
2.8 þ Audio (Sound and Music) Formats . . . . . . . . . . . . . . . 81
2.9 þ Text Windows and Terminal Emulation Protocols . . . . . . . . 82
2.10 þ Viewports and Text Windows - Overlapping Issues . . . . . . . 83
2.11 þ Miscellaneous Notes/Information . . . . . . . . . . . . . . . 84
3 þ RIPscrip Protocol Definition . . . . . . . . . . . . . . . . 85
3.1 þ ANSI Sequences (Auto-Sensing) . . . . . . . . . . . . . . . . 86
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
i
TABLE OF CONTENTS (continued)
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
3.2 þ RIPscrip Protocol - Syntax and General Structure . . . . . . 88
3.3 þ Description of RIPscrip Command Levels . . . . . . . . . . . 92
3.4 þ RIPscrip Command Reference . . . . . . . . . . . . . . . . . 93
3.4.1 þ Level-0 RIPscrip Commands . . . . . . . . . . . . . . . . . . 95
3.4.1.1 þ RIP_ARC . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
3.4.1.2 þ RIP_BACK_COLOR . . . . . . . . . . . . . . . . . . . . . . . 97
3.4.1.3 þ RIP_BAR . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
3.4.1.4 þ RIP_BEZIER . . . . . . . . . . . . . . . . . . . . . . . . . 99
3.4.1.5 þ RIP_CIRCLE . . . . . . . . . . . . . . . . . . . . . . . . . 100
3.4.1.6 þ RIP_COLOR . . . . . . . . . . . . . . . . . . . . . . . . . . 101
3.4.1.7 þ RIP_COMMENT . . . . . . . . . . . . . . . . . . . . . . . . . 104
3.4.1.8 þ RIP_ERASE_EOL . . . . . . . . . . . . . . . . . . . . . . . . 105
3.4.1.9 þ RIP_ERASE_VIEW . . . . . . . . . . . . . . . . . . . . . . . 106
3.4.1.10 þ RIP_ERASE_WINDOW . . . . . . . . . . . . . . . . . . . . . . 107
3.4.1.11 þ RIP_EXTENDED_FONT_STYLE . . . . . . . . . . . . . . . . . . . 108
3.4.1.12 þ RIP_EXTENDED_TEXT_WINDOW . . . . . . . . . . . . . . . . . . 111
3.4.1.13 þ RIP_FILL . . . . . . . . . . . . . . . . . . . . . . . . . . 115
3.4.1.14 þ RIP_FILL_PATTERN . . . . . . . . . . . . . . . . . . . . . . 116
3.4.1.15 þ RIP_FILL_STYLE . . . . . . . . . . . . . . . . . . . . . . . 118
3.4.1.16 þ RIP_FILLED_CIRCLE . . . . . . . . . . . . . . . . . . . . . . 121
3.4.1.17 þ RIP_FILLED_OVAL . . . . . . . . . . . . . . . . . . . . . . . 122
3.4.1.18 þ RIP_FILLED_POLYGON . . . . . . . . . . . . . . . . . . . . . 123
3.4.1.19 þ RIP_FILLED_POLY_BEZIER . . . . . . . . . . . . . . . . . . . 124
3.4.1.20 þ RIP_FILLED_RECTANGLE . . . . . . . . . . . . . . . . . . . . 125
3.4.1.21 þ RIP_FILLED_ROUNDED_RECT . . . . . . . . . . . . . . . . . . . 126
3.4.1.22 þ RIP_FONT_STYLE . . . . . . . . . . . . . . . . . . . . . . . 127
3.4.1.23 þ RIP_GOTOXY . . . . . . . . . . . . . . . . . . . . . . . . . 134
3.4.1.24 þ RIP_GROUP_BEGIN . . . . . . . . . . . . . . . . . . . . . . . 135
3.4.1.25 þ RIP_GROUP_END . . . . . . . . . . . . . . . . . . . . . . . . 136
3.4.1.26 þ RIP_HEADER . . . . . . . . . . . . . . . . . . . . . . . . . 137
3.4.1.27 þ RIP_HOME . . . . . . . . . . . . . . . . . . . . . . . . . . 140
3.4.1.28 þ RIP_LINE . . . . . . . . . . . . . . . . . . . . . . . . . . 141
3.4.1.29 þ RIP_LINE_STYLE . . . . . . . . . . . . . . . . . . . . . . . 142
3.4.1.30 þ RIP_MOVE . . . . . . . . . . . . . . . . . . . . . . . . . . 144
3.4.1.31 þ RIP_NO_MORE . . . . . . . . . . . . . . . . . . . . . . . . . 145
3.4.1.32 þ RIP_ONE_DRAWING_PALETTE . . . . . . . . . . . . . . . . . . . 146
3.4.1.33 þ RIP_ONE_PALETTE . . . . . . . . . . . . . . . . . . . . . . . 147
3.4.1.34 þ RIP_OVAL . . . . . . . . . . . . . . . . . . . . . . . . . . 148
3.4.1.35 þ RIP_OVAL_ARC . . . . . . . . . . . . . . . . . . . . . . . . 149
3.4.1.36 þ RIP_OVAL_PIE_SLICE . . . . . . . . . . . . . . . . . . . . . 150
3.4.1.37 þ RIP_PIE_SLICE . . . . . . . . . . . . . . . . . . . . . . . . 151
3.4.1.38 þ RIP_PIXEL . . . . . . . . . . . . . . . . . . . . . . . . . . 152
3.4.1.39 þ RIP_POLYGON . . . . . . . . . . . . . . . . . . . . . . . . . 153
3.4.1.40 þ RIP_POLYLINE . . . . . . . . . . . . . . . . . . . . . . . . 154
3.4.1.41 þ RIP_POLY_BEZIER . . . . . . . . . . . . . . . . . . . . . . . 155
3.4.1.42 þ RIP_POLY_BEZIER_LINE . . . . . . . . . . . . . . . . . . . . 159
3.4.1.43 þ RIP_RECTANGLE . . . . . . . . . . . . . . . . . . . . . . . . 160
3.4.1.44 þ RIP_RESET_WINDOWS . . . . . . . . . . . . . . . . . . . . . . 161
3.4.1.45 þ RIP_ROUNDED_RECT . . . . . . . . . . . . . . . . . . . . . . 162
3.4.1.46 þ RIP_SET_BASE_MATH . . . . . . . . . . . . . . . . . . . . . . 163
3.4.1.47 þ RIP_SET_BORDER . . . . . . . . . . . . . . . . . . . . . . . 164
3.4.1.48 þ RIP_SET_COLOR_MODE . . . . . . . . . . . . . . . . . . . . . 165
3.4.1.49 þ RIP_SET_COORDINATE_SIZE . . . . . . . . . . . . . . . . . . . 166
3.4.1.50 þ RIP_SET_DRAWING_PALETTE . . . . . . . . . . . . . . . . . . . 167
3.4.1.51 þ RIP_SET_PALETTE . . . . . . . . . . . . . . . . . . . . . . . 168
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
ii
TABLE OF CONTENTS (continued)
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
3.4.1.52 þ RIP_SET_WORLD_FRAME . . . . . . . . . . . . . . . . . . . . . 169
3.4.1.53 þ RIP_TEXT . . . . . . . . . . . . . . . . . . . . . . . . . . 172
3.4.1.54 þ RIP_TEXT_WINDOW . . . . . . . . . . . . . . . . . . . . . . . 173
3.4.1.55 þ RIP_TEXT_XY . . . . . . . . . . . . . . . . . . . . . . . . . 175
3.4.1.56 þ RIP_VIEWPORT . . . . . . . . . . . . . . . . . . . . . . . . 176
3.4.1.57 þ RIP_WRITE_MODE . . . . . . . . . . . . . . . . . . . . . . . 178
3.4.2 þ Level-1 RIPscrip Commands . . . . . . . . . . . . . . . . . . 180
3.4.2.1 þ RIP_BEGIN_TEXT . . . . . . . . . . . . . . . . . . . . . . . 181
3.4.2.2 þ RIP_BUTTON . . . . . . . . . . . . . . . . . . . . . . . . . 182
3.4.2.3 þ RIP_BUTTON_STYLE . . . . . . . . . . . . . . . . . . . . . . 185
3.4.2.4 þ RIP_COPY_BLIT . . . . . . . . . . . . . . . . . . . . . . . . 196
3.4.2.5 þ RIP_DEFINE . . . . . . . . . . . . . . . . . . . . . . . . . 197
3.4.2.6 þ RIP_END_TEXT . . . . . . . . . . . . . . . . . . . . . . . . 199
3.4.2.7 þ RIP_FILE_QUERY . . . . . . . . . . . . . . . . . . . . . . . 200
3.4.2.8 þ RIP_GET_IMAGE . . . . . . . . . . . . . . . . . . . . . . . . 201
3.4.2.9 þ RIP_IMAGE . . . . . . . . . . . . . . . . . . . . . . . . . . 202
3.4.2.10 þ RIP_IMAGE_STYLE . . . . . . . . . . . . . . . . . . . . . . . 203
3.4.2.11 þ RIP_KILL_ENCLOSED_MOUSE_FIELDS . . . . . . . . . . . . . . . 205
3.4.2.12 þ RIP_KILL_MOUSE_FIELDS . . . . . . . . . . . . . . . . . . . . 207
3.4.2.13 þ RIP_LOAD_BITMAP . . . . . . . . . . . . . . . . . . . . . . . 208
3.4.2.14 þ RIP_LOAD_ICON . . . . . . . . . . . . . . . . . . . . . . . . 212
3.4.2.15 þ RIP_MOUSE . . . . . . . . . . . . . . . . . . . . . . . . . . 214
3.4.2.16 þ RIP_PLAY_AUDIO . . . . . . . . . . . . . . . . . . . . . . . 216
3.4.2.17 þ RIP_PUT_IMAGE . . . . . . . . . . . . . . . . . . . . . . . . 217
3.4.2.18 þ RIP_QUERY . . . . . . . . . . . . . . . . . . . . . . . . . . 218
3.4.2.19 þ RIP_READ_SCENE . . . . . . . . . . . . . . . . . . . . . . . 221
3.4.2.20 þ RIP_REGION_TEXT . . . . . . . . . . . . . . . . . . . . . . . 222
3.4.2.21 þ RIP_SCROLL . . . . . . . . . . . . . . . . . . . . . . . . . 223
3.4.2.22 þ RIP_SET_MOUSE_CURSOR . . . . . . . . . . . . . . . . . . . . 224
3.4.2.23 þ RIP_WRITE_ICON . . . . . . . . . . . . . . . . . . . . . . . 225
3.4.3 þ Level-2 RIPscrip Commands . . . . . . . . . . . . . . . . . . 226
3.4.3.1 þ RIP_DEFINE_PORT . . . . . . . . . . . . . . . . . . . . . . . 227
3.4.3.2 þ RIP_DELETE_PORT . . . . . . . . . . . . . . . . . . . . . . . 229
3.4.3.3 þ RIP_PORT_COPY . . . . . . . . . . . . . . . . . . . . . . . . 230
3.4.3.4 þ RIP_PORT_WRITE . . . . . . . . . . . . . . . . . . . . . . . 232
3.4.3.5 þ RIP_SET_REFRESH . . . . . . . . . . . . . . . . . . . . . . . 233
3.4.3.6 þ RIP_SWITCH_BUTTON_STYLE . . . . . . . . . . . . . . . . . . . 234
3.4.3.7 þ RIP_SWITCH_ENVIRONMENT . . . . . . . . . . . . . . . . . . . 235
3.4.3.8 þ RIP_SWITCH_PALETTE . . . . . . . . . . . . . . . . . . . . . 236
3.4.3.9 þ RIP_SWITCH_PORT . . . . . . . . . . . . . . . . . . . . . . . 237
3.4.3.10 þ RIP_SWITCH_TEXT_WINDOW . . . . . . . . . . . . . . . . . . . 238
3.4.3.11 þ RIP_SWITCH_STYLE . . . . . . . . . . . . . . . . . . . . . . 239
3.4.4 þ Level-3 RIPscrip Commands . . . . . . . . . . . . . . . . . . 240
3.4.4.1 þ RIP_BAUD_EMULATION . . . . . . . . . . . . . . . . . . . . . 241
3.4.4.2 þ RIP_DELAY . . . . . . . . . . . . . . . . . . . . . . . . . . 242
3.4.5 þ Level-9 RIPscrip Commands . . . . . . . . . . . . . . . . . . 243
3.4.5.1 þ RIP_ENTER_BLOCK_MODE . . . . . . . . . . . . . . . . . . . . 244
3.4.5.2 þ RIP_BEGIN_UUENCODE_BLOCK . . . . . . . . . . . . . . . . . . 247
4 þ Host Commands - a Tutorial and Reference Section . . . . . . 248
4.1 þ Control Characters . . . . . . . . . . . . . . . . . . . . . 249
4.2 þ Text Variables . . . . . . . . . . . . . . . . . . . . . . . 250
4.2.1 þ Text Variable Creation and Query . . . . . . . . . . . . . . 252
4.2.1.1 þ Pre-Defined Text Variables . . . . . . . . . . . . . . . . . 253
4.2.1.2 þ What Are User Variables . . . . . . . . . . . . . . . . . . . 254
4.2.1.3 þ How Can User Variables Be Important . . . . . . . . . . . . . 255
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
iii
TABLE OF CONTENTS (continued)
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
4.2.1.4 þ Creating User Variables . . . . . . . . . . . . . . . . . . . 256
4.2.1.5 þ Defining Text Variables . . . . . . . . . . . . . . . . . . . 257
4.2.1.6 þ Querying Text Variables . . . . . . . . . . . . . . . . . . . 258
4.2.1.7 þ Examples of Text Variable Query . . . . . . . . . . . . . . . 259
4.2.1.8 þ Defining Permanent Variables . . . . . . . . . . . . . . . . 260
4.2.1.9 þ User Defined Variables and Data Security . . . . . . . . . . 265
4.2.1.10 þ User Defined Data Variable Format Options . . . . . . . . . . 266
4.2.1.11 þ Limits on Length of Variable Names, Etc. . . . . . . . . . . 267
4.2.1.12 þ Examples of User-Defined Text Variables . . . . . . . . . . . 268
4.3 þ Local RIPscrip File Playback . . . . . . . . . . . . . . . . 269
4.4 þ Local Audio File Playback . . . . . . . . . . . . . . . . . . 270
4.5 þ Local Bitmap File Playback . . . . . . . . . . . . . . . . . 271
4.6 þ Local Image File Playback . . . . . . . . . . . . . . . . . . 272
4.7 þ Pop-Up Lists . . . . . . . . . . . . . . . . . . . . . . . . 273
4.8 þ Templates . . . . . . . . . . . . . . . . . . . . . . . . . . 275
4.8.1 þ Basic Template Mechanics . . . . . . . . . . . . . . . . . . 277
4.8.2 þ Radio Button and Check-Box Templates . . . . . . . . . . . . 278
4.8.3 þ Taking Advantage of Templates . . . . . . . . . . . . . . . . 280
4.8.4 þ Embedded Templates . . . . . . . . . . . . . . . . . . . . . 281
4.8.5 þ Template Chaining . . . . . . . . . . . . . . . . . . . . . . 283
4.8.6 þ Advanced Template Concepts . . . . . . . . . . . . . . . . . 286
4.8.7 þ Host Command Language and Templates . . . . . . . . . . . . . 288
4.8.8 þ Processing of Templates . . . . . . . . . . . . . . . . . . . 290
4.8.9 þ Command Block Segmentation and Templates . . . . . . . . . . 291
4.8.10 þ Command Blocks, Radio and Check Box Templates . . . . . . . . 293
4.9 þ Host Command Directives - What Can Go Where? . . . . . . . . 294
4.10 þ Things to Take Special Care With Host Commands . . . . . . . 295
5 þ Text Variable Reference . . . . . . . . . . . . . . . . . . . 296
5.1 þ Text Variable Syntax Descriptions . . . . . . . . . . . . . . 297
5.2 þ Version Number and Vendor Text Variables . . . . . . . . . . 300
5.2.1 þ $IFS$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
5.2.2 þ $NULL$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
5.2.3 þ $RIPVER$ . . . . . . . . . . . . . . . . . . . . . . . . . . 303
5.2.4 þ $TERMINFO$ . . . . . . . . . . . . . . . . . . . . . . . . . 303
5.3 þ Date and Time Text Variables . . . . . . . . . . . . . . . . 304
5.3.1 þ $ADOW$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
5.3.2 þ $AMPM$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
5.3.3 þ $DATE$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
5.3.4 þ $DATETIME$ . . . . . . . . . . . . . . . . . . . . . . . . . 305
5.3.5 þ $DAY$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
5.3.6 þ $DOW$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
5.3.7 þ $DOY$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
5.3.8 þ $FYEAR$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
5.3.9 þ $HOUR$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
5.3.10 þ $MHOUR$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
5.3.11 þ $MIN$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
5.3.12 þ $MONTH$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
5.3.13 þ $MONTHNUM$ . . . . . . . . . . . . . . . . . . . . . . . . . 308
5.3.14 þ $SEC$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
5.3.15 þ $TIME$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
5.3.16 þ $TIMEZONE$ . . . . . . . . . . . . . . . . . . . . . . . . . 308
5.3.17 þ $WDAY$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
5.3.18 þ $WOY$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
5.3.19 þ $WOYM$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
5.3.20 þ $YEAR$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
iv
TABLE OF CONTENTS (continued)
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
5.4 þ Sound Related Text Variables . . . . . . . . . . . . . . . . 311
5.4.1 þ $ALARM$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
5.4.2 þ $BEEP$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
5.4.3 þ $BLIP$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
5.4.4 þ $MUSIC$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
5.4.5 þ $PHASER$ . . . . . . . . . . . . . . . . . . . . . . . . . . 313
5.4.6 þ $REVPHASER$ . . . . . . . . . . . . . . . . . . . . . . . . . 314
5.4.7 þ $T$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
5.5 þ Mouse Related Text Variables . . . . . . . . . . . . . . . . 317
5.5.1 þ $M$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
5.5.2 þ $MCURSOR$ . . . . . . . . . . . . . . . . . . . . . . . . . . 317
5.5.3 þ $MSTAT$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
5.5.4 þ $X$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
5.5.5 þ $XY$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
5.5.6 þ $XYM$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
5.5.7 þ $Y$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
5.6 þ Text Window Related Text Variables . . . . . . . . . . . . . 322
5.6.1 þ $ATW$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
5.6.2 þ $COFF$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
5.6.3 þ $CON$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
5.6.4 þ $CURSOR$ . . . . . . . . . . . . . . . . . . . . . . . . . . 324
5.6.5 þ $CURX$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
5.6.6 þ $CURY$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
5.6.7 þ $DTW$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
5.6.8 þ $ETW$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
5.6.9 þ $ISEXTWIN$ . . . . . . . . . . . . . . . . . . . . . . . . . 327
5.6.10 þ $MTW$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
5.6.11 þ $RTW$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
5.6.12 þ $STW$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
5.6.13 þ $TWERASEEOL$ . . . . . . . . . . . . . . . . . . . . . . . . 330
5.6.14 þ $TWFONT$ . . . . . . . . . . . . . . . . . . . . . . . . . . 330
5.6.15 þ $TWGOTO$ . . . . . . . . . . . . . . . . . . . . . . . . . . 331
5.6.16 þ $TWH$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
5.6.17 þ $TWHOME$ . . . . . . . . . . . . . . . . . . . . . . . . . . 334
5.6.18 þ $TWIN$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
5.6.19 þ $TWW$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
5.6.20 þ $TWX0$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
5.6.21 þ $TWX1$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
5.6.22 þ $TWY0$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
5.6.23 þ $TWY1$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
5.7 þ Port/Viewport Related Text Variables . . . . . . . . . . . . 344
5.7.1 þ $AVP$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
5.7.2 þ $DVP$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
5.7.3 þ $EGW$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
5.7.4 þ $MVP$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
5.7.5 þ $OFFSCREEN$ . . . . . . . . . . . . . . . . . . . . . . . . . 347
5.7.6 þ $PORTH$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
5.7.7 þ $PORTW$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
5.7.8 þ $PORTX0$ . . . . . . . . . . . . . . . . . . . . . . . . . . 349
5.7.9 þ $PORTX1$ . . . . . . . . . . . . . . . . . . . . . . . . . . 350
5.7.10 þ $PORTY0$ . . . . . . . . . . . . . . . . . . . . . . . . . . 351
5.7.11 þ $PORTY1$ . . . . . . . . . . . . . . . . . . . . . . . . . . 351
5.8 þ Terminal Operation Text Variables . . . . . . . . . . . . . . 352
5.8.1 þ $APP$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
5.8.2 þ $APPx$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
v
TABLE OF CONTENTS (continued)
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
5.8.3 þ $BAUDEMUL$ . . . . . . . . . . . . . . . . . . . . . . . . . 353
5.8.4 þ $D$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
5.8.5 þ $DWAYOFF$ . . . . . . . . . . . . . . . . . . . . . . . . . . 354
5.8.6 þ $DWAYON$ . . . . . . . . . . . . . . . . . . . . . . . . . . 354
5.8.7 þ $FILEDEL$ . . . . . . . . . . . . . . . . . . . . . . . . . . 354
5.8.8 þ $HKEYOFF$ . . . . . . . . . . . . . . . . . . . . . . . . . . 355
5.8.9 þ $HKEYON$ . . . . . . . . . . . . . . . . . . . . . . . . . . 355
5.8.10 þ $NOREFRESH$ . . . . . . . . . . . . . . . . . . . . . . . . . 355
5.8.11 þ $OPTION$ . . . . . . . . . . . . . . . . . . . . . . . . . . 356
5.8.12 þ $REFRESH$ . . . . . . . . . . . . . . . . . . . . . . . . . . 357
5.8.13 þ $SBAROFF$ . . . . . . . . . . . . . . . . . . . . . . . . . . 357
5.8.14 þ $SBARON$ . . . . . . . . . . . . . . . . . . . . . . . . . . 357
5.8.15 þ $STATBAR$ . . . . . . . . . . . . . . . . . . . . . . . . . . 358
5.8.16 þ $TABOFF$ . . . . . . . . . . . . . . . . . . . . . . . . . . 358
5.8.17 þ $TABON$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
5.8.18 þ $VT102OFF$ . . . . . . . . . . . . . . . . . . . . . . . . . 358
5.8.19 þ $VT102ON$ . . . . . . . . . . . . . . . . . . . . . . . . . . 359
5.9 þ RIPscrip Reset Related Text Variables . . . . . . . . . . . . 360
5.9.1 þ $RESET$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
5.10 þ RIPscrip Environment Configuration Text Variables . . . . . . 366
5.10.1 þ $BASEMATH$ . . . . . . . . . . . . . . . . . . . . . . . . . 366
5.10.2 þ $CLS$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
5.10.3 þ $COLORMODE$ . . . . . . . . . . . . . . . . . . . . . . . . . 367
5.10.4 þ $COLORS$ . . . . . . . . . . . . . . . . . . . . . . . . . . 368
5.10.5 þ $COMPAT$ . . . . . . . . . . . . . . . . . . . . . . . . . . 368
5.10.6 þ $COORDSIZE$ . . . . . . . . . . . . . . . . . . . . . . . . . 369
5.10.7 þ $ISPALETTE$ . . . . . . . . . . . . . . . . . . . . . . . . . 369
5.10.8 þ $RBS$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
5.10.9 þ $RCP$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
5.10.10 þ $RENV$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
5.10.11 þ $RESTOREALL$ . . . . . . . . . . . . . . . . . . . . . . . . 371
5.10.12 þ $RESX$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
5.10.13 þ $RESY$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
5.10.14 þ $RGS$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
5.10.15 þ $PALENTRY$ . . . . . . . . . . . . . . . . . . . . . . . . . 373
5.10.16 þ $SAVEALL$ . . . . . . . . . . . . . . . . . . . . . . . . . . 374
5.10.17 þ $SBS$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
5.10.18 þ $SCP$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
5.10.19 þ $SENV$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
5.10.20 þ $SGS$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
5.10.21 þ $WORLD$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
5.10.22 þ $WORLDH$ . . . . . . . . . . . . . . . . . . . . . . . . . . 378
5.10.23 þ $WORLDW$ . . . . . . . . . . . . . . . . . . . . . . . . . . 379
5.11 þ Clipboard Related Text Variables . . . . . . . . . . . . . . 380
5.11.1 þ $PCB$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
5.11.2 þ $RCB$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
5.11.3 þ $SCB$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
5.12 þ Mouse Field Related Text Variables . . . . . . . . . . . . . 383
5.12.1 þ $MKILL$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
5.12.2 þ $RMF$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
5.12.3 þ $SMF$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
5.13 þ Screen Related Text Variables . . . . . . . . . . . . . . . . 386
5.13.1 þ $RESTORE$ . . . . . . . . . . . . . . . . . . . . . . . . . . 386
5.13.2 þ $RESTOREx$ . . . . . . . . . . . . . . . . . . . . . . . . . 386
5.13.3 þ $SAVE$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
vi
TABLE OF CONTENTS (continued)
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
5.13.4 þ $SAVEx$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
5.14 þ Data Table and Backup Area Text Variables . . . . . . . . . . 389
5.14.1 þ $BACKSTAT$ . . . . . . . . . . . . . . . . . . . . . . . . . 389
5.14.2 þ $COPY$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
5.14.3 þ $CUR$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
5.14.4 þ $INUSE$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
5.14.5 þ $ISPROT$ . . . . . . . . . . . . . . . . . . . . . . . . . . 397
5.14.6 þ $PROT$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
5.14.7 þ $UNPROT$ . . . . . . . . . . . . . . . . . . . . . . . . . . 400
6 þ RIPscrip Icon File Format Specification . . . . . . . . . . . 402
6.1 þ Device Independent Bitmap (DIB) File Format . . . . . . . . . 403
6.1.1 þ DIB File Header . . . . . . . . . . . . . . . . . . . . . . . 404
6.1.2 þ DIB Color Table Format . . . . . . . . . . . . . . . . . . . 406
6.1.3 þ DIB Bitmap Data Block Format . . . . . . . . . . . . . . . . 407
6.1.4 þ DIB Miscellaneous Notes . . . . . . . . . . . . . . . . . . . 409
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
vii
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º º°°
º RIPscrip Graphics Protocol º°°
º Language Technical Reference º°°
º ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ º°°
º Copyright (c) 1992-1994 º°°
º TeleGrafix Communications, Inc. º°°
º All Rights Reserved º°°
º ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ º°°
º VERSION 2.00 º°°
º REVISION ALPHA 4 º°°
º ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ º°°
º (proposed enhancements) º°°
º º°°
º ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ º°°
º ³ CONFIDENTIAL! ³ º°°
º ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ º°°
º º°°
º December 13th, 1994 º°°
º º°°
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ°°
°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 1
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 1 þ 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, RIPdraw, RIPterm or RIPscrip
development tools (RIP2C, RIP2PAS, etc), contact:
TeleGrafix Communications, Inc.
16458 Bolsa Chica #15
Huntington Beach, CA 92649
VOICE: (714) 379-2131
FAX : (714) 379-2132
BBS : (714) 379-2133
Internet:rip.support@telegrafix.com
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 2
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 1.1 þ USE OF THE 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.
You may also not use any of the preceding names in your product > v2.A3
literature without prior written consent from an officer of > v2.A3
TeleGrafix Communications, Inc. > v2.A3
If you have any questions regarding these issues, contact TeleGrafix
Communications, Inc. at (714) 379-2131.
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 3
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 1.2 þ 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.
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 4
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 1.3 þ 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 or RIPdraw for example). The
language is open ended enough so that literally billions of different
graphics commands can be implemented as needed. RIPscrip is not a
proprietary protocol standard, otherwise you wouldn't be reading this
document. It 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 allowed for 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, lines, circles,
curves, 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.
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 5
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 1.4 þ REVISION HISTORY NOTATION º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
This document is a historical document. Periodically throughout the > v1.54
text are things that were added to the specification at specific > v1.54
revisions. These additions/changes can be easily pinpointed by > v1.54
looking for notation symbols in the right margin of the document. If > v1.54
you notice to the right of this paragraph are the symbols "> v1.54" > v1.54
which indicate that this section was added in the v1.54 revision of > v1.54
the RIPscrip Protocol Specification. This notational convenience was > v1.54
added to make quick determination of new changes fast and easy. > v1.54
THIS VERSION OF THE RIP 2.0 SPECIFICATION IS AN ONGOING CULMINATION > v2.A0
OF THINGS AND IDEAS FROM MANY PEOPLE. WITH THAT IN MIND, THERE ARE > v2.A0
GOING TO BE NUMEROUS REVISIONS OF THE DOCUMENT, SO WE ARE > v2.A3
USING A SPECIAL NOTATIONAL CONVENTION IN THE RIGHT MARGIN FOR > v2.A0
THE SPECIFICATION. THE FIRST REVISION OF THE DOCUMENT > v2.A0
WILL HAVE "v.2A0" TO INDICATE V2.0 REVISION A0 (ALPHA 0). EACH > v2.A0
SUB-REVISION OF THIS DOCUMENT WILL INCREMENT THE 0 TO A HIGHER > v2.A0
VALUE. IF WE GO BEYOND 9 (WE HOPE NOT), THEN WE'LL CHANGE "A" TO > v2.A0
"B", AND SO ON, AND SO ON... > v2.A0
The following sub-sections give detailed information about what has > v2.A4
changed in each sub-revision of the RIPscrip specification. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 6
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 1.4.1 þ REVISION 2.A4 ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
þ Changed some of the parameters for user defined text > v2.A4
variables. Specifically, we removed "DATE" and "DECIMAL", > v2.A4
renamed "NAME" to "TONAME", and added "TOLOWER" and "TOUPPER". > v2.A4
In addition, we clearly defined that two parameters are > v2.A4
allowed for this variable - a mode parameter and a conversion > v2.A4
parameter. > v2.A4
þ Removed justify values 2-3 from the RIP_REGION_TEXT command. > v2.A4
þ Reformatted this document - giving it section numbers, a table > v2.A4
of contents, and better diagrams. This should make printing > v2.A4
out the specification and working with a printed copy much > v2.A4
easier for everyone! This was done due to popular demand. > v2.A4
þ Added two new commands for switching (they weren't in the > v2.A4
previous specs): > v2.A4
RIP_SWITCH_BUTTON_STYLE > v2.A4
RIP_SWITCH_ENVIRONMENT > v2.A4
þ Removed the <slot> parameter from the RIP_BUTTON_STYLE > v2.A4
command. This command should redefine the current button > v2.A4
style - allowing it to directly manipulate specific button > v2.A4
style entries goes against the symmetry of the data table > v2.A4
system and the rest of RIPscrip's commands that work with > v2.A4
them. > v2.A4
þ Order of operation of resident query expressions has been > v2.A4
clearly defined. > v2.A4
þ Removed the <slot> parameter from the RIP_BUTTON command. > v2.A4
This was changed to a reserved parameter. See the previous > v2.A4
item for a description of why we did this. > v2.A4
þ The parameters of the RIP_LOAD_BITMAP command have been > v2.A4
altered. Specifically, the <duplicate>, <palette> and > v2.A4
<dither> parameters were removed and moved into a single > v2.A4
<flags> parameter. Additionally, a new flag was added > v2.A4
at the same time for "transparency color". Also a new > v2.A4
parameter was added called <trans_color> which specifies > v2.A4
which color is to be transparent in a BMP file. The > v2.A4
reserved parameter was increased to 4 bytes in size after > v2.A4
all is said and done to give future grown potential. > v2.A4
þ Re-documented color palette independence and situations > v2.A4
relating to color palettes, and color palette mapping. > v2.A4
þ Renamed VIEWX0, VIEWY0, VIEWX1, VIEWY1, VIEWX and VIEWY text
variables to PORTX0, PORTY0, PORTX1, PORTY1, PORTW, and PORTH
respectively.
þ Added new text variables:
$SGS$ ... Save graphics style
$RGS$ ... Restore graphics style
$SBS$ ... Save button style
$RBS$ ... Restore button style
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 7
$OFFSCREEN$ ... Determine offscreen pixel data
$BACKSTAT$ ... Get status of backup area
$ISEXTWIN$ ... Is a text window an extended text window?
þ Renamed the $SWITCH$ variable to $CUR$ and enhanced its
capabilities.
þ Enhanced the $RESET$ text variable definition.
þ Removed the following text variables:
$CLIP2CLIPOK$
$CLIPSAVEOK$
$STACKPOS$
$STACKCLEAR$
þ Added syntax diagrams for every text variable definition to
make the possible parameters much easier to determine.
þ Completely redesigned the $INUSE$, $PROT$, $UNPROT$ and
$ISPROT$ text variables. The new variations are much simpler
in nature and less cumbersome to work with.
þ Removed all references to the "drawing coordinate frame" > v2.A4
þ Documented the RIP_EXTENDED_TEXT_WINDOW command for resolution > v2.A4
independent text windows. > v2.A4
þ Revised the text variable system for the extended text window > v2.A4
definition. > v2.A4
þ Revised the RIP_KILL_ENCLOSED_MOUSE_FIELDS command to work > v2.A4
a bit more efficiently. > v2.A4
þ Removed the $TEXTQUERY$ and $VIEWQUERY$ text variables. They > v2.A4
were redundant, and not sufficient to deal with resolution > v2.A4
independent text windows, and viewports were simply redundant > v2.A4
so the command wasn't necessary. > v2.A4
þ Revised the definitions of the following text variables: > v2.A4
$TWH$ $TWY1$ > v2.A4
$TWW$ $TWIN$ > v2.A4
$TWHOME$ $CURX$ > v2.A4
$TWGOTO$ $CURY$ > v2.A4
$TWERASEEOL$ $CURSOR$ > v2.A4
$TWX0$ $CON$ > v2.A4
$TWY0$ $COFF$ > v2.A4
$TWX1$ $TWFONT$ > v2.A4
þ Revised the keywords for some text variables that used the > v2.A4
keyword "VIDEO" to indicate hardware device pixel coordinates > v2.A4
instead of world coordinate pixels. These new keywords are > v2.A4
now "DEVICE" instead for future extensibility with other > v2.A4
display environments (eg, hardcopy, etc). > v2.A4
þ Enhanced the documentation of "filled regions" to encompass > v2.A4
filled polygons and curved surfaces - now these situations > v2.A4
are clearly documented. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 8
þ Revised diagrams to be more understandable throughout the > v2.A4
specification. > v2.A4
þ Revised and enhanced the $RESET$ text variable to accomodate > v2.A4
more situations which were overlooked in its original > v2.A4
definition. > v2.A4
þ Documented exactly what gets saved in each data backup area. > v2.A4
þ Text windows and viewports that used to be referred to as > v2.A4
"disabled" or "enable" are now using the new terminology of > v2.A4
"deactivated" and "activated". This is to help distinguish > v2.A4
between the concept of a text window or viewport that is > v2.A4
"defined", as opposed to "active", as opposed to "current". > v2.A4
þ Completely re-wrote the documentation on data tables and > v2.A4
data backup areas to be clearer on the concepts involved and > v2.A4
how "protection" works with data tables, and data backup > v2.A4
areas. The data save stack and data save slot systems have > v2.A4
been completley revised to be more "generic" and easier to > v2.A4
implement on a target RIPscrip system. Base save areas > v2.A4
can no longer be protected. > v2.A4
þ Added a new graphical file format to the "image style" > v2.A4
command. RIPscrip 2.0 now supports GIF (Graphics Interchange > v2.A4
Format) files in addition to JPEG files. This was added due > v2.A4
to popular demand because JPEG doesn't handle line art or > v2.A4
fine-detail graphics anywhere near as well as GIF does both > v2.A4
in terms of size, and quality. Also, GIF supports interleaved > v2.A4
images which provide the user with nearly "immediate > v2.A4
gratification" when an interleaved image is being displayed. > v2.A4
þ Added another protocol to the list of protocols supported in > v2.A4
the RIP_ENTER_BLOCK_MODE command. It is Super Kermit and it > v2.A4
is assigned protocol #9 for block mode. The $IFS$ protocol > v2.A4
keyword for this protocol is "SUPERKERMIT". > v2.A4
þ Removed the $TERMNAME$, $TERMMFG$ and $TERMVER$ text > v2.A4
variables. Renamed the $TERMDATA$ variable to $TERMINFO$ > v2.A4
and gave it parameters to cover the removal of the other > v2.A4
three variables. This makes the vendor-specific text > v2.A4
variables more generic and flexible in nature. > v2.A4
þ Altered the multi-lingual support definitions in the spec. > v2.A4
Before, we were identifying languages by the three character > v2.A4
codes used to represent countries in the Olympics (USA, JAP, > v2.A4
SPN, etc). Since many countries have many different > v2.A4
languages, we are changing our strategy to a new coding scheme > v2.A4
designed to explicitly identify the language, not the country > v2.A4
that the user wants. > v2.A4
þ The $FEATURE$ text variable has been renamed to $OPTION$ to > v2.A4
more closely identify its purpose - to enable or disable > v2.A4
specific system options. > v2.A4
þ The $IFS$ (is feature supported) text variable has been > v2.A4
enhanced to work with the concept of "categories". This makes > v2.A4
it so the host can query back pieces of information about > v2.A4
specific topics (eg, "what protocols are supported", "what > v2.A4
image formats are supported", etc). > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 9
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 1.4.2 þ REVISION 2.A3 ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
þ Added the RIP_SWITCH_PALETTE command to switch from one > v2.A3
palette slot entry to another. > v2.A3
þ Added the RIP_FILE_DELETE command to remove unneeded JPEG > v2.A3
or WAVE files off the user's hard disk so that they don't > v2.A3
clutter things up when they're no longer needed. > v2.A3
þ Added the RIP_ROUNDED_RECT and RIP_FILLED_ROUNDED_RECT > v2.A3
commands to make rounded rectangles. > v2.A3
þ Added the RIP_ROUNDED_RECT and RIP_FILLED_ROUNDED_RECT > v2.A3
commands to make rectangles with rounded corners. > v2.A3
þ Added the new port-based definitions for creating and working > v2.A3
with on-screen and off-screen drawable areas. This technology > v2.A3
upgrades the previous clipboard technology, and gives RIPscrip > v2.A3
the ability to be able to draw to offscreen bitmaps. The new > v2.A3
port-related commands are: RIP_DEFINE_PORT, RIP_SWITCH_PORT, > v2.A3
RIP_DELETE_PORT, RIP_PORT_COPY, and RIP_PORT_WRITE. > v2.A3
þ RIP_SWITCH_TEXT_WINDOW had it's command character changed to > v2.A3
be compatible with the new port commands. > v2.A3
þ RIP_SWITCH_VIEWPORT had it's command character changed to > v2.A3
be compatible with the new port commands. > v2.A3
þ Added the RIP_PLAY_AUDIO command to playback a WAVE file. > v2.A3
þ Removed the RIP_SCROLLER and the Form related text variables. > v2.A3
This was necessary to get RIPscrip 2.0 out the door. These > v2.A3
commands and a couple others (eg, RIP_ANIMATE, etc) will > v2.A3
probably work their way into a future version of the > v2.A3
specification. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 10
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 1.4.3 þ REVISION 2.A2 ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
þ Documented standard for setting and determining foreign > v2.A2
language support. > v2.A2
þ Added two new level 0 commands for creating groups of RIPscrip > v2.A2
commands. These new commands are RIP_GROUP_BEGIN and > v2.A2
RIP_GROUP_END. These are designed for a paint program to be > v2.A2
able to group a number of RIPscrip commands and have them be > v2.A2
treated as one object for the purpose of editing and moving. > v2.A2
The terminal program just ignores these commands. > v2.A2
þ Added a new <no_border> parameter to the RIP_FILL_STYLE > v2.A2
command. This new parm lets RIPscrip draw filled objects > v2.A2
without a border. This was accomplished by splitting the two > v2.A2
byte <pattern> parameter into two one-byte parameters. This > v2.A2
makes the new version of the command backwards compatible. > v2.A2
þ Added RIP_FILLED_RECTANGLE command to complement the new > v2.A2
<no_border> parameter of the RIP_FILL_STYLE command. RIP_BAR > v2.A2
could not be updated because by default it has no border, and > v2.A2
for backwards compatibility, the border would have to be on > v2.A2
by default. Therefore, the new filled rectangle command. > v2.A2
þ RIP_EXTENDED_FONT has been renamed RIP_EXTENDED_FONT_STYLE, > v2.A2
and also expended for furture use so that someday font > v2.A2
rotation can be expressed in 1/10's of degrees, and four > v2.A2
reserved bytes were added just in case! > v2.A2
þ Added RIP_POLY_BEZIER_LINE so that you can create a > v2.A2
poly-bezier that does not have it's endpoints connected. > v2.A2
þ Added RIP_FILLED_POLY_BEZIER so that you can create a filled > v2.A2
poly-bezier object. > v2.A2
þ Added RIP_FILLED_CIRCLE for a two-byte shorter filled circle > v2.A2
than you can get using RIP_FILLED_OVAL. > v2.A2
þ RIP_FILL_POLYGON was renamed to RIP_FILLED_POLYGON for > v2.A2
consistency with the naming of other filled objects. > v2.A2
þ Changed all icon references to the new icon, hot icon, and > v2.A2
icon mask extensions (.ICN is now .BMP, .HIC is now .BMH, and > v2.A2
.MSK is now .BMM) > v2.A2
þ Added <scale> parameter to the RIP_LOAD_ICON command > v2.A2
þ Documented rename of RIP_COPY_REGION to RIP_SCROLL > v2.A2
þ RIP_POLY_BEZIER added in v2.A1 > v2.A2
þ RIP_COPY_BLIT added in v2.A1 > v2.A2
þ LOAD_BITMAP added in v2.A1 > v2.A2
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 11
þ Made corrections to the spec so that all the commands using > v2.A2
clipboard slots specify how the slots are being used in the > v2.A2
command set. > v2.A2
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 12
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 1.4.4 þ REVISION 2.A1 ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
þ Added the ability to embed raw UU-Encoded data blocks inside > v2.A1
RIPscrip encoded files. This allows you to transmit bitmaps, > v2.A1
sound files, and other raw generic binary data over 7-bit > v2.A1
ASCII text connections (like Internet, CompuServe, etc). > v2.A1
þ Added some extra text variables for the purpose of extended > v2.A1
vendor determination. Variables for determining the name > v2.A1
of the manufacturer, name of the terminal program, actual > v2.A1
version number of the terminal, and arbitrary vendor specific > v2.A1
data have been supplied for the most flexibility. This > v2.A1
method of determining vendor information is more generic > v2.A1
and easier to work with than the vendor-codes used in the > v2.A1
$RIPVER$ text variable and the Query RIPscrip version ANSI > v2.A1
command. In effect, the old method of determining vendor > v2.A1
codes is obsolete. > v2.A1
þ Added a new command for the creation and manipulation of > v2.A1
scroller-type user interface objects. The reason this was > v2.A1
added was due to popular demand. The command for this new > v2.A1
object is RIP_SCROLLER. Using this command really involves > v2.A1
some custom programming on the host system to process the > v2.A1
selections of a scroller. We added this so that there's a > v2.A1
standardized way of performing scroller operations in > v2.A1
RIPscrip. > v2.A1
þ Added the ability to refresh (redraw) any buttons that exist > v2.A1
in a particular button style slot number. This lets you > v2.A1
draw a bunch of buttons, alter the button style, then refresh > v2.A1
the buttons thus altering their appearance (possibly > v2.A1
highlighting all buttons in a group by changing their > v2.A1
colors, etc). > v2.A1
þ Added a new command (RIP_SET_REFRESH) which allows the host > v2.A1
to define a refresh sequence that, when transmitted, will > v2.A1
instruct the host to refresh (redisplay) the current screen. > v2.A1
This is defined as a host definable sequence because every > v2.A1
host may be different in the ways it refreshes screens and > v2.A1
menus, and even different sub-sections of a host may use > v2.A1
different refresh methods. Also, text variables for > v2.A1
disabling refresh expressions and to force a refresh > v2.A1
operation have been added to round out the refresh feature. > v2.A1
þ Added a RIP_HEADER command which is used to both identify > v2.A1
the revision of RIPscrip code that follows and also to > v2.A1
allow for widespread flexibility in performing reset > v2.A1
operations at the beginning of scenes (above and beyond > v2.A1
the RIP_RESET_WINDOWS) command. > v2.A1
þ Extended the specification where simple graphical primitives > v2.A1
are concerned. In 1.xx versions of RIPscrip, raster > v2.A1
operations for simple graphics primitives were limited to > v2.A1
COPY and XOR modes. XOR was only available for simple line > v2.A1
based primitives, not for curves like circles, ovals, and > v2.A1
various pie slices. In addition, filled-in areas were not > v2.A1
qualified for XOR operations. In RIPscrip 2.0, these > v2.A1
limitations are being lifted. XOR applies to all primitives. > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 13
In addition, line patterns and thicknesses are also allowed > v2.A1
for the various primitives. Thickness limitations are no > v2.A1
longer constrained to 1 pixel or 3 pixel thicknesses either. > v2.A1
Bitmap operations offered raster operations of COPY, XOR, > v2.A1
NOT, OR and AND. In RIPscrip 2.0, these operations are > v2.A1
available for all primitives now. > v2.A1
þ Added an extended font system to the specification. This > v2.A1
provides for the original font systems covering pre-defined > v2.A1
font sizes for the default bit-mapped font and simple vector > v2.A1
fonts. This new command provides the ability to draw text > v2.A1
in high qualith outline fonts like TrueType (tm). See > v2.A1
RIP_EXTENDED_FONT_STYLE for further details on this command. > v2.A1
þ Added a "local audio playback" text variable command. This > v2.A1
is a variant on the local RIPscrip file playback command. > v2.A1
Since you cannot be certain solely from a filename or a > v2.A1
file extension if the file is truly a sound file, we have > v2.A1
introduced this command to perform sound playback from > v2.A1
within host commands or query expressions. > v2.A1
NOTE: Formal sound file and music file formats have not > v2.A1
been established yet for RIPscrip 2.0. They will > v2.A1
be shortly. This command was added into the spec > v2.A1
because its format isn't limited to whatever format > v2.A1
is finally chosen. > v2.A1
þ Added a "local bitmap playback" text variable command so that > v2.A1
you can place icons on the screen from within a host command. > v2.A1
þ Added a "local image playback" text variable command so that > v2.A1
you can add photo-quality compressed images onto the screen > v2.A1
from within a host command (eg, JPEG files). > v2.A1
þ Added rule #16 which defines exactly what should be done if > v2.A1
a RIPscrip command has too much information or too little. > v2.A1
þ Documented what should happen if multiple viewports overlap > v2.A1
or if text windows overlap, or viewports and text windows > v2.A1
overlap. > v2.A1
þ Expanded the pop-up picklist feature to support up to 64 > v2.A1
individual picklist entries instead of the previously defined > v2.A1
maximum limit of 20. > v2.A1
þ Added a RIP_SET_MOUSE_CURSOR command which allows you to > v2.A1
alter the currently defined mouse cursor style. This lets > v2.A1
you change the mouse cursor to something like an hourglass, > v2.A1
a pointer, cross-hairs, etc. > v2.A1
þ Added a new command, RIP_BACK_COLOR. This command > v2.A1
affects the fill operations. When you set the fill style or > v2.A1
custom user-defined fill pattern, you specify the foreground > v2.A1
color for fill operations. Use this command to set a > v2.A1
background color for the fills so you can do two-toned fill > v2.A1
operations. This color may or may not be used for the drawing > v2.A1
of dashed lines for the odd-dash spaces (see RIP_LINE_STYLE). > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 14
þ The RIP_LINE_STYLE command has been altered to support the > v2.A1
ability to turn on or off background color drawing for odd > v2.A1
dash sequences. Also, the line thickness parameter of this > v2.A1
command has been generalized so that it can support any > v2.A1
arbitrary line thickness other than 1 or 3 pixel wide > v2.A1
lines. > v2.A1
þ Added a RIP_SET_COORDINATE_SIZE command which allows the > v2.A1
alteration of X/Y parameter byte widths. By default, all > v2.A1
X or Y coordinates are 2-byte MegaNums (or UltraNums in > v2.A1
2.0). For situations where a world coordinate system gets > v2.A1
very large (greater than 4096 wide), then you will need to > v2.A1
increase the size of the coordinates. This command allows > v2.A1
you to make these parameters say, 3 bytes wide, or 4 bytes > v2.A1
wide. In practice, this command probably won't be used > v2.A1
much - not until we start seeing very high resolution > v2.A1
video devices. > v2.A1
þ Extensive enhancements have been added to text variables. > v2.A1
Specifically, text variable "parameters" have been allowed > v2.A1
to alter the functionality of text variables. This applies > v2.A1
to built-in text variables and to user-defined text > v2.A1
variables. > v2.A1
þ Data Entry Form generation has been added to one of the types > v2.A1
of host command data types. This is a special case of data > v2.A1
text variables. > v2.A1
þ All SAVE and RESTORE type text variables now adhere to three > v2.A1
different mechanisms (up to 10 slots for saving, a slot-less > v2.A1
save area and push/pop stack like operations). In prior > v2.A1
releases each type of save/restore had different mechanisms. > v2.A1
Now, a uniform methodology has been added which is fully > v2.A1
backward compatible and totally identical in nature for all > v2.A1
of the various save/restore data types (screen, mouse fields, > v2.A1
text windows and clipboard slots). > v2.A2
þ Added a new mechanism to the save/restore areas that allows > v2.A1
slot-less and slot-based save regions to be protected. A > v2.A1
protected slot cannot be erased, copied over or modified > v2.A1
by anything other than an unprotect operation or a hard > v2.A1
reset operation. Push and pop operations skip over protected > v2.A1
slots. Also, the ability to move data from slot-less areas > v2.A1
to particular slots, and vice versa have been added. > v2.A1
þ Added protection facilities to viewport slots, text window > v2.A1
slots, clipboard slots, graphical style slots and to > v2.A2
button style slots. This allows you to protect an entry so > v2.A1
that nothing can overwrite or delete it short of a hard > v2.A1
reset operation or an unprotect command. > v2.A1
þ Button styles now have button style slots - up to 36 separate > v2.A1
button style slots can be defined simultaneously. This can > v2.A1
reduce data transmission for heavy button applications. > v2.A1
þ An enhanced load icon command has been added which supports > v2.A1
scaling and dithering. This is intended to replace the older > v2.A1
RIP_LOAD_ICON command because it does the same thing, and much > v2.A1
more! > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 15
þ Formally defined what a "clipboard slot" is under 2.0 > v2.A2
þ Officially defined the file format specification for 2.0 icon > v2.A1
bitmap files. The official file format is BMP files (device > v2.A1
independent bitmaps). See the end of this document for a > v2.A1
technical file format specification. > v2.A1
þ Altered the default palette in 256 color modes. The new > v2.A1
palette is a uniform distribution of Red, Green and Blue > v2.A1
for purposes of image reproduction. A uniform distribution > v2.A1
of RGB values provides colors in all parts of the spectrum > v2.A1
for as accurate image display as possible without color > v2.A1
palette changes. > v2.A1
þ Added another syntax rule (#14) to the language definition. > v2.A1
This new rule covers the inability in previous releases to > v2.A1
use special command characters in text parameters in the > v2.A1
language (eg, "$", "[", etc). > v2.A1
þ Added the ability to embed comments inside a RIPscrip file. > v2.A1
This is syntax rule #15. > v2.A1
þ Cropping rectangles for the RIP_IMAGE_STYLE command have > v2.A1
been eliminated. The complexity of cropping sub-area of the > v2.A1
image hamper the open development of RIPscrip for v2.0. > v2.A1
This may be changed in future versions. > v2.A1
þ Dynamic image pan/zoom operations have been eliminated from > v2.A1
this revision. Since cropping rectangles are no longer part > v2.A1
of the specification, pan and zoom operations aren't really > v2.A1
necessary. > v2.A1
þ TIFF files have been removed from the 2.0 specification for > v2.A1
image file displaying. We will be using JPEG and BMP files > v2.A1
exclusively for all bitmap image reproductions. > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 16
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 1.4.5 þ REVISION 2.A0 ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
þ Defined the resolution independent coordinate system nature of > v2.A1
RIPscrip 2.0 (device coordinate frame, world coordinate frame > v2.A1
and local [viewport] coordinate frames). > v2.A1
þ Defined 24-bit color encoding vs. color palette coding > v2.A1
methods. > v2.A1
þ Defined 36 separate text window slots > v2.A1
þ Defined 36 separate graphical viewport slots > v2.A1
þ Defined 36 separate graphical drawing style slots > v2.A1
þ Defined multiple clipboard slots > v2.A2
þ Added a Delay command > v2.A1
þ Added a Baud Rate Emulation command for local RIP playback > v2.A1
þ Enhanced the button style definitions to support some extra > v2.A1
display effect flags > v2.A1
þ Enhanced the vector text font styles to support other text > v2.A1
font alignments (center, left, right, top, bottom) > v2.A1
þ Defined default color palettes for various modes > v2.A1
þ Defined rectangular fill operation rules for proper resolution > v2.A1
independent viewing > v2.A1
þ Added the ability to change the base math of parameters from > v2.A1
base 36 (meganums) to base 64 (ultranums). This was so we > v2.A1
can accomodate larger numbers in the same space. > v2.A1
þ Added ability to switch from one text window, viewport or > v2.A1
graphical drawing style to another. > v2.A1
þ Added another file transfer protocol to the > v2.A1
RIP_ENTER_BLOCK_MODE command. The new protocol is Zmodem > v2.A1
without crash recovery. > v2.A1
þ Added facilities for display of JPEG photo-realistic images. > v2.A1
þ Altered some of the RIP_ENTER_BLOCK_MODE dynamic modes. Some > v2.A1
of the modes that were originally defined in v1.5x were not > v2.A1
defined well enough and were never used in the real world. > v2.A1
Those values have been recycled into more realistic uses. > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 17
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 1.5 þ DIFFERENCES FROM 1.54 and 2.00 FORMATS º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
In previous versions of RIPscrip, we used a simple Icon file format > v2.A1
for its disk based bitmap icons. In 2.00 we introduce a newer, more > v2.A1
superior file format (the BMP/DIB file format). This is a device > v2.A1
independent bitmap format that accomodates monochrome images, 16 > v2.A1
color images, 256 color images and 24 bit images. There is no real > v2.A1
form of compression internally but the capability for compression > v2.A1
exists for future expandability. The reason for changing file > v2.A1
formats was a very important one because the older format did not > v2.A1
have the built-in facilities for resolution and color palette > v2.A1
independence. This new format does. We chose the BMP file format > v2.A1
because it is truly a device independent bitmap format. For details > v2.A1
about the actual file format specification, see the end of this > v2.A1
document. > v2.A1
Any place in the RIPscrip specification that used to refer to .ICN > v2.A1
files now will use .BMP files. Any 2.0 RIPscrip software should be > v2.A1
intelligent with this change. If it sees a .ICN file it should > v2.A1
realize that it is the older format and translate the file to > v2.A2
.BMP instead. How those packages deal with .ICN files may vary from > v2.A1
vendor to vendor but the recommended solution would be to convert the > v2.A1
older .ICN to a 16 color .BMP file "on the fly". Reallistically, > v2.A1
when a 2.0 package is installed, some conversion utility should be > v2.A1
run on the icon(s) at boot-up time to convert all the existing files > v2.A1
to the new format. Files that are received via RIP_ENTER_BLOCK_MODE > v2.A1
should do dynamic file format conversion to the new format. The > v2.A1
older .ICN file format will no longer be supported in 2.0 and later > v2.A1
revisions. > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 18
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 1.6 þ BACKWARD COMPATIBILITY TOPICS º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
With this release, XOR write modes now apply to all graphical > v2.A1
primitives (also fill patterns). Overall this shouldn't pose any > v2.A1
problems for 99% of all RIPscrip 1.54 files out there, but there > v2.A1
might be a few that are affected - if in RIPaint, you enable XOR > v2.A1
write mode and do a couple lines and rectangles, then do a circle or > v2.A1
filled rectangle, the circle or filled rectangle will be drawn in > v2.A1
COPY mode even though XOR mode is active. In a 2.0 terminal, this > v2.A1
would cause the circles and filled in areas to be XOR'ed as well. In > v2.A1
this regard, 2.0 is not 100.0% fully backward compatible. > v2.A1
Also with this release, the world coordinate/resolution independent > v2.A1
aspect of the language handles filled-in areas a bit differently (see > v2.A1
the world coordinate system section below). Filled-rectangles don't > v2.A1
fill all the way to the right or bottom borders of the rectangle - > v2.A1
they are inset by one pixel from the right and up one line from the > v2.A1
bottom. The reasons for this are described in the world coordinate > v2.A1
section of this document. This can cause one pixel gaps in 1.54 > v2.A1
files that wouldn't happen in 2.0 related files. > v2.A1
With v2.A3 of the specification, we have introduced a system of > v2.A3
graphical ports, or drawing ports. These drawing ports are areas > v2.A3
where actual drawing takes place. In 1.54 and prior versions, any > v2.A3
graphics that are drawn (eg, lines, circles, etc) are drawn to the > v2.A3
screen (the screen port). Under 2.0 you can define multiple drawing > v2.A3
ports which may or may not be on the screen (eg, screen ports, or > v2.A3
offscreen "clipboard" ports). Each drawing port can have one > v2.A3
viewport associated with it, allowing you to modify the sub-region > v2.A3
inside the port that drawn objects will be "clipped to" (a clipping > v2.A3
rectangle). The screen is always port #0 and is formally known as > v2.A3
the default screen port. Under 1.54 you were allowed to have an > v2.A3
offscreen bitmap area known as the clipboard. Under 2.0, the > v2.A3
clipboard is simply an offscreen "clipboard" port. You may switch > v2.A3
to any defined port and subsequent drawing operations will apply to > v2.A3
that port instead of the screen (unless the new port is a screen > v2.A3
port). > v2.A3
The older RIPscrip commands that deal with the clipboard are in > v2.A3
essence, obsolete. When they are instructed to work with the > v2.A3
clipboard, they work with the first offscreen "clipboard" port that > v2.A3
they find. Some newer commands have been included, which are more > v2.A3
powerful, that allow you to specifically designate a given port > v2.A3
number to work with. You are allowed up to 36 separate graphical > v2.A3
drawing ports, which port #0 is the screen and cannot be deleted. > v2.A3
RIPscrip 1.x filled objects (filled ovals, filled polygons, etc) had > v2.A3
a border around the object. These borders were drawn using the > v2.A3
current drawing color, line thickness, and in some cases, line > v2.A3
pattern. Under 2.0, these borders can be turned off (they are on > v2.A3
by default). This allows you to draw filled circles in a particular > v2.A3
fill pattern without any borders. We default to keeping borders on > v2.A3
for backward compatibility reasons. If you don't want borders, you > v2.A3
will have to shut them off. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 19
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 2 þ HOW RIPscrip IS DESIGNED - FUNDAMENTAL TOPICS º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
The sections that following describe specific areas of RIPscrip that > v2.A4
are fundamental aspects of the language and its design. Each section > v2.A4
is designed to give you information on one basic area of RIPscrip. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 20
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 2.1 þ DRAWING PORTS - WHAT ARE THEY? º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
A drawing port is an area where graphics can be drawn. This is much > v2.A4
like having a tablet of paper, where each page can be drawn to > v2.A4
individually. However, just like a tablet of paper, only the piece > v2.A4
of paper that is on the top of the tablet can be drawn to (the > v2.A4
current piece of paper). The same concept applies to drawing ports. > v2.A4
At any one moment in time, there is a "current drawing port". This > v2.A4
current port is the one that will display graphical drawing > v2.A4
operations when they are received. > v2.A4
There are two types of drawing ports: > v2.A4
1) A screen (visual) drawing port, and > v2.A4
2) An offscreen bitmap drawing port (also known as a > v2.A4
"Clipboard Port". > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 21
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 2.1.1 þ SCREEN DRAWING PORTS ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
A screen drawing port is the most commonly used form of drawing > v2.A4
ports. A screen drawing port is a port that is somewhere on top of > v2.A4
the screen. What this means is when a graphical drawing operation > v2.A4
occurs, it is displayed in that port and subsequently to the screen > v2.A4
immediately. Screen drawing ports are methods of dividing up the > v2.A4
user's screen into separate regions, of which each can be thought of > v2.A4
as completely separate drawing areas. You can switch between them > v2.A4
pretty much at will to draw your graphics. > v2.A4
Here is a typical example of one screen and how it can be divided up > v2.A4
with multiple drawing ports: > v2.A4
ÚÄÄÄ Screen boundary > v2.A4
³ > v2.A4
 > v2.A4
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» > v2.A4
º Port 0 º > v2.A4
º º > v2.A4
º ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ º > v2.A4
º ³ Port 1 ³ ³ Port 2 ³ º > v2.A4
º ³ ³ ³ ³ º > v2.A4
º ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ º > v2.A4
º ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ º > v2.A4
º ³ Port 3 ³ º > v2.A4
º ³ ³ º > v2.A4
º ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ º > v2.A4
º ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ º > v2.A4
º ³ Port 4 ³ º > v2.A4
º ³ ³ º > v2.A4
º ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ º > v2.A4
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ > v2.A4
As you can see, you have quite a bit of flexibility in placing your > v2.A4
port's around on the screen. In this example, we have five ports > v2.A4
defined on the screen. You might notice that port number 0 doesn't > v2.A4
seem to have a rectangle associated with it. Actually, it does - it > v2.A4
is the screen's boundary. Port number 0 is defined as the actual > v2.A4
screen and cannot be redefined (you can alter its viewport though - > v2.A4
see below for more details about viewports). Port 0 is always the > v2.A4
full size of the screen. You can create your own screen ports, but > v2.A4
port 0 is one that you cannot redefine the boundary of. This gives > v2.A4
you the the ability to always switch to port 0 to address the entire > v2.A4
screen, but have the luxury of other ports when you only want to work > v2.A4
with a portion of the screen. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 22
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 2.1.2 þ OFFSCREEN BITPAP DRAWING PORTS (CLIPBOARD PORTS) ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
An offscreen bitmap port, otherwise known as a "clipboard port", is > v2.A4
very much like a screen port, but it isn't actually a part of the > v2.A4
screen. It is more like another screen that you cannot see, but one > v2.A4
that you can still draw to. You might be asking yourself why > v2.A4
something like this is part of RIPscrip? The answer is quite > v2.A4
simple - they are extremely powerful! An offscreen port can be used > v2.A4
for placing a piece of graphics data temporarily while you are > v2.A4
showing a dialog box on the screen, only to be restore the original > v2.A4
graphics when the user clicks the "OK" button on the dialog box. The > v2.A4
graphical data that was overwritten by the dialog box isn't deleted - > v2.A4
it's been saved temporarily on a screen that you cannot see, but is > v2.A4
restored to the screen when necessary. Another use of this might be > v2.A4
if you had a very complicated scene to display, but you didn't want > v2.A4
the user to see each little graphics operation until the entire scene > v2.A4
was complete; switch to an offscreen bitmap port, draw your scene, > v2.A4
then switch back to the screen and copy the offscreen port's graphics > v2.A4
to your screen. Voila, the user sees the scene appear on his screen > v2.A4
complete - not piecemeal! > v2.A4
There are numerous reasons why you would use offscreen ports; things > v2.A4
like storing a bitmap that you just loaded from the hard disk onto an > v2.A4
offscreen port so that when you paste it to the screen a large number > v2.A4
of times, there isn't a large amount of disk activity on the user's > v2.A4
machine. Another good example is in the situation of an online game > v2.A4
where the screen is some kind of map, and one or more offscreen ports > v2.A4
are used to hold small "icons", or bitmaps of game pieces. Simply > v2.A4
copy the images from the offscreen port(s) to appropriate locations > v2.A4
on the map and you've accomplished a rather complicated situation > v2.A4
without adversely affecting the user's system with intense hard drive > v2.A4
activity due to constantly loading bitmaps off the disk - the side > v2.A4
effect, the game moves much more swiftly and with a lot less > v2.A4
"jerkiness" due to the hard disk accesses. > v2.A4
Just like with screen drawing ports, you can select an offscreen > v2.A4
bitmap port as the one which will receive graphical drawing > v2.A4
operations. Selecting an offscreen port as the current port let's > v2.A4
you draw simple graphics objects, photos and other such things > v2.A4
to it. But remember, the graphics you draw to an offscreen port > v2.A4
are of little value unless at some point you actually copy it to > v2.A4
the screen so that the user can see it. > v2.A4
Some things cannot be done to offscreen ports. For example, you > v2.A4
cannot place a mouse field or a clickable button on an offscreen > v2.A4
port. The reason for this is that the mouse only has any > v2.A4
meaning to the screen - the environment that the user interacts > v2.A4
with. How can the user click on a button that he can't see? He > v2.A4
can't. You also cannot place text windows or assign resident > v2.A4
query expressions to offscreen ports (these topics are described > v2.A4
more fully in later sections). > v2.A4
An offscreen port is most easily thought of as a graphics screen > v2.A4
that you can't see. You can work with it to your heart's content, > v2.A4
but the user can't see the contents of it until you copy the > v2.A4
data to the screen. As long as you keep this one fundamental > v2.A4
concept in mind, there should be no confusion about ports. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 23
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 2.1.3 þ PORTS AND COORDINATES ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
A port is a specific drawing area. No matter whether the port is a > v2.A4
screen port of an offscreen bitmap port, it is still a drawing area, > v2.A4
and as such, it has a legal number of horizontal and vertical pixels > v2.A4
that can be drawn to. Every graphical drawing operation uses > v2.A4
graphical coordinates with which they draw their image to the current > v2.A4
port. For example, a circle needs to know the center point, and the > v2.A4
radius of the circle in order to draw itself. > v2.A4
Each port has what can be thought of as its own set of coordinates. > v2.A4
Just like the screen where (0,0) is the upper-left corner of the > v2.A4
screen, when a port is active (ie, current), (0,0) is the coordinate > v2.A4
of the upper-left corner of the drawing port. If a port had a width > v2.A4
of W and a height of H, then the lower-right coordinate would be > v2.A4
(W-1,H-1). This holds true for all drawing ports, even offscreen > v2.A4
bitmap ports. > v2.A4
For example, if you draw a circle at (50,50) with a radius of (25,25) > v2.A4
to the current port (a screen port), then you might have something > v2.A4
like the following diagram: > v2.A4
ÚÄÄÄÄ Screen Boundary > v2.A4
(0,0)  > v2.A4
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» > v2.A4
º º > v2.A4
º ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ º > v2.A4
º ³(10,10) ³Ä25ij ³ÄÄÄÄÄÄÄPort > v2.A4
º ³ ÜÜÜÜÜ ³ º > v2.A4
º ³ Üßß ßßÜ ³ º > v2.A4
º ³ Û Û ³ º > v2.A4
º ³ Û þ ÄÄÄ Û ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ (60,60) on > v2.A4
º ³ Û (50,50) Û ³ º the screen > v2.A4
º ³ ßÜÜ ÜÜß ³ º > v2.A4
º ³ ßßßßß ³ º > v2.A4
º ³ (124,124)³ º > v2.A4
º ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ º > v2.A4
º º > v2.A4
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ > v2.A4
In this example, the port starts at (10,10) on the screen and goes > v2.A4
down to (124,124) on the screen (a width of 115 and a height of 115). > v2.A4
Since you said to draw the circle centered at (50,50) in the current > v2.A4
port, what actually happens on the screen is that the circle is > v2.A4
physically drawn at (50+10,50+10) to the screen, or centered at the > v2.A4
"absolute" coordinate of (60,60) in relation to the actual screen. > v2.A4
As you can see, each port can be thought of as its own little drawing > v2.A4
universe, with its own set of coordinates. This makes drawing things > v2.A4
like graphs, or showing game map windows easy - without having to > v2.A4
make extensive calculations in the host software to figure out where > v2.A4
things need to be placed. This is considered "port relative" > v2.A4
coordinates. > v2.A4
Screen ports are defined as some location on the actual screen from > v2.A4
the upper-left corner to the lower-right corner. From this > v2.A4
information, the width and height of the port can be easily > v2.A4
calculated. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 24
Offscreen ports are a bit different though. Since they're not part > v2.A4
of the user's actual screen, they don't have this upper-left > v2.A4
location on the screen. In this manner, an offscreen port is always > v2.A4
thought of as having an upper-left corner of (0,0) and its > v2.A4
lower-right corner as (W-1,H-1). > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 25
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 2.1.4 þ PORTS AND VIEWPORTS ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Each drawing port has an associated viewport, or clipping rectangle. > v2.A4
A viewport is a rectangle inside the port that defines the drawing > v2.A4
limits inside that port. Its similar in concept to a coloring book > v2.A4
with invisible lines. You can draw all you want, but you can't go > v2.A4
outside the lines. If any operation would extend beyond the edge of > v2.A4
this clipping rectangle, it will be truncated. For example, if you > v2.A4
have a drawing port that is 100x100 pixels in size, and you define > v2.A4
the viewport to be from (25,25) to (74,74), you would have a 50x50 > v2.A4
drawing area right in the center of the drawing port. If you then > v2.A4
draw a circle in the exact center of the drawing port with a radius > v2.A4
of 60 pixels, you would have pieces of the circle that extend beyond > v2.A4
the top, left, bottom and right borders of the viewport. What you > v2.A4
would see would be four arcs in each corner of the viewport as in the > v2.A4
following example: > v2.A4
Viewport from (25,25) to (74,74) > v2.A4
ÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A4
(0,0) ³ > v2.A4
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͳÍÍÍÍ» > v2.A4
º °°°°° ³ º > v2.A4
º °°° °°°  º > v2.A4
º ÚÄÛÛÄÄÄÄÄÄÄÄÄÄÄÛÛÄ¿ º > v2.A4
º ³Û Û³ º > v2.A4
º Û Û º > v2.A4
º °³ ³° º > v2.A4
º ° ³ ³ ° º > v2.A4
º ° ³ ³ ° º > v2.A4
º ° ³ ³ ° º > v2.A4
º °³ ³° º > v2.A4
º Û Û º > v2.A4
º ³Û Û³ º > v2.A4
º ÀÄÛÛÄÄÄÄÄÄÄÄÄÄ-ÛÛÄÙ º > v2.A4
º °°° °°° º > v2.A4
º °°°°° º > v2.A4
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ (99,99) > v2.A4
If you notice in the above diagram, the rectangle inside the port > v2.A4
defines the viewport. The solid squares (Û) denote pixels inside the > v2.A4
viewport that would actually be drawn, and the shaded squares (°) > v2.A4
show pixels that will not be drawn because they are outside the > v2.A4
viewport. > v2.A4
You can alter the location and size of the viewport inside any given > v2.A4
drawing port. By default, the viewport is set to the full size of > v2.A4
the drawing port when the port is created. If you attempt to make > v2.A4
the viewport go outside the actual port, it will be adjusted to fit > v2.A4
so that it is completely within the port. If an attempt is made to > v2.A4
define a viewport that is completely outside the boundary of its > v2.A4
port, then the definition is ignored as an error condition. If the > v2.A4
lower-right corner is outside the boundary of the port, then the > v2.A4
lower-right corner of the newly defined viewport is set to the > v2.A4
lower-right corner of the port itself. > v2.A4
Just like drawing ports, a viewport also "adjusts" drawing > v2.A4
coordinates. When you alter the location of a viewport inside of a > v2.A4
drawing port, the origin (0,0) for drawing operations relates to the > v2.A4
upper-left corner of the viewport itself, not the actual underlying > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 26
drawing port. All drawing operations pertain to a port's viewport, > v2.A4
not the port itself. The port is considered the maximum limits for > v2.A4
the viewport inside - just like the screen, you can only draw to > v2.A4
areas inside the screen; the same applies to viewports and ports. > v2.A4
As an example, let's say you have a screen port defined and you alter > v2.A4
the viewport (remember, by default it is the full size of the port > v2.A4
when the port is defined until you re-define it). The following > v2.A4
diagram will give you an idea of our example: > v2.A4
ÉÍÍÍÍ Screen boundary > v2.A4
 > v2.A4
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» > v2.A4
º(0,0) screen º > v2.A4
º ÚÄÄÄÄÄÄÄÄÄ (0,0) port º > v2.A4
º  (25,25) screen º > v2.A4
º þÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÍÍÍÍÍÍ Port boundary > v2.A4
º ³ ³ (0,0) viewport ³ º > v2.A4
º ³ ÚÄÄŽ (40,40) port ³ º > v2.A4
º ³  ³ (65,65) screen ³ º > v2.A4
º ³ þÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ º > v2.A4
º ³ ³ ³ ³ º > v2.A4
º ³ ³ ³ ÍÍÍÍÍÍÍÍÍÍÍ Viewport boundary > v2.A4
º ³ ³ þ ³ ³ º > v2.A4
º ³ ³  ³ ³ º ³ (130,130) viewport > v2.A4
º ³ ÀÄÄÄÄÄÄÄÄÄijÄÄÄÄÄÄÄÄÄÄþ ÄÄÄÄÄÄÄÄÄÄŽ (170,170) port > v2.A4
º ³ ³ ³ º ³ (195,195) screen > v2.A4
º ³ ³ ³ º > v2.A4
º ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄijÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄþ ÄÄÄÄÄÄ (200,200) port > v2.A4
º ³ º (225,225) screen > v2.A4
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͳÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ > v2.A4
³ ³ (50,50) viewport > v2.A4
ÀÄÄÄÄŽ (90,90) port > v2.A4
³ (125,125) screen > v2.A4
In this example, our port is defined from (25,25) to (225,225) on the > v2.A4
screen. This makes our port 201 pixels wide and 201 pixels tall. > v2.A4
Our viewport starts at (40,40) in the port's coordinate system and > v2.A4
ends at (170,170). This makes our viewport 131 pixels wide and > v2.A4
131 pixels tall. The upper-left coordinate of the viewport would map > v2.A4
to the screen coordinates (25+40,25+40) or (65,65), and the > v2.A4
lower-right corner would map to (25+40+130,25+40+130) or (195,195). > v2.A4
As you can see, mapping a screen port's coordinates to those actually > v2.A4
used on the screen can get quite involved. But when you get down to > v2.A4
the benefits of coordinate systems, this approach provides quite a > v2.A4
bit of flexibility in moving things around without having to change > v2.A4
coordinate systems all the time. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 27
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 2.1.5 þ PORTS, VIEWPORTS AND GRAPHICAL OPERATIONS ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
We've already discussed how a viewport "truncates" a graphical > v2.A4
operation if it extends beyond the border of the port's viewport. > v2.A4
What if you're copying graphical data from one port to another? > v2.A4
Graphics data can only be copied from one port to another in > v2.A4
rectangular portions, and just like all other graphical operations, > v2.A4
this kind of situation adheres to the viewports of both the source > v2.A4
and the destination ports' viewports! Let's take an example where > v2.A4
you are copying a rectangle of graphics from port 1 to port 2. For > v2.A4
sake of clarity, we'll copy the entire viewport over (not a sub-area > v2.A4
of the viewport). The following diagram shows what would happen if > v2.A4
the two viewports aren't the exact same size (specifically, the > v2.A4
source viewport is larger than the destination viewport): > v2.A4
ÚÄÄÄ Port 1's viewport ÚÄÄÄ Port 2's viewport > v2.A4
³ ³ > v2.A4
ÉÍÍÍÍͳÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» ÉÍÍÍͳÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» > v2.A4
º  º º  º > v2.A4
º ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ º º ÚÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ º > v2.A4
º ³ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ³ º º ³ÛÛÛÛÛÛÛÛÛÛÛÛÛ³°°°°° º > v2.A4
º ³ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ³ º º ³ÛÛÛÛÛÛÛÛÛÛÛÛÛ³°°°°° º > v2.A4
º ³ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ³ º º ³ÛÛÛÛÛÛÛÛÛÛÛÛÛ³°°°°° º > v2.A4
º ³ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ³ º º ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÙ°°°°° º > v2.A4
º ³ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ³ º º °°°°°°°°°°°°°°°°°°° º > v2.A4
º ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ º º º > v2.A4
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ > v2.A4
Port 1 Port 2 > v2.A4
The squares that are shown as solid (Û) are the graphics data that is > v2.A4
to be copied (port 1), and the graphics data that is actually copied > v2.A4
(port 2). The shaded squares (°) are graphics data from the source > v2.A4
viewport that aren't copied to the destination. This shows how a > v2.A4
viewport "truncates" graphical drawing operations, even when copying > v2.A4
data from one port to another. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 28
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 2.1.6 þ COPYING DATA FROM ONE PORT TO ANOTHER ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
When you copy graphical data from one port to another (or to another > v2.A4
location on the same port for that matter), you are duplicating the > v2.A4
graphical contents of the source port onto the destination port. > v2.A4
Whether the result is an exact replica of the original image or not > v2.A4
is another matter. Whenever you copy a rectangle of data from one > v2.A4
port to another, you need to specify a rectangle in the source port, > v2.A4
and another one in the destination port. These two rectangles do not > v2.A4
need to be the same pixel size. If they are different either in the > v2.A4
width or height dimensions, then scaling of the source image will > v2.A4
occur! For example, if the source image's rectangle doesn't have the > v2.A4
same dimensions as the rectanalge in the destination port, you could > v2.A4
have a situation similar to the following: > v2.A4
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» > v2.A4
º ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ º º ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ º > v2.A4
º ³ÛÛßßßßßßßßßßßßßßßßÛÛ³ º º ³ÛÛßßßßßßßßßßßßßßßßßßßßÛÛ³ º > v2.A4
º ³Û ßÜ Üß Û³ º º ³Û ßÜ Üß Û³ º > v2.A4
º ³Û ßÜ Üß Û³ º º ³Û ÛßßßßßßßßßßßßßßÛ Û³ º > v2.A4
º ³Û ÛßßßßßßÛ Û³ º º ³Û ÛÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛ Û³ º > v2.A4
º ³Û Û Û Û³ º º ³Û Üß ßÜ Û³ º > v2.A4
º ³Û Û Û Û³ º º ³ÛÛÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛÛ³ º > v2.A4
º ³Û ÛÜÜÜÜÜÜÛ Û³ º º ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ º > v2.A4
º ³Û Üß ßÜ Û³ º º º > v2.A4
º ³Û Üß ßÜ Û³ º º º > v2.A4
º ³ÛÛÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛÛ³ º º º > v2.A4
º ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ º º º > v2.A4
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ > v2.A4
Source (Port 1) Destination (Port 2) > v2.A4
Notice that the image in the destination is shorter, but much wider > v2.A4
than the original. This is because in this example we specified our > v2.A4
destination rectangle to be shorter, but wider in size than the > v2.A4
original image in the source port. If the two rectangles had the > v2.A4
same width and height values, then our destination image would be > v2.A4
pixel-for-pixel identical to the original (providing that the > v2.A4
viewport of the destination port didn't truncate the image of > v2.A4
course). > v2.A4
When copying rectangular pieces of data from one port to another, you > v2.A4
have to be careful about viewports. If either the source or the > v2.A4
destination rectangle are completely outside that port's viewport, > v2.A4
then the copy operation isn't performed - nothing would be visible if > v2.A4
it did happen, because either the source or the destination image > v2.A4
wouldn't be visible inside the viewport. > v2.A4
Here is another example showing a straight copy operation without any > v2.A4
scaling being performed. We are assuming that the source and > v2.A4
destination rectangles are the same size. The port's boundary and > v2.A4
it's viewport are shown in the following diagram: > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 29
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» > v2.A4
º ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ º º ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ º > v2.A4
º ³ÛÛ ÛÛ ÛÛ ³°°° º º ³ÛÛ ÛÛ ÛÛ °°°° ³ º > v2.A4
º ³ ÛÛ ÛÛ ÛÛ³°°° º º ³ ÛÛ ÛÛ ÛÛ°°°° ³ º > v2.A4
º ³ÛÛ ÛÛ ÛÛ ³°°° º º ³ÛÛ ÛÛ ÛÛ °°°° ³ º > v2.A4
º ³ ÛÛ ÛÛ ÛÛ³°°° º º ³ ÛÛ ÛÛ ÛÛ°°°° ³ º > v2.A4
º ³ÛÛ ÛÛ ÛÛ ³°°° º º ³ÛÛ ÛÛ ÛÛ °°°° ³ º > v2.A4
º ³ ÛÛ ÛÛ ÛÛ³°°° º º ³ ÛÛ ÛÛ ÛÛ°°°° ³ º > v2.A4
º ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ°°° º º ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ º > v2.A4
º °°°°°°°°°°°°°°°° º º °°°°°°°°°°°°°°°° º > v2.A4
º °°°°°°°°°°°°°°°° º º °°°°°°°°°°°°°°°° º > v2.A4
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ > v2.A4
The shaded squares (°) are graphics that extend beyond the source's > v2.A4
viewport. Those pixels aren't copied to the destination port, but > v2.A4
they are shown in the upper-right diagram to show where the graphics > v2.A4
would have been in the destination port if they were copied. > v2.A4
Let's take another example but this time we will show scaling because > v2.A4
this situation may not be intuitive. Let's assume that our source > v2.A4
rectangle is twice as large as our destination rectangle both in > v2.A4
the width and height dimensions. This means that our image will be > v2.A4
reduced by 1/2. But what happens if the source image needs to be > v2.A4
"truncated" to fit in the viewport? The answer is simple - only the > v2.A4
data that remains after truncation is scaled into the destination > v2.A4
rectangle. If the destination rectangle also had to be truncated, > v2.A4
then the scaling is still performed. Under no circumstances will a > v2.A4
vertical or horizontal "blank" zone be created during scaling. When > v2.A4
you say "scale to fit", it does exactly what you told it to - it > v2.A4
makes the graphics fit in the given area. Here is the diagram that > v2.A4
shows this situation: > v2.A4
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» > v2.A4
º ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ º º ÚÄÄÄÄÄÄÄÄÄ¿ º > v2.A4
º ³ÛÛ ÛÛ ÛÛ ³°°° º º ³ßÜßÜßÜ°° ³ º > v2.A4
º ³ ÛÛ ÛÛ ÛÛ³°°° º º ³ßÜßÜßÜ°° ³ º > v2.A4
º ³ÛÛ ÛÛ ÛÛ ³°°° º º ³ßÜßÜßÜ°° ³ º > v2.A4
º ³ ÛÛ ÛÛ ÛÛ³°°° º º ³°°°°°°°° ³ º > v2.A4
º ³ÛÛ ÛÛ ÛÛ ³°°° º º ³°°°°°°°° ³ º > v2.A4
º ³ ÛÛ ÛÛ ÛÛ³°°° º º ÀÄÄÄÄÄÄÄÄÄÙ º > v2.A4
º ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ°°° º ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ > v2.A4
º °°°°°°°°°°°°°°°° º > v2.A4
º °°°°°°°°°°°°°°°° º > v2.A4
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 30
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 2.2 þ DATA TABLES - A FUNDAMENTAL 2.0 CONCEPT º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
RIPscrip 2.0 is different from its previous versions > v2.A1
architecturally on a number of levels. One of the key fundamental > v2.A1
differences is the introduction of data tables.
A data table is a table of information used in RIPscrip. Data tables > v2.A3
may be the color palette table (where each table entry is a complete > v2.A3
color palette definition), graphical style tables, button style > v2.A3
tables, drawing port tables, text window definition tables, mouse > v2.A4
field tables, or environment data tables. Some data tables have an > v2.A4
entry that is "currently active". This might be the currently active > v2.A3
text window in the text window data table, or the currently active > v2.A3
color palette in the palette data table. Every data table has one or > v2.A3
more entries in it, in which each entry is a specific piece of data. > v2.A3
Data table entries can be "in use" and/or protected (see below). > v2.A3
Data can be moved from one table entry to another (in effect, making > v2.A1
a copy of one table entry to another); this doesn't apply to all data > v2.A4
tables (eg, mouse field data table). Also, most tables' entries can > v2.A4
be protected so that the contents of a particular entry cannot be > v2.A4
modified or deleted until either an unprotect entry function is > v2.A1
executed, or a hard reset is performed (a hard reset completely > v2.A1
resets the entire RIPscrip environment to ground zero). Again the > v2.A4
mouse field data table cannot have individual entries protected. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 31
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 2.2.1 þ TYPES OF DATA TABLES º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
There are six different data tables for general data storage. They > v2.A4
are: the drawing port table, color palette table, graphical style > v2.A3
table, text window table, the button style table and the RIPscrip > v2.A4
environment data table. There are backup areas for these data tables > v2.A4
so you can make complete backup copies of these data tables for > v2.A4
re-use later after some operation is performed (eg, executing a > v2.A4
dialog box, running a door, etc). There are actually more data > v2.A4
backup areas than there are data tables, but this will be described > v2.A4
in a later section entitled "DATA BACKUP AREAS". > v2.A4
The six general data table groups are described in more detail as > v2.A4
follows: > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 32
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 2.2.1.1 þ DRAWING PORT TABLE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
One of the most fundamental aspects of RIPscrip 2.0 is the concept of > v2.A4
a drawing port. Any drawing of graphics occurs inside a drawing > v2.A4
port. There may be up to 36 ports defined simultaneously. Port > v2.A3
number 0 is always defined as the screen. Its dimensions are that of > v2.A3
the screen. The remaining 35 ports may be sub-sections of the screen > v2.A3
or may be offscreen memory drawing ports (ie, clipboard ports). At > v2.A3
any one moment in time, only one port may be the current port - the > v2.A4
port that will receive graphical drawing operations. If the current > v2.A4
port is an offscreen clipboard port, then any drawing operations will > v2.A3
not appear on the screen. The only way that those graphics can be > v2.A3
viewed by the user is if the contents of the port are copied to a > v2.A3
screen port. > v2.A3
All ports, when defined, are defined using the current world > v2.A4
coordinate system. From those coordinates, the port's actual > v2.A4
physical pixel dimensions are determined and those dimensions are > v2.A4
remembered by the port. Any graphical operation that bypasses the > v2.A4
viewport system (RIP_SCROLL_REGION, etc) will pay close attention to > v2.A4
coordinates and the boundaries of the drawing port. If any > v2.A4
coordinate would go outside of the port, it is adjusted to fit > v2.A4
inside. > v2.A4
A drawing port remembers a number of pieces of information which
characterize that drawing port. Each port maintains its own list of
the following pieces of data:
þ Current X/Y location (used with RIP_TEXT commands) > v2.A4
þ Current image style settings (see RIP_IMAGE_STYLE) > v2.A4
þ Current viewport location and dimensions > v2.A4
þ Current fixed viewport "resident query" expression > v2.A4
þ The current "source X/Y location" for graphically > v2.A4
stored data used with the PORT_COPY, RIP_GET_IMAGE, > v2.A4
RIP_PUT_IMAGE, and $PCB$ commands (see these commands for > v2.A4
more details). > v2.A4
The entire drawing port data table keeps track of the "current > v2.A4
viewport" query expression (otherwise known as a floating viewport > v2.A4
query). See the RIP_QUERY command for more details. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 33
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 2.2.1.2 þ COLOR PALETTE TABLE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
In RIPscrip there is a graphical color palette. The color palette > v2.A3
is a group of 256 separate color RGB values, also known as a color > v2.A3
lookup table. This color palette is used to map a particular color > v2.A3
number to some combination of red, green and blue color components. > v2.A3
For example, color 0 is usually black (no red, green or blue), and > v2.A3
color 255 is typically white (full intensity red, green and blue). > v2.A3
This color palette is normally written directly into the video > v2.A3
hardware of your computer to activate the colors. So when you try > v2.A3
to draw in color 255, you see a white line appear on the screen. > v2.A3
RIPscrip 2.0 allows you to have up to 36 separate color palettes. > v2.A3
Combined, these make up a color palette table. Only one entry in > v2.A3
the color palette table may be current at any one moment in time. > v2.A4
An entry in the color palette table is a complete 256 color palette. > v2.A3
When you switch from one color palette entry to another, the colors > v2.A3
on the screen will typically change instantly (see below about > v2.A3
24 bit modes). This gives you the ability to quickly and easily > v2.A3
switch from one color scheme to another without sending a large > v2.A3
amount of information to the terminal every time you wish to switch > v2.A3
color schemes. > v2.A3
RIPscrip 2.0 allows for two forms of color modes, color palette > v2.A3
mapping mode (the default) and direct RGB color encoding. Color > v2.A3
palette mapping mode refers to a method of selecting colors where > v2.A3
colors are specified as numbers from 0-255, which are indices into > v2.A3
the current color palette. This determines the actual color that > v2.A4
will be rendered to the screen. In direct RGB color mode though, > v2.A3
colors are specified as raw red, green and blue components (see the > v2.A3
sections below on "COLOR MAPPING VS. DIRECT RGB ENCODING"). > v2.A3
Under 24 bit configurations of a RIPscrip software package, a real > v2.A3
color palette is not possible because there are no color registers > v2.A3
on the video hardware. In those cases, a color palette is merely > v2.A3
used as an RGB color lookup table. In other words, if you said to > v2.A3
draw a line in color 255, you would be saying lookup color 255 in > v2.A3
the color palette, take that RGB configuration and draw the line > v2.A3
based on that color combination. In a serious sense, it is the > v2.A3
same as what the video hardware does, but the software has to do > v2.A3
the job in that situation. When the system is in 24 bit color > v2.A3
modes, where color palettes are not truly possible, switching > v2.A3
from one color palette to another will not make any changes to the > v2.A3
colors on the screen - it only affects subsequent drawing operations. > v2.A3
When a normal reset operation is performed, all unprotected data > v2.A4
table entries are reset to bootup default color palette values. A > v2.A4
"hard reset" will reset the entire color palette data table to > v2.A4
default values. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 34
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 2.2.1.3 þ GRAPHICAL STYLE TABLE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
There are 36 separate graphical style table entries. Initially, > v2.A1
number 0 is current and is initialized to default values. A > v2.A4
graphical style entry defines a number of currently active graphical > v2.A1
attributes. A graphical style entry defines the following values > v2.A1
(each entry has all of these attributes): > v2.A1
þ Current drawing color > v2.A1
þ Current background drawing color > v2.A1
þ Current fill pattern number (or user-defined fill pattern) > v2.A1
þ Current fill color > v2.A1
þ Current line pattern number (or user-defined line pattern) > v2.A1
þ Line pattern odd drawing rule (see RIP_LINE_STYLE) > v2.A1
þ Current mouse cursor style number > v2.A1
þ Current font number (or font name for extended fonts) > v2.A1
þ Current font size, orientation and horizontal/vertical > v2.A1
alignment > v2.A1
þ Current write mode (raster/transfer operation) > v2.A1
þ Current color mode (palette or direct RGB) > v2.A1
With the ability of having multiple graphical style entries defined > v2.A1
simultaneously, you can setup an entire graphical environment, then > v2.A1
with a single command, switch to a completely different configuration > v2.A1
in only a couple of bytes of RIPscrip code. This can greatly reduce > v2.A1
the amount of RIPscrip code that needs to be transmitted after the > v2.A1
style data table entries are initially setup. > v2.A1
See below under Protected Data Table Entries for even more powerful > v2.A4
aspects of the data table systems. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 35
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 2.2.1.4 þ BUTTON STYLE TABLE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Button style data table entries contain a complete button style > v2.A1
definition as defined by a RIP_BUTTON_STYLE command. > v2.A4
Having multiple button style slots defined at the same time allows > v2.A1
you to have many commonly used button styles defined at once, so that > v2.A1
you can simply reference an already defined button style rather than > v2.A1
having to transmit a rather length button style command each and > v2.A1
every time you wish to define a button. > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 36
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 2.2.1.5 þ TEXT WINDOW TABLE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
A text window is simply a region on the screen where raw, > v2.A1
non-RIPscrip text is routed once it is received from the host. > v2.A1
Initially, the text window is full screen, using the MicroANSI font > v2.A1
#2 (80x25). This is different than previous versions of RIPscrip in > v2.A1
that the initial setting was full screen using font #0 which > v2.A1
corresponds to an 80x43 text configuration. 80x25 is more > v2.A1
aesthetically pleasing to most people so it was made the default font > v2.A1
configuration. > v2.A1
A text window typically supports ANSI and VT-102 screen control codes > v2.A4
to support foreground and background colors, and other formatting > v2.A1
options. This information is all part of a text window. Each text > v2.A1
window table entry stores a number of pieces of information that > v2.A1
define what a text window is. The information stored in each text > v2.A1
window entry is as follows: > v2.A1
þ The upper-left and lower-right corner definitions for the > v2.A1
text window (coordinates are in text coordinates, not > v2.A1
graphical screen coordinates). > v2.A1
þ The MicroANSI screen font number for the given window. > v2.A1
þ The current ANSI color attributes > v2.A1
þ The current cursor X/Y location > v2.A1
þ The status of the cursor (is it on or off) > v2.A1
þ The current vertical scrolling margins (ANSI formatting) > v2.A1
þ Whether the window is activated or deactivated. > v2.A4
A text window can also be deactivated. If the current text window > v2.A4
slot is deactivated then any raw text that is received by the host > v2.A4
will be discarded (ie, not shown on screen at all). > v2.A1
Having multiple defined text windows allows you to quickly switch > v2.A1
from one text window configuration to another without having to lose > v2.A1
any previously used information (color, location, cursor, etc). Note > v2.A1
that the text contained inside the current text window is not stored > v2.A1
as part of the text window definition - only the window's raw > v2.A1
definition is preserved. This can easily be used for multiple data > v2.A4
entry fields, multiple chat windows, or other such things. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 37
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 2.2.1.6 þ ENVIRONMENT TABLE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
The environment data table is a central table for the maintenance of > v2.A4
critical values that define the characteristics of the RIPscrip > v2.A4
environment. This data table holds up to 36 separate environments. > v2.A4
The following pieces of information are stored in the environment > v2.A4
data table: > v2.A4
þ Current graphics style entry number > v2.A4
þ Current button style entry number > v2.A4
þ Current drawing port entry number > v2.A4
þ Current text window entry number > v2.A4
þ Current color palette entry number > v2.A4
þ Current World coordinate dimensions (X and Y) > v2.A4
þ Current base math settings (36 or 64) > v2.A4
þ Current coordinate size (2 through 5) > v2.A4
þ Current color mode (color palette mode or direct RGB mode) > v2.A4
þ Current mouse pointer number > v2.A4
þ Current baud rate emulation value > v2.A4
When you switch from one environment to another, you are effectively > v2.A4
performing an entire "context swapping" operation. This might best > v2.A4
be taken with an example: > v2.A4
Let's say you have set up all of your data tables to work with > v2.A4
entry number 5 and entry 5 in each data table is the current > v2.A4
one. This could have an entire drawing environment defined for > v2.A4
a particular situation. Let's say that you have entry 6 in > v2.A4
every data table defined with a completely different > v2.A4
configuration of drawing environments. You could easily switch > v2.A4
between one drawing environment to another simply by switching > v2.A4
environments, in effect completely redefining your entire > v2.A4
drawing world. Nothing is destroyed in this switching process, > v2.A4
all you are doing is simply switching to another environment. > v2.A4
You would still be free to return to the previous environment > v2.A4
if you so desire (note that if you perform any reset operations > v2.A4
though, you best make sure that you protect things or they > v2.A4
will disappear when you reset). > v2.A4
Note that there isn't a "current mouse field data table entry". This > v2.A4
is because there's no such thing as a current mouse field in the > v2.A4
mouse field data table. So, switching from one environment to > v2.A4
another has no effect on the current mouse fields (unlike it would > v2.A4
with text windows, ports, graphical styles, palettes, etc). > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 38
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 2.2.1.7 þ MOUSE FIELD TABLE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
The mouse field data table is unlike the other data tables. It can > v2.A4
hold up to 128 separate mouse field definitions and does not have a > v2.A4
"current mouse field" entry number. Each mouse field that is defined > v2.A4
gets added to the mouse field data table at the very end until 128 > v2.A4
fields are defined, or the table is deleted and things start over. > v2.A4
Mouse fields only pertain to drawing port #0, so they can only be > v2.A4
on the screen, not on an offscreen drawing port. See the RIP_MOUSE, > v2.A4
RIP_BUTTON_STYLE and RIP_BUTTON command for more details on this > v2.A4
special data table. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 39
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 2.2.2 þ PROTECTED DATA TABLE ENTRIES º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
Data table entries by themselves have quite a bit of usefulness in > v2.A1
short-term situations where a lot of different configurations need to > v2.A1
be switched between fairly often. Their usefulness becomes even more > v2.A1
powerful with the concept of protected data table entries. A > v2.A1
protected entry is one that cannot be cleared by a normal reset > v2.A1
operation or a clear table entry operation until the entry is > v2.A1
unprotected, or until a "hard reset" operation is performed. In > v2.A4
addition, they cannot be modified while they are protected (see > v2.A4
below). > v2.A4
A "hard reset" is a complete reset of the RIPscrip environment. > v2.A1
Typically, a hard reset should only be performed immediately after > v2.A1
connection to a RIPscrip compatible host system to clear the slate so > v2.A1
to speak. Other uses for a hard reset are when the RIPscrip > v2.A1
environment is hopelessly corrupted due to line noise, or when a > v2.A1
complete re-synchronization of the enviornment is about to commence. > v2.A1
Protected entries become quite powerful when you look at a larger > v2.A1
host system. For example, let's say that throughout your system you > v2.A1
use five different graphical style configurations all over the place, > v2.A1
all of which require quite a bit of transmitted RIPscrip code. If > v2.A1
you define each of these styles as separate entries and then protect > v2.A1
them, you don't need to re-transmit those blocks of data again unless > v2.A1
a hard reset operation is performed! This can mean quite a bit of > v2.A1
saved data transmission, and consequently faster transmission times. > v2.A1
The same concept applies to text windows, ports, button styles, > v2.A4
graphics style, palette and environment tables. When taken from a > v2.A4
system-wide perspective, where many sections of the system may be > v2.A1
made by other manufacturers (eg, doors, BBS modules, etc), you may > v2.A1
not be able to count on whether a section of the system uses one > v2.A1
style or another, or does one kind of reset or another. Having > v2.A1
protected entries gives you the ability to protect your data > v2.A1
configurations so that these sub-sections do not destroy your data. > v2.A1
When you return from the sub-section, simply re-activate your table > v2.A1
configuration(s) and away you go. > v2.A1
We just described that a protected data table entry cannot be > v2.A4
deleted. We also mentioned that they cannot be modified. Let's > v2.A4
clarify what we mean by not modifiable. A data table entry that is > v2.A4
protected cannot be modified by any of the normal RIPscrip commands > v2.A4
or text variables that alter their basic configuration (eg, you > v2.A4
cannot alter the foreground drawing color in a protected graphical > v2.A4
style data table entry, etc). It should be noted however, that > v2.A4
normal drawing operations like rectangles, circles, etc, can still be > v2.A4
performed to a port that is protected. In this case, the port is > v2.A4
protected from having its "configuration" modified (eg, the viewport > v2.A4
cannot be modified nor can the actual port's orientation). The same > v2.A4
applies to text windows (eg, you can output text to a text window, > v2.A4
perform ANSI/VT-102 operations to it, erase it, etc, but you cannot > v2.A4
redefine it or delete it). One tiny exception rests with text > v2.A4
windows that support VT-102. VT-102 has an ANSI escape sequence that > v2.A4
allows you to alter the wrap/chop setting of text windows. Since > v2.A4
ANSI operations are allowed on protected text windows, this is > v2.A4
permissable even though it seemingly violates the nature of modifying > v2.A4
a text window's protected status. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 40
Terminal emulation modes are also unaffected by a text window's > v2.A4
protection status. If a text window is enabled, VT-102 mode can be > v2.A4
turned on or off because this is a "global" setting, not a text > v2.A4
window specific setting. Also, as noted later, RIPscrip processing > v2.A4
can be disabled via a special ANSI escape sequence. This does not > v2.A4
affect protection of text windows or drawing ports either. > v2.A4
With these things in mind, performing operations like "copying a > v2.A4
port's data to another port" where one or both are protected is > v2.A4
allowable because you are not altering the basic configuration or the > v2.A4
ports in question, you are simply altering their data contents. This > v2.A4
applies to "clipboard" related commands too which might dynamically > v2.A4
pick and choose ports to define. Since a clipboard related command > v2.A4
will auto-define a new port (if one doesn't already exist, it will > v2.A4
pick a currently undefined drawing port and define it (if it's not > v2.A4
defined, then it cannot be protected). > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 41
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 2.3 þ DATA BACKUP AREAS º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
A data backup area is a backup area that composes one base save area > v2.A3
and ten data save regions for specific data table types. The data > v2.A4
save regions are broken collectively up as a set of individually > v2.A4
addressable data save slots (like an array in most programming > v2.A4
languages), and a data save stack. Each data backup area can contain > v2.A4
up to eleven separate, complete data tables of one particular type - > v2.A4
one in the base save area, and up to ten other data tables in the > v2.A4
data save slots or the data save stack, or in some combination of > v2.A4
the two (save slots or stack). > v2.A4
Each data backup area can store only one particular type of data > v2.A4
table. For example, the color palette data backup area can only > v2.A4
store color palette data tables (remember a color palette data > v2.A4
table consists of 36 separate color palette definitions). > v2.A4
A data save slot is a backup area that is large enough to store an > v2.A3
entire specific data table, or other object (graphics screen, mouse > v2.A3
fields, etc). Each data backup area's save slots can hold one entire > v2.A3
data table of the type designated for the data backup area. Each > v2.A4
data save slot has a specific slot number associated with it (0-9). > v2.A4
When the data in a data save slot is restored back to the actual > v2.A4
RIPscrip drawing environment, that slot is deleted (cleared), > v2.A4
providing that it isn't protected (see below). > v2.A4
A base save area is very similar to a data save slot, except that a > v2.A3
base save area does not have a specific "slot number" associated with > v2.A4
it. Unlike data save slots, when you restore a data table object > v2.A3
from a base save area, the base save area is not cleared (ie, > v2.A3
deleted) so it can be restored multiple times without losing the > v2.A4
saved data (the base save area cannot be protected like data save > v2.A4
slots can be - see below for more details). > v2.A4
Finally, we have stack save areas. Stack save areas are like a > v2.A4
stack of plates - you put plates on top of the stack, and when you > v2.A4
want one, you take one off the top of the stack. The plate at the > v2.A4
bottom of the stack was the first plate placed on it, and to get to > v2.A4
it, you need to take off each of the plates above it to get to it. > v2.A4
When you place a data table onto a save stack, it is like placing a > v2.A4
plate on top of our stack of plates. This is extremely useful (in > v2.A4
fact, critical) to creating dialog boxes that overlap menus, and when > v2.A4
you close the dialog box, you restore the menu's environment. The > v2.A4
act of placing a data table onto a data save stack is called > v2.A4
"pushing" a table onto the stack. The act of removing a table from > v2.A4
the top of the stack is called "popping" a table from the stack. In > v2.A4
order to remember where the "top" of the stack is (ie, how many > v2.A4
layers are on the stack), a thing called a "stack pointer" is > v2.A4
maintained internally which is simply a count of the number of items > v2.A4
on the stack. Each time you add a new data table onto the stack, the > v2.A4
pointer is increased by one (we have one more item on the stack). > v2.A4
You can think of data tables and the data backup area conceptually > v2.A4
in the following diagram: > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 42
Data Table Data Backup Area > v2.A4
ÉÍÍÍÍÍÍÍÍ» ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» > v2.A4
entry 0 ÇÄÄÄÄÄÄÄĶ º º > v2.A4
entry 1 ÇÄÄÄÄÄÄÄĶ º Base Data Save Area º > v2.A4
entry 2 ÇÄÄÄÄÄÄÄĶ º º > v2.A4
entry 3 ÇÄÄÄÄÄÄÄĶ ÄÄÄ ÌÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍ͹ > v2.A4
entry 4 ÇÄÄÄÄÄÄÄĶ ³ º ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A4
entry 5 ÇÄÄÄÄÄÄÄĶ ³ º s ³ s ³ s ³ s ³ s ³ s ³ s ³ s ³ s ³ s º > v2.A4
entry 6 ÇÄÄÄÄÄÄÄĶ Data º l ³ l ³ l ³ l ³ l ³ l ³ l ³ l ³ l ³ l º > v2.A4
entry 7 ÇÄÄÄÄÄÄÄĶ Save º o ³ o ³ o ³ o ³ o ³ o ³ o ³ o ³ o ³ o º > v2.A4
entry 8 ÇÄÄÄÄÄÄÄĶ Slots º t ³ t ³ t ³ t ³ t ³ t ³ t ³ t ³ t ³ t º > v2.A4
entry 9 ÇÄÄÄÄÄÄÄĶ ³ º ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A4
ÇÄ .. Ķ ³ º 0 ³ 1 ³ 2 ³ 3 ³ 4 ³ 5 ³ 6 ³ 7 ³ 8 ³ 9 º > v2.A4
.. ³ º ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A4
.. ÄÄÄ ÇÄÄÄÅÄÄÄÅÄÄÄÅÄÄÄÅÄÄÄÅÄÄÄÅÄÄÄÅÄÄÄÅÄÄÄÅÄÄĶ > v2.A4
ÇÄ Ä¶ ³ º ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A4
entry N ÇÄÄÄÄÄÄÄĶ ³ º ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A4
ÈÍÍÍÍÍÍÍÍŒ Stack º ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A4
Save º ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A4
area º ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A4
³ º ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A4
³ º ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A4
³ º ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A4
ÄÄÄ ÈÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍŒ > v2.A4
/³\ > v2.A4
³ Stack > v2.A4
³ Pointer > v2.A4
Notice how there are ten different data save slots, and ten different > v2.A4
data save stack "locations". What this means is that individually, > v2.A4
either one of these may hold ten complete data tables. But combined, > v2.A4
they cannot both contain more than 10 complete data tables. What > v2.A4
this means is that you can have 4 separate tables saved in the data > v2.A4
save slots, and 6 data tables pushed onto the stack, but the you > v2.A4
wouldn't be able to store one more data table into an "open" data > v2.A4
save slot, or push it onto the save stack (the slot/stack system is > v2.A4
effectively "full"). The diagram above shows a completely empty > v2.A4
data backup area. > v2.A4
Let's take an example. Let's say we have tables saved to data save > v2.A4
slots 1, 3, 4, 6, 8 and 9 (six tables total), we could envision our > v2.A4
data slot/stack areas like this (we have nothing on the stack yet > v2.A4
in this example, so our stack pointer is 0, or pointing to the first > v2.A4
stack entry which is open for filling): > v2.A4
0 1 2 3 4 5 6 7 8 9 > v2.A4
ÄÄÄ ÉÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍ» > v2.A4
Data º ³±±±³ ³±±±³±±±³ ³±±±³ ³±±±³±±±º > v2.A4
Save º ³±±±³ ³±±±³±±±³ ³±±±³ ³±±±³±±±º > v2.A4
Slots º ³±±±³ ³±±±³±±±³ ³±±±³ ³±±±³±±±º > v2.A4
ÄÄÄ ÌÍÍÍØÍÍÍØÍÍÍØÍÍÍØÍÍÍØÍÍÍØÍÍÍØÍÍÍØÍÍÍØÍÍ͹ > v2.A4
Stack º ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A4
Save º ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A4
area º ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A4
ÄÄÄ ÈÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍŒ > v2.A4
/³\ > v2.A4
³ Stack > v2.A4
³ Pointer > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 43
If we now push three data tables onto our stack, we would have the > v2.A4
following diagram showing the data slot/stack areas: > v2.A4
0 1 2 3 4 5 6 7 8 9 > v2.A4
ÄÄÄ ÉÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍ» > v2.A4
Data º ³±±±³ ³±±±³±±±³ ³±±±³ ³±±±³±±±º > v2.A4
Save º ³±±±³ ³±±±³±±±³ ³±±±³ ³±±±³±±±º > v2.A4
Slots º ³±±±³ ³±±±³±±±³ ³±±±³ ³±±±³±±±º > v2.A4
ÄÄÄ ÌÍÍÍØÍÍÍØÍÍÍØÍÍÍØÍÍÍØÍÍÍØÍÍÍØÍÍÍØÍÍÍØÍÍ͹ > v2.A4
Stack º±±±³±±±³±±±³ ³ ³ ³ ³ ³ ³ º > v2.A4
Save º±±±³±±±³±±±³ ³ ³ ³ ³ ³ ³ º > v2.A4
area º±±±³±±±³±±±³ ³ ³ ³ ³ ³ ³ º > v2.A4
ÄÄÄ ÈÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍŒ > v2.A4
/³\ > v2.A4
³ Stack > v2.A4
³ Pointer > v2.A4
We now have nine data tables stored in our data slot/stack system. > v2.A4
We can only hold one more. If one more is pushed onto the stack, we > v2.A4
would have the following: > v2.A4
0 1 2 3 4 5 6 7 8 9 > v2.A4
ÄÄÄ ÉÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍ» > v2.A4
Data º ³±±±³ ³±±±³±±±³ ³±±±³ ³±±±³±±±º > v2.A4
Save º ³±±±³ ³±±±³±±±³ ³±±±³ ³±±±³±±±º > v2.A4
Slots º ³±±±³ ³±±±³±±±³ ³±±±³ ³±±±³±±±º > v2.A4
ÄÄÄ ÌÍÍÍØÍÍÍØÍÍÍØÍÍÍØÍÍÍØÍÍÍØÍÍÍØÍÍÍØÍÍÍØÍÍ͹ > v2.A4
Stack º±±±³±±±³±±±³±±±³ ³ ³ ³ ³ ³ º > v2.A4
Save º±±±³±±±³±±±³±±±³ ³ ³ ³ ³ ³ º > v2.A4
area º±±±³±±±³±±±³±±±³ ³ ³ ³ ³ ³ º > v2.A4
ÄÄÄ ÈÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍŒ > v2.A4
/³\ > v2.A4
³ Stack > v2.A4
³ Pointer > v2.A4
Our stack system is now full. We have four items on our stack and > v2.A4
six in our data save slots. If we tried to push another data table > v2.A4
onto our stack, the operation would be ignored (an error because our > v2.A4
slot/stack system is full). If we tried to store a data table to > v2.A4
data save slot #2 (which is currently open), it would also be ignored > v2.A4
because the slot/stack system is full. If however, we tried to > v2.A4
save a data table onto data save slot #3 (which is occupied), the > v2.A4
operation would be performed providing that data save slot #3 is not > v2.A4
protected (see below). > v2.A4
A stack restore (also known as a "pop") is a method of restoring a > v2.A3
data object from the data save stack into a data table. When you > v2.A4
perform a stack pop, the data table at the top of the stack (the > v2.A4
entry just below the stack pointer) is removed from the stack and > v2.A4
placed in the appropriate data table (which one is based on the type > v2.A4
of data that is stored in the data backup area). Once the restore > v2.A4
operation is complete, the entry in that location of the stack is > v2.A4
deleted (cleared), and the stack pointer is decremented by one, thus > v2.A4
making room for one more entry in the data save slot/stack system to > v2.A4
hold a new data table. > v2.A4
Each data backup area maintains its own stack pointer. Each backup > v2.A3
area's stack pointer is unique and completely unrelated to the stack > v2.A3
pointers of other backup areas. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 44
The base data save area is provided as a "temporary" storage location > v2.A4
for data tables. The slot/stack system is designed for more > v2.A4
permanent storage of tables. > v2.A4
All totalled, a data backup area can store eleven separate data > v2.A4
tables, and each data table in a data backup area is of the same type > v2.A4
of information (eg, text window, color palette, etc). If a data > v2.A4
table has 36 separate data table entries in it, then a data backup > v2.A4
area for that data table would hold 396 separate data table entries > v2.A4
in it! This makes for a lot of backup storage. You cannot > v2.A4
individually access sub-elements of a data table inside of a data > v2.A4
backup area - you can only save/restore "entire" data tables at any > v2.A4
one moment. > v2.A4
Push and pop operations are vital to the concept of multiple > v2.A4
overlapping windows and dialog boxes in RIPscrip. When you close a > v2.A4
window, you need to restore the background graphics, mouse regions, > v2.A4
text windows and any other data tables that were in use at the time > v2.A4
the dialog/window was created. What if that restored background is > v2.A4
itself a window that is on top of some background menu? That window > v2.A4
would also have tables pushed (the background environment). When > v2.A4
that window closes, it will pop the information and restore the > v2.A4
background environment's configuration. > v2.A4
There are fourteen distinctly separate ways of copying data > v2.A4
tables/objects around. They are depicted in the following diagram > v2.A4
and described in more detail immediately below: > v2.A4
Data Table > v2.A4
ÉÍÍÍÍÍÍÍÍÍÍÍÍ» 2 ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» > v2.A4
º º ÄÄÄÄÄÄ º Base Save Area º > v2.A4
ÇÄÄÄÄÄÄÄÄÄÄÄĶ 1ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ > v2.A4
º º 8 11 > v2.A4
ÇÄÄÄÄÄÄÄÄÄÄÄĶ ³ ³ > v2.A4
º º 9 ³ > v2.A4
ÇÄÄÄÄÄÄÄÄÄÄÄĶ ÉÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍ» ³ > v2.A4
º 7 º 4 º ³ ³ ³ ³ 14³ º ³ > v2.A4
ÇÄÄÄÄ ³ ÄÄÄÄĶ ÄÄÄÄÄÄ º ³ ³ ÄÄÄÄÄÄÄÄ ³ º ³ > v2.A4
º ³ º 3º ³ ³ ³ ³ ³ º ³ > v2.A4
ÇÄÄÄÄ ³ ÄÄÄÄĶ ÈÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍÍŒ ³ > v2.A4
º ³ º Data Save Slots 13 ³ > v2.A4
ÇÄÄÄÄÄÄÄÄÄÄÄĶ ³ ³ > v2.A4
º º 12 10 > v2.A4
ÇÄÄÄÄÄÄÄÄÄÄÄĶ 6 ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» > v2.A4
º º ÄÄÄÄÄÄ º Data Save Stack º > v2.A4
ÇÄÄÄÄÄÄÄÄÄÄÄĶ 5ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ > v2.A4
º º > v2.A4
ÈÍÍÍÍÍÍÍÍÍÍÍÍŒ > v2.A4
1. Copy a data table to the base save area > v2.A4
2. Copy the base save area to the data table > v2.A4
3. Copy a data table to a data save slot > v2.A4
4. Copy a data save slot to a data table > v2.A4
5. Push a data table onto the stack > v2.A4
6. Pop a data table from the stack into a data table > v2.A4
7. Copy an entry in a data table over another entry in the > v2.A4
same data table. > v2.A4
8. Copy a data save slot to the base save area > v2.A4
9. Copy the base save area to a data save slot > v2.A4
10. Push the base save area onto the data save stack > v2.A4
11. Pop a data table from the stack into the base save area > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 45
12. Push a data save slot table onto the stack > v2.A4
13. Pop a data table from the stack into a data save slot > v2.A4
14. Copy a data save slot to another data save slot > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 46
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 2.3.1 þ DATA BACKUP AREAS - PROTECTION AND RESTORATION º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
The way that a stack operates has been clearly outlined in the > v2.A4
previous section. When you store a data table onto the stack, it > v2.A4
grows by one table. When you pop a data table off of the stack, you > v2.A4
reduce the contents of the stack by one data table (ie, that data > v2.A4
table is deleted from the stack). > v2.A4
The base save area has already been described as a temporary storage > v2.A4
location. A data table in the base save area remains in the base > v2.A4
save area until it is either explicitly deleted, or until a hard > v2.A4
reset of the RIPscrip environment is performed. In this manner, the > v2.A4
base save area can be used as a source of a data table copy > v2.A4
operations many times and still read the same data table. > v2.A4
When you restore a data table from a data save slot back into the > v2.A4
actual data table on the other hand, that data save slot is deleted > v2.A4
(cleared) unless it is protected from deletion. In other words, just > v2.A4
like individual data table entries, you can individually protect > v2.A4
data save slots from deletion or overwriting. Only a data save slot > v2.A4
that is actually "in use" can be protected - it is pointless to > v2.A4
protect a data save slot that isn't holding a data table because what > v2.A4
would you do with it? You couldn't store anything in it and you > v2.A4
couldn't read anything from it, so this situation is not allowed. > v2.A4
There are only three ways of deleting or modifying a protected data > v2.A4
save slot (two of which involve manually unprotecting the slot): > v2.A4
1) Explicitly unprotect the slot and then overwrite or delete > v2.A4
it. > v2.A4
2) Explicitly unprotect the slot then copy the data table from > v2.A4
it to the actual data table designed to work with that data. > v2.A4
This deletes the contents of the slot once the copy > v2.A4
operation is complete. > v2.A4
3) Perform a hard reset of the RIPscrip environment. > v2.A4
The base save area cannot be protected and neither can the data save > v2.A4
stack. Protection goes against the very nature of these two backup > v2.A4
areas. > v2.A4
It should be noted that when a data table is stored in the data > v2.A4
backup area, any of the entries in that data table "retain" their > v2.A4
protection status! This means that if you restore a data table from > v2.A4
the backup area and put it back into action, the protection status > v2.A4
of each entry in the table is restored as well. > v2.A4
You cannot protect an entire data table. This means that if you have > v2.A4
entries in a data table that are protected and you perform a restore > v2.A4
operation from a backup area, this will overide any individual > v2.A4
entries in the data table with those stored in the actual data table > v2.A4
in the backup area. This is the only way that a data table entry's > v2.A4
protection status can be bypassed. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 47
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 2.3.2 þ INDIVIDUAL DATA BACKUP AREAS º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
There are data backup areas for the following types of information > v2.A3
(not all of them are normal data tables per se): > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 48
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 2.3.2.1 þ BUTTON STYLE TABLE SAVE AREA ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
A backup area for an entire button style data table (all 36 button > v2.A3
styles that may be defined). > v2.A4
This backup area stores the following information: > v2.A4
þ The current button style data table entry number > v2.A4
þ The actual button style data table (all 36 entries) > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 49
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 2.3.2.2 þ GRAPHICAL STYLE TABLE SAVE AREA ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
A backup area for an entire graphical style data table (all 36 > v2.A3
graphical styles that may be defined). > v2.A4
This backup area stores the following information: > v2.A4
þ The current graphical style data table entry number > v2.A4
þ The actual graphical style data table (all 36 entries) > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 50
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 2.3.2.3 þ DRAWING PORT TABLE SAVE AREA ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
A backup area that stores all 36 separately defined graphical ports > v2.A3
in the Port Table. Video Ports save only the specific definition of > v2.A3
the ports. Clipboard Ports store not only the port definition, but > v2.A3
also the graphical data that is saved inside the Clipboard Ports. > v2.A3
This backup area stores the following information: > v2.A4
þ The current drawing port data table entry number > v2.A4
þ The actual drawing port data table (all 36 entries) > v2.A4
þ All offscreen/clipboard ports' actual graphical contents > v2.A4
þ The current "floating" viewport query expression > v2.A4
þ The current "clipboard port pointer" (see RIP_GET_IMAGE for > v2.A4
more details). > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 51
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 2.3.2.4 þ TEXT WINDOW TABLE SAVE AREA ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
A backup area that stores the entire text window data table. This > v2.A3
stores all 36 of the possibly defined text window configurations. > v2.A3
Only the text window definitions are saved in these areas, not the > v2.A3
contents of the text window(s). > v2.A3
This backup area stores the following information: > v2.A4
þ The current text window data table entry number > v2.A4
þ The actual text window data table (all 36 entries) > v2.A4
þ The current "floating" text window query expression > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 52
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 2.3.2.5 þ COLOR PALETTE TABLE SAVE AREA ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
A backup area that stores all 36 currently defined color palettes in > v2.A3
the color palette data table. > v2.A4
This backup area stores the following information: > v2.A4
þ The current color palette data table entry number > v2.A4
þ The actual color palette data table (all 36 entries) > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 53
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 2.3.2.6 þ MOUSE FIELD TABLE SAVE AREA ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
A backup area that stores all currently defined simple mouse fields > v2.A4
and mouse button fields currently active on the screen. The mouse > v2.A3
field boundaries and any mouse button configuration data is stored. > v2.A3
Mouse fields do not have a directly accessible data table. In other > v2.A3
words, you cannot directly protect a specific entry in the mouse > v2.A3
field data table. The mouse field data table is different than > v2.A3
normal data tables in that they can have up to 128 separate table > v2.A3
entries and are not directly accessible like other simpler data > v2.A3
tables like graphical style data tables, etc. When a mouse button > v2.A3
definition is restored, the graphics displayed for a button are not > v2.A3
restored - only the internal mouse button field definitions are > v2.A4
restored. > v2.A3
This backup are stores the following information:
þ The total number of mouse fields defined > v2.A4
þ The actual mouse field data table (up to 128 entries) > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 54
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 2.3.2.7 þ SCREEN SAVE AREA ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
The screen save area is a special data backup area. The screen > v2.A3
backup area has no real data table related to it, although you could > v2.A4
think of it as a data table of video scan lines where each entry > v2.A4
in the data table is one scan line of graphical data. The data save > v2.A4
slots and the base save area of the screen backup area each contain a > v2.A3
complete bitmap representation of a graphical screen, and its > v2.A3
associated color palette. This backup area embodies some of the > v2.A3
concepts of the drawing port backup area when it stores a Clipboard > v2.A3
Port and also parts of the color palette backup area. This backup > v2.A3
area allows you to have up to eleven separately saved graphical > v2.A3
screens. > v2.A3
This backup are stores the following information: > v2.A4
þ The current color palette actually in use on the video > v2.A4
hardware (if any) > v2.A4
þ The graphical screen contents of the data screen > v2.A4
þ The on/off status of the status bar. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 55
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 2.3.2.8 þ ENVIRONMENT TABLE SAVE AREA ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
The environment save area is a backup area to store the entire > v2.A4
environment data table (all 36 entries). It is used for the purpose > v2.A4
of backing up the entire environment table for later restoration. > v2.A4
This backup area stores the following information: > v2.A4
þ The current environment data table entry number > v2.A4
þ The actual environment data table (all 36 entries) > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 56
{$SEC:1.7:INTERNATIONAL SUPPORT IN RIPscrip}
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 2.3.2.8 þ INTERNATIONAL SUPPORT IN RIPSCRIP º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
The RIPscrip language itself is not tied to any particular language. > v2.A2
However, there is a need to establish a means of determining and > v2.A2
specifying what RIPscrip / text window fonts with special characters > v2.A2
should be used, and what language should be used in the terminal > v2.A2
software. It is up to the individual application to use whatever > v2.A2
files it needs to support a particular language. RIPscrip provides > v2.A2
a standardized way of specifying the language support to use. A > v2.A4
character code will be used for each of the languages supported. > v2.A4
Currently, English is the only supported language in RIPscrip. This > v2.A4
will be changing in the future, so for the purposes of multi-lingual > v2.A4
extensibility, we are establishing a convention now. The current > v2.A4
list of supported languages and their three character codes are as > v2.A4
follows: > v2.A4
ÉÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º Code ³ Description of Language º > v2.A4
ÌÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹ > v2.A4
º ENG ³ English º > v2.A4
ÈÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
The means of setting the language is for the user to specify in the > v2.A2
terminal, preferably in the dialing directory. This allows the user > v2.A2
to select a different language for different systems. There is no > v2.A2
ability for the host to specify to the terminal what language to use. > v2.A2
The means of finding out what languages the terminal supports will be > v2.A2
handled via the $IFS()$ text variable. For example, if the host were > v2.A2
to query the terminal with a $IFS(ENG)$, the terminal would respond > v2.A4
with `YES'. > v2.A2
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 57
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 2.4 þ NUMERICAL PARAMETERS - FORMATS AND BASE-MATH VARIATIONS º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
Throughout the RIPscrip specification, numeric parameters are used > v2.A0
extensively to indicate where to draw things, how to draw things and > v2.A0
various other pieces of information. For compactness, we do not use > v2.A0
numbers that are normal decimal numbers (base-10). By default, > v2.A0
RIPscrip uses base-36 numbers (Hexa-Tri-Decimal or more fondly, > v2.A0
MegaNums) which use the digits 0-9 followed by A-Z. This was the > v2.A0
original numbering system used in the 1.xx specification. > v2.A0
In the 2.xx specification, the base math can be altered to something > v2.A0
other than base-36! With v2.xx, we are introducing a new numbering > v2.A0
scheme that is base-64, otherwise known as Quadra-Hexa-Decimal, or > v2.A0
more fondly known as UltraNums. UltraNums use the following digits: > v2.A0
0-9 A-Z a-z # & > v2.A3
With this numbering scheme, you can squeeze larger numbers into an > v2.A0
even smaller space than MegaNums! Here is a table showing how big of > v2.A0
a number can be contained with X number of digits: > v2.A0
Decimal Hexa-Decimal MegaNums UltraNums > v2.A0
ÉÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» > v2.A0
1º 9 ³ 15 ³ 35 ³ 63 º > v2.A0
Total 2º 99 ³ 255 ³ 1,295 ³ 4,095 º > v2.A0
Digits 3º 999 ³ 4,095 ³ 46,655 ³ 262,143 º > v2.A0
(X) 4º 9,999 ³ 65,535 ³ 1,679,615 ³ 16,777,215 º > v2.A4
5º 99,999 ³ 1,048,575 ³ 60,466,175 ³ 1,073,741,823 º > v2.A2
6º 999,999 ³ 16,777,215 ³ 2,176,782,335 ³ 68,719,476,735 º > v2.A2
ÈÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ > v2.A0
A RIPscrip Header command can be used to specify the global base math > v2.A0
used throughout the command sets. By altering the base math, you can > v2.A0
make a single numeric parameter accept larger values without > v2.A0
expanding the parameter in the specification. A couple of the > v2.A0
RIPscrip commands utilize specific base math values (eg, UltraNums, > v2.A0
etc) under certain circumstances. Any commands that are exceptions > v2.A0
like this will be clearly documented as being exceptions to the rule. > v2.A0
NOTE: 6 digit UltraNums cannot be easily represented under most > v2.A3
personal computer compilers (beyond 32 bits). Therefore, > v2.A3
UltraNums beyond 5 digits probably should not be used in a > v2.A3
real world situation.
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 58
The following is a basic table of Decimal, MegaNum and UltraNum > v2.A0
values: > v2.A0
ÉÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍ» ÉÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍ»
º Decimal ³ MegaNum ³ UltraNum º º Decimal ³ MegaNum ³ UltraNum º > v2.A0
ÌÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍ͹ ÌÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍ͹ > v2.A0
º 00 ³ 0 ³ 0 º º 32 ³ 0W ³ W º > v2.A0
º 01 ³ 01 ³ 1 º º 33 ³ 0X ³ X º > v2.A0
º 02 ³ 02 ³ 2 º º 34 ³ 0Y ³ Y º > v2.A0
º 03 ³ 03 ³ 3 º º 35 ³ 0Z ³ Z º > v2.A0
º 04 ³ 04 ³ 4 º º 36 ³ 10 ³ a º > v2.A0
º 05 ³ 05 ³ 5 º º 37 ³ 11 ³ b º > v2.A0
º 06 ³ 06 ³ 6 º º 38 ³ 12 ³ c º > v2.A0
º 07 ³ 07 ³ 7 º º 39 ³ 13 ³ d º > v2.A0
º 08 ³ 08 ³ 8 º º 40 ³ 14 ³ e º > v2.A0
º 09 ³ 09 ³ 9 º º 41 ³ 15 ³ f º > v2.A0
º 10 ³ 0A ³ A º º 42 ³ 16 ³ g º > v2.A0
º 11 ³ 0B ³ B º º 43 ³ 17 ³ h º > v2.A0
º 12 ³ 0C ³ C º º 44 ³ 18 ³ i º > v2.A0
º 13 ³ 0D ³ D º º 45 ³ 19 ³ j º > v2.A0
º 14 ³ 0E ³ E º º 46 ³ 1A ³ k º > v2.A0
º 15 ³ 0F ³ F º º 47 ³ 1B ³ l º > v2.A0
º 16 ³ 0G ³ G º º 48 ³ 1C ³ m º > v2.A0
º 17 ³ 0H ³ H º º 49 ³ 1D ³ n º > v2.A0
º 18 ³ 0I ³ I º º 50 ³ 1E ³ o º > v2.A0
º 19 ³ 0J ³ J º º 51 ³ 1F ³ p º > v2.A0
º 20 ³ 0K ³ K º º 52 ³ 1G ³ q º > v2.A0
º 21 ³ 0L ³ L º º 53 ³ 1H ³ r º > v2.A0
º 22 ³ 0M ³ M º º 54 ³ 1I ³ s º > v2.A0
º 23 ³ 0N ³ N º º 55 ³ 1J ³ t º > v2.A0
º 24 ³ 0O ³ O º º 56 ³ 1K ³ u º > v2.A0
º 25 ³ 0P ³ P º º 57 ³ 1L ³ v º > v2.A0
º 26 ³ 0Q ³ Q º º 58 ³ 1M ³ w º > v2.A0
º 27 ³ 0R ³ R º º 59 ³ 1N ³ x º > v2.A0
º 28 ³ 0S ³ S º º 60 ³ 1O ³ y º > v2.A0
º 29 ³ 0T ³ T º º 61 ³ 1P ³ z º > v2.A0
º 30 ³ 0U ³ U º º 62 ³ 1Q ³ # º > v2.A0
º 31 ³ 0V ³ V º º 63 ³ 1R ³ & º > v2.A0
ÈÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍŒ ÈÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍŒ
The following C code fragment provides you with a way of converting > v2.A0
decimal numbers to an UltraNum format: > v2.A0
char ultra_num_table[64] = { > v2.A0
'0', '1', '2', '3', '4', '5', '6', '7', > v2.A0
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F', > v2.A0
'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', > v2.A0
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', > v2.A0
'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', > v2.A0
'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', > v2.A0
'm', 'n', 'o', 'p', 'q', 'r', 's', 't', > v2.A0
'u', 'v', 'w', 'x', 'y', 'z', '#', '&' > v2.A3
}; > v2.A0
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 59
char *Dec2Ultra(long value) > v2.A0
{ > v2.A0
static char buf[8]; > v2.A0
int part, pos=0; > v2.A0
setmem(buf, 0, 8); > v2.A0
while (value >= 64L) { > v2.A0
part = value & 0x003Fl; > v2.A0
value = value >> 6; > v2.A0
buf[pos++] = ultra_num_table[part]; > v2.A0
} > v2.A0
if (value) { > v2.A0
buf[pos++] = ultra_num_table[value]; > v2.A0
} > v2.A0
strrev(buf); > v2.A0
return(buf); > v2.A0
} > v2.A0
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 60
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 2.5 þ WORLD COORDINATE SYSTEMS º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
Starting with the v2.0 specification of RIPscrip, we have introduced > v2.A0
a "world coordinate system". This means that you can alter the base > v2.A0
coordinate system used to address the video's physical device > v2.A0
coordinate system. This is the first step in achieving device > v2.A0
independence. Each coordinate system is called a "Coordinate Frame". > v2.A0
There are actually two distinct levels of coordinate systems. From > v2.A4
the lowest (least abstract) to the highest level (the drawing board) > v2.A0
you have the following coordinate systems: > v2.A0
1) DEVICE COORDINATE FRAME - the resolution of the actual > v2.A0
display device. This is not determined as part of the > v2.A0
RIPscrip language itself, it is actually determined by > v2.A0
the terminal - based upon whatever type of video > v2.A0
hardware is present (and what mode the user has chosen). > v2.A0
2) WORLD COORDINATE FRAME - This is the master coordinate > v2.A0
system. This is the global set of coordinates. Ideally, > v2.A0
it should be higher in dimensions than the Device Frame > v2.A0
so that you do not lose resolution when "mapping" > v2.A0
X/Y coordinates from the world coordinate system to the > v2.A0
device coordinate system. If the dimensions of the > v2.A0
World Frame are the same as the Device Frame then the > v2.A0
mapping operation between World and Device Frames are > v2.A0
identical and can be skipped entirely since an X/Y > v2.A0
coordinate in the World Frame directly corresponds to > v2.A0
a pixel location in the Device Frame. > v2.A0
The maximum dimensions of the world coordinate frame is > v2.A4
65535x65535. > v2.A4
Since versions of the RIPscrip specification prior to v2.0 were based > v2.A0
on a 640x350 resolution without any World Frame, a suitable set of > v2.A0
defaults need to be assumed for the World Frame and the Logical > v2.A0
Frame. The World Frame would be set to a dimension of 640 across and > v2.A0
350 high. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 61
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 2.6 þ THE MATHEMATICS OF GRAPHICS AND COORDINATES º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
Mathematics, unlike graphics, is abstract in nature. Graphics on the > v2.A0
other hand, is very discrete in nature. A pixel in graphics is the > v2.A0
smallest displayable element on a graphics screen (Picture Element). > v2.A0
The corresponding concept in mathematics is a single point. A pixel > v2.A0
has a discrete size and shape in graphics whereas in mathematics, a > v2.A0
point is infinitely small and occupies no physical space in the > v2.A0
cartesian coordinate system in which it exists. > v2.A0
In graphics we use the concept of coordinates and points to specify > v2.A0
where a pixel is located. If graphics were like mathematics where a > v2.A0
pixel was infinitely small, a graphics monitor wouldn't show anything > v2.A0
other than black because a pixel would be infinitely small surrounded > v2.A0
by blackness. But this is not the case. Graphics hardware has to > v2.A0
have pixels defined as discrete areas of the screen - addressable > v2.A0
areas of the screen that can be set to a particular color. This is > v2.A0
how we see things on the screen, as individual pixels of data used > v2.A0
together to represent some kind of image. > v2.A0
Just like the point in mathematics, a line is infinitely thin, but > v2.A0
has length. A line is composed of an infinite number of points > v2.A0
between the beginning and ending locations of the line. > v2.A0
Relating these two distinctly different concepts to each other though > v2.A0
doesn't always lend itself to a simple situation to understand. On > v2.A0
the surface, a pixel's coordinate location appears to be the same > v2.A0
thing as it is in mathematics. But, when you get into deeper issues > v2.A0
of graphics theory this isn't truly the case because of the > v2.A0
difference in sizes of a point compared to a pixel. In math, points > v2.A0
don't have to be on even integer boundaries - they can be fractional. > v2.A0
A point can be at (2.53,1.295), whereas in graphics, a pixel cannot > v2.A0
be at a fractional location - there's no such thing as a part of a > v2.A0
pixel! > v2.A0
A graphics screen is designed so that every pixel location on the > v2.A0
screen has a unique location specified (in human terms) as an X/Y > v2.A0
coordinate pair. This is called the Cartesian Coordinate System. It > v2.A0
is by far one of the easiest ways of representing a coordinate in a > v2.A0
two-dimensional world like a monitor. If you zoom in closely on a > v2.A0
monitor and look at the layout of pixels and their relationships to > v2.A0
coordinates, you might see something like this: > v2.A0
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 62
(X DIMENSION) > v2.A0
1³1³1³1³1³1³1³1³1³1³2³2³2³2³ > v2.A0
³0³1³2³3³4³5³6³7³8³9³0³1³2³3³4³5³6³7³8³9³0³1³2³3³ > v2.A0
ÄÄÉÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍ» > v2.A0
0º ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A0
ÄÄÇÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
1º ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A0
ÄÄÇÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
Y 2º ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³Û³Û³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A0
ÄÄÇÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
D 3º ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³Û³Û³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A0
I ÄÄÇÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
M 4º ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A0
E ÄÄÇÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
N 5º ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A0
S ÄÄÇÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
I 6º ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A0
O ÄÄÇÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
N 7º ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A0
ÄÄÇÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
8º ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A0
ÄÄÈÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍŒ > v2.A0
If you look at the previous diagram, you can see that there is a grid > v2.A0
of pixels that is 24 pixels wide (the X direction) and 10 pixels high > v2.A0
(the Y direction). Each of the squares is a black pixel. The pixels > v2.A0
contain a "#" are considered white pixels. There are four pixels > v2.A0
that are ON in this diagram, at locations (11,2), (12,2), (11,3) and > v2.A0
(12,3). This is how graphics hardware addresses graphics pixels, by > v2.A0
specifying an X/Y coordinate location for a pixel to turn it on or > v2.A0
off (or more generally, to set it to a particular color). > v2.A0
If you look closely at the locations of the coordinates in the > v2.A0
previous diagram, the X/Y coordinates address the physical pixel > v2.A0
cells themselves. Each pixel cell is separated by infinitely thin > v2.A0
lines - the pixel cells' borders so to speak. Now, each pixel is > v2.A0
physically adjacent to the ones next to it and there are no gaps > v2.A0
between them. This is the way graphics hardware works. > v2.A0
Now that we've described the way graphics hardware addresses pixel > v2.A0
locations, let's look at why it's not really the best way of > v2.A0
describing graphics mathematically. For the hardware, this is the > v2.A0
best way of handling things, but mathematically, it's not. > v2.A0
The world of graphics hardware has many different facets. One > v2.A0
graphics display device can often times display graphics at different > v2.A0
resolutions. A typical video card on the IBM-PC can display graphics > v2.A0
at 320x200, 640x350, 640x400, 640x480, 800x600, 1024x768 and even as > v2.A0
high as 1280x1024 and higher. That's quite a bit of difference in > v2.A0
pixel grids (like the one shown earlier). Not only can the number of > v2.A0
pixels change horizontally and vertically, but when the resolutions > v2.A0
get higher, the pixels get smaller and harder to see. When graphics > v2.A0
hardware can achieve a resolution of infinity by infinity, then we > v2.A0
will have achieved perfect sight (like what we see around us). But > v2.A0
obviously, this will probably never happen in our lifetimes (or our > v2.A0
great granchildren's for that matter). > v2.A0
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 63
What would happen if you had a line drawn on a graphics screen from > v2.A0
coordinates (0,0) to (639,349) at 640x350 resolution? You would > v2.A0
have a nice little line on the screen that stretches from the upper- > v2.A0
left corner to the lower-right corner. Now, if you drew the same > v2.A0
line at 800x600 resolution? Your line would no longer go all the way > v2.A0
to the bottom of the screen or to the far right of the screen. It > v2.A0
would stop about 2/3'rds of the way down and over. > v2.A0
The problems start to come up with mathematics and graphical > v2.A0
representations when we try to make something look the same at one > v2.A0
resolution as it does in another (resolution independence). Sure > v2.A0
you can translate a coordinate in one resolution to some other > v2.A0
coordinate in a different resolution. All you need to know are the > v2.A0
dimensions of each resolution and a bit of algebra. But pixels > v2.A0
aren't the same thickness! The line described previously could still > v2.A0
be drawn properly to the lower-right of the screen, but it would > v2.A0
appear a lot thinner. You could try drawing two lines offset by one > v2.A0
pixel location and you would come "close" to the original thickness > v2.A0
of the line at 640x350 resolution, but it wouldn't be a perfect > v2.A0
match. A perfect match is a rare thing when dealing with different > v2.A0
resolutions. > v2.A0
Now, on to the real issue at hand here: translation of coordinates. > v2.A0
We won't worry about the size of pixels, but will concentrate on > v2.A0
getting the locations of points correct at different resolutions. > v2.A0
Let's say you have a screen at 640x350 resolution with two filled > v2.A0
rectangles drawn on it. The first rectangle is drawn from (2,1) to > v2.A0
(4,3) and the second one is drawn from (5,1) to (7,3) like this: > v2.A0
³0³1³2³3³4³5³6³7³8³9³ > v2.A0
ÄÄÉÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍ» > v2.A0
0º ³ ³ ³ ³ ³ ³ ³ ³ ³ º 1st: (2,1) - (4,3) > v2.A0
ÄÄÇÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ 2nd: (5,1) - (7,3) > v2.A0
1º ³ ³Û³Û³Û³°³°³°³ ³ º > v2.A0
ÄÄÇÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
2º ³ ³Û³Û³Û³°³°³°³ ³ º > v2.A0
ÄÄÇÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
3º ³ ³Û³Û³Û³°³°³°³ ³ º > v2.A0
ÄÄÇÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
4º ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A0
ÄÄÈÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍŒ > v2.A0
Now, you notice that both rectangles are right next to each other. > v2.A0
There are no gaps between them. Now, if you tried to draw these same > v2.A0
two rectangles on a graphics screen that was 1280x700 pixels in size, > v2.A0
and tried to make it appear in the exact same location and size on > v2.A0
the monitor, you would have to translate the corners of the > v2.A0
rectangles to the new resolution and re-plot the rectangles. Now, > v2.A0
640x2 is 1280 and 350x2 is 700 so our new resolution is exactly twice > v2.A0
as large in both the X and Y directions (this is RARELY the case!). > v2.A0
So, in order to translate our original coordinates to this resolution > v2.A0
we simply multiply the numbers by 2. Pretty simple. Our previous > v2.A0
rectangles in their old untranslated state and the newly translated > v2.A0
ones would be: > v2.A0
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» > v2.A0
º Untranslated ³ Translated º > v2.A0
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹ > v2.A0
º Rectangle 1 º (2,1) - (4,3) ³ (4,2) - (8,6) º > v2.A0
º Rectangle 2 º (5,1) - (7,3) ³ (10,2) - (14,6) º > v2.A0
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ > v2.A0
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 64
Now, let's plot these two rectangles on our new graphics screen at > v2.A0
the newly translated coordinates: > v2.A0
(X DIMENSION) > v2.A0
³1³1³1³1³1³1³1³ > v2.A0
³0³1³2³3³4³5³6³7³8³9³0³1³2³3³4³5³6³ > v2.A0
ÄÄÉÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍÑÍ» > v2.A0
0º ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A0
ÄÄÇÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
1º ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A0
ÄÄÇÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
Y 2º ³ ³ ³ ³Û³Û³Û³Û³Û³ ³°³°³°³°³°³ ³ º > v2.A0
ÄÄÇÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
D 3º ³ ³ ³ ³Û³Û³Û³Û³Û³ ³°³°³°³°³°³ ³ º > v2.A0
I ÄÄÇÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
M 4º ³ ³ ³ ³Û³Û³Û³Û³Û³ ³°³°³°³°³°³ ³ º > v2.A0
E ÄÄÇÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
N 5º ³ ³ ³ ³Û³Û³Û³Û³Û³ ³°³°³°³°³°³ ³ º > v2.A0
S ÄÄÇÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
I 6º ³ ³ ³ ³Û³Û³Û³Û³Û³ ³°³°³°³°³°³ ³ º > v2.A0
O ÄÄÇÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
N 7º ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A0
ÄÄÇÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
8º ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A0
ÄÄÈÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍŒ > v2.A0
What happened? We now have a black line in between the two > v2.A0
rectangles. That's definitely not what we wanted to happen. Why did > v2.A0
this happen? It's partly because of the nature of graphics hardware > v2.A0
in the way they address pixels, and partly the way we humans think of > v2.A0
pixels mathematically from a programming standpoint. What we need is > v2.A0
a better mathematical representation of pixels and graphics > v2.A0
coordinates so that when we translate coordinates these things don't > v2.A0
happen. > v2.A0
As we mentioned earlier, the lines on the above diagram represent the > v2.A0
borders around each pixel. Each of these lines, like their > v2.A0
mathematical counterparts, are infinitely thin. The only thing in > v2.A0
the above diagram that has any size (or area) physically are the > v2.A0
pixels themselves. Since the boundary lines around the pixels are > v2.A0
defining the area that the pixel will occupy, it makes sense that we > v2.A0
should think of those lines as the actual coordinates. If we think > v2.A0
of the areas in between the pixels as the actual coordinates, we can > v2.A0
think of pixels as the areas in between coordinates that are filled > v2.A0
in with color. So, if we said to draw a filled in rectangle like we > v2.A0
did earlier, we would actually be saying "fill in this rectangle's > v2.A0
interior". Just like coloring books as a child, you have to stay > v2.A0
inside the lines (or at least we're supposed to). Think about pixels > v2.A0
as spots between the lines that get filled in with color just like a > v2.A0
coloring book - the only difference is, a pixel cannot go outside the > v2.A0
lines (don't you wish you were a pixel when you were younger?). > v2.A0
Using this new way of thinking of graphics is not very difficult, it > v2.A0
just seems a bit odd -especially if you've been working with graphics > v2.A0
for awhile. To draw the previous two rectangles properly the > v2.A0
coordinates for them would have to be changed somewhat - like this: > v2.A0
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 65
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» > v2.A0
º (old method) º > v2.A0
ÇÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ > v2.A0
º Untranslated ³ Translated º > v2.A0
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹ > v2.A0
º Rectangle 1 º (2,1) - (4,3) ³ (4,2) - (8,6) º > v2.A0
º Rectangle 2 º (5,1) - (7,3) ³ (10,2) - (14,6) º > v2.A0
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ > v2.A0
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» > v2.A0
º (new method) º > v2.A0
ÇÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ > v2.A0
º UNTRANSLATED ³ TRANSLATED º > v2.A0
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹ > v2.A0
º RECTANGLE 1 º (2,1) - (5,4) ³ (4,2) - (10,8) º > v2.A0
º RECTANGLE 2 º (5,1) - (8,4) ³ (10,2) - (16,8) º > v2.A0
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ > v2.A0
Notice that the untranslated rectangles' coordinates are almost the > v2.A0
same. In fact, the upper-left coordinates haven't changed at all. > v2.A0
The only coordinates that have changed are the lower-right > v2.A0
coordinates, and only by one pixel location. Now, if we draw these > v2.A0
two rectangles using our new mathematical model for graphics, we > v2.A0
would get the following (in both resolution examples: > v2.A0
1 1 1 1 1 1 1 1 > v2.A0
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 > v2.A0
0ÉÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍ» > v2.A0
1 º ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A0
0 1 2 3 4 5 6 7 8 9 0 1×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
0ÉÍØÍØÍØÍØÍØÍØÍØÍØÍØÍ» º ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A0
º ³ ³ ³ ³ ³ ³ ³ ³ ³ º 2×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
1×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ º ³ ³ ³ ³Û³Û³Û³Û³Û³Û³°³°³°³°³°³ ³ º > v2.A0
º ³ ³Û³Û³Û³°³°³°³ ³ º 3×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
2×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ º ³ ³ ³ ³Û³Û³Û³Û³Û³Û³°³°³°³°³°³ ³ º > v2.A0
º ³ ³Û³Û³Û³°³°³°³ ³ º 4×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
3×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ º ³ ³ ³ ³Û³Û³Û³Û³Û³Û³°³°³°³°³°³ ³ º > v2.A0
º ³ ³Û³Û³Û³°³°³°³ ³ º 5×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
4×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ º ³ ³ ³ ³Û³Û³Û³Û³Û³Û³°³°³°³°³°³ ³ º > v2.A0
º ³ ³ ³ ³ ³ ³ ³ ³ ³ º 6×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
5ÈÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍŒ º ³ ³ ³ ³Û³Û³Û³Û³Û³Û³°³°³°³°³°³ ³ º > v2.A0
7×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
º ³ ³ ³ ³Û³Û³Û³Û³Û³Û³°³°³°³°³°³ ³ º > v2.A0
8×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
º ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A0
9ÈÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍŒ > v2.A0
If you look closely at the two graphs above you may notice a subtle > v2.A0
difference in the numbering of the coordinates. The numbers are all > v2.A0
there, but instead of labeling the cells themselves with coordinates, > v2.A0
we have labeled the lines in between as the coordinates. When we say > v2.A0
to draw a rectangle from (2,1) to (5,4) we are saying to draw a > v2.A0
filled in area "between" coordinate lines 2 and 5 in the X direction > v2.A0
and 1 and 4 in the Y direction. If you look closely at the upper > v2.A0
left diagram, you will notice that is exactly what we have done. Now > v2.A0
look closely at the upper right diagram. There are no gaps between > v2.A0
the rectangles now. Also if you look at the translated coordinates, > v2.A0
the right edge of the first rectangle is at X coordinate 10, and the > v2.A0
left edge of the second rectangle is also at X coordinate 10. But > v2.A0
they don't overlap each other. That's the part about this new way of > v2.A0
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 66
thinking about things that gives people the hardest time. > v2.A0
So far so good. Let's look at another example - one which draws the > v2.A0
same two rectangles but this time, let's not fill them in. The > v2.A0
diagram below shows the two at both example resolutions: > v2.A0
1 1 1 1 1 1 1 1 > v2.A0
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 > v2.A0
0ÉÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍ» > v2.A0
1 º ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A0
0 1 2 3 4 5 6 7 8 9 0 1×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
0ÉÍØÍØÍØÍØÍØÍØÍØÍØÍØÍ» º ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A0
º ³ ³ ³ ³ ³ ³ ³ ³ ³ º 2×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
1×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ º ³ ³ ³ ³Û³Û³Û³Û³Û³Û³°³°³°³°³°³ ³ º > v2.A0
º ³ ³Û³Û³Û³°³°³°³ ³ º 3×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
2×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ º ³ ³ ³ ³Û³ ³ ³ ³ ³ ³°³ ³ ³ ³°³ ³ º > v2.A0
º ³ ³Û³ ³ ³°³ ³°³ ³ º 2×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
3×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ º ³ ³ ³ ³Û³ ³ ³ ³ ³ ³°³ ³ ³ ³°³ ³ º > v2.A0
º ³ ³Û³Û³Û³°³°³°³ ³ º 5×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
4×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ º ³ ³ ³ ³Û³ ³ ³ ³ ³ ³°³ ³ ³ ³°³ ³ º > v2.A0
º ³ ³ ³ ³ ³ ³ ³ ³ ³ º 6×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
5ÈÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍŒ º ³ ³ ³ ³Û³ ³ ³ ³ ³ ³°³ ³ ³ ³°³ ³ º > v2.A0
7×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
º ³ ³ ³ ³Û³Û³Û³Û³Û³Û³°³°³°³°³°³ ³ º > v2.A0
8×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A0
º ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A0
9ÈÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍŒ > v2.A0
Not what you thought would happen, was it? This example illustrates > v2.A0
a key point in our mathematical model of graphics: that there is a > v2.A0
difference between filled objects and outlined objects. Filled > v2.A0
objects fill everything inside an enclosed area whereas an outline > v2.A0
(one or more lines) uses pixels to approximate an infinitely thin > v2.A0
line. When lines and points are plotted on the video device, they > v2.A0
are "rounded up" to the next highest pixel location. So, a point at > v2.A0
(4,2) would not be on the intersecting lines at (4,2), it would be a > v2.A0
pixel activated between 4 and 5 on the X axis and 2 and 3 on the Y > v2.A0
axis. Look at the upper right diagram to convince yourself this is > v2.A0
the case. Filled-in areas on the other hand, do not round up to the > v2.A0
next highest pixel locations. They always fill in an area in-between > v2.A0
the boundary lines. This means that in a filled-in rectangle, the > v2.A0
right and bottom edges are "off by one" so to speak. > v2.A0
To better illustrate these two different situations, we will draw a > v2.A0
filled-in rectangle and a non-filled rectangle both using the same > v2.A0
dimensions at the same resolution, then we will superimpose them on > v2.A4
top of each other to better show the differences;
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 67
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 > v2.A4
0ÉÍØÍØÍØÍØÍØÍØÍØÍØÍ» 0ÉÍØÍØÍØÍØÍØÍØÍØÍØÍ» 0ÉÍØÍØÍØÍØÍØÍØÍØÍØÍ» > v2.A4
º ³ ³ ³ ³ ³ ³ ³ ³ º º ³ ³ ³ ³ ³ ³ ³ ³ º º ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A4
1×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ 1×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ 1×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A4
º ³°³°³°³°³°³°³ ³ º º ³Û³Û³Û³Û³Û³Û³Û³ º º ³±³±³±³±³±³±³Û³ º > v2.A4
2×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ 2×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ 2×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A4
º ³°³°³°³°³°³°³ ³ º º ³Û³ ³ ³ ³ ³ ³Û³ º º ³±³°³°³°³°³°³Û³ º > v2.A4
3×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ 3×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ 3×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A4
º ³°³°³°³°³°³°³ ³ º º ³Û³ ³ ³ ³ ³ ³Û³ º º ³±³°³°³°³°³°³Û³ º > v2.A4
4×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ 4×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ 4×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A4
º ³°³°³°³°³°³°³ ³ º º ³Û³ ³ ³ ³ ³ ³Û³ º º ³±³°³°³°³°³°³Û³ º > v2.A4
5×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ 5×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ 5×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A4
º ³ ³ ³ ³ ³ ³ ³ ³ º º ³Û³Û³Û³Û³Û³Û³Û³ º º ³Û³Û³Û³Û³Û³Û³Û³ º > v2.A4
6×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ 6×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ 6×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A4
º ³ ³ ³ ³ ³ ³ ³ ³ º º ³ ³ ³ ³ ³ ³ ³ ³ º º ³ ³ ³ ³ ³ ³ ³ ³ º > v2.A4
7ÈÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍŒ 7ÈÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍŒ 7ÈÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍŒ > v2.A4
Filled rectangle Unfilled rectangle Both rectangles > v2.A4
(1,1) - (7,5) (1,1) - (7,5) (1,1) - (7,5) > v2.A4
Notice that the two rectangles are not the exact same size. Both the > v2.A0
left and top edges are at the exact same locations, but in the case > v2.A0
of the unfilled rectangle, the right and bottom edges are one pixel > v2.A0
over and down. This shows that lines and points are rounded up to > v2.A0
the next highest pixel location (the first pixel after the > v2.A0
coordinate), but filled areas fill between the boundary lines. This > v2.A0
seemingly odd way of doing things becomes extremely important when > v2.A0
you deal with one image at different resolutions - as you saw with > v2.A0
the case of translating two filled-in rectangles earlier from one > v2.A0
resolution to another. > v2.A0
In a very real sense, you could easily think about coordinates and > v2.A0
graphics in two different ways. The way to think about them depends > v2.A0
on the type of graphics operation being performed. If you are > v2.A0
dealing with a fill operation of some kind, then you think about the > v2.A0
drawing surface with coordinate lines "in between" the physical pixel > v2.A0
cells. If you are dealing with a line drawing situation (or drawing > v2.A0
points, circles, etc), then you can think of coordinates directly > v2.A0
addressing the pixel cells themselves (just like when we began this > v2.A0
conversation at the beginning of this section). When dealing with > v2.A0
line drawing operations, there is no difference in mathematical > v2.A0
models - there's only a difference when you get into filling areas > v2.A0
in. Whichever method of thinking of things works best for you, use. > v2.A0
Other filled objects work the same way as do filled rectangles. For > v2.A4
example, consider an unfilled polygon with the following vertices: > v2.A4
ÉÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍ» > v2.A4
º X Pos ³ Y Pos º > v2.A4
ÉÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍØÍÍÍÍÍÍ͹ > v2.A4
º Vertex 0 º 0 ³ 0 º > v2.A4
º Vertex 1 º 8 ³ 0 º > v2.A4
º Vertex 2 º 14 ³ 3 º > v2.A4
º Vertex 3 º 14 ³ 4 º > v2.A4
º Vertex 4 º 12 ³ 6 º > v2.A4
º Vertex 5 º 4 ³ 6 º > v2.A4
º Vertex 6 º 0 ³ 2 º > v2.A4
º Vertex 7 º 0 ³ 0 º > v2.A4
ÈÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍŒ > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 68
With this polygon we would have a polygon that looks like the left > v2.A4
diagram below. The right diagram is what it would look like if it > v2.A4
were filled and had a border drawn at the same time (the different > v2.A4
shaded blocks indicates which is border, fill-color, or both): > v2.A4
1 1 1 1 1 1 1 1 1 1 1 1 > v2.A4
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 > v2.A4
0ÉÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍ» 0ÉÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍ» > v2.A4
ºÛ³Û³Û³Û³Û³Û³Û³Û³Û³ ³ ³ ³ ³ ³ º º±³±³±³±³±³±³±³±³Û³ ³ ³ ³ ³ ³ º > v2.A4
1×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ 1×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A4
ºÛ³ ³ ³ ³ ³ ³ ³ ³ ³Û³Û³ ³ ³ ³ º º±³°³°³°³°³°³°³°³°³Û³Û³ ³ ³ ³ º > v2.A4
2×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ 2×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A4
ºÛ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³Û³Û³ ³ º º±³°³°³°³°³°³°³°³°³°³°³Û³Û³ ³ º > v2.A4
3×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ 3×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A4
º ³Û³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³Û³Ûº º ³±³°³°³°³°³°³°³°³°³°³°³°³Û³Ûº > v2.A4
4×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ 4×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A4
º ³ ³Û³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³Ûº º ³ ³±³°³°³°³°³°³°³°³°³°³°³°³Ûº > v2.A4
5×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ 5×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A4
º ³ ³ ³Û³ ³ ³ ³ ³ ³ ³ ³ ³ ³Û³ º º ³ ³ ³±³°³°³°³°³°³°³°³°³°³Û³ º > v2.A4
6×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ 6×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A4
º ³ ³ ³ ³Û³Û³Û³Û³Û³Û³Û³Û³Û³ ³ º º ³ ³ ³ ³Û³Û³Û³Û³Û³Û³Û³Û³Û³ ³ º > v2.A4
7ÈÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍŒ 7ÈÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍŒ > v2.A4
Unfilled polygon Filled and unfilled polygon > v2.A4
Taking a second example. Let's consider an unfilled oval centered > v2.A4
at (7,3) with a horizontal radius of 8 and a vertical radius of 4. > v2.A4
The unfilled oval is depicted in the left diagram below. The diagram > v2.A4
on the right is the same oval with the border drawn and also filled > v2.A4
in. Notice how the border is drawn in relation to the filled-in > v2.A4
interior and how it adheres to resolution independence. > v2.A4
1 1 1 1 1 1 1 1 1 1 1 1 > v2.A4
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 > v2.A4
0ÉÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍ» 0ÉÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍØÍ» > v2.A4
º ³ ³ ³ ³Û³Û³Û³Û³Û³Û³Û³ ³ ³ ³ º º ³ ³ ³ ³±³±³±³±³±³±³Û³ ³ ³ ³ º > v2.A4
1×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ 1×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A4
º ³ ³Û³Û³ ³ ³ ³ ³ ³ ³ ³Û³Û³ ³ º º ³ ³±³±³°³°³°³°³°³°³°³Û³Û³ ³ º > v2.A4
2×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ 2×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A4
º ³Û³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³Û³ º º ³±³°³°³°³°³°³°³°³°³°³°³°³Û³ º > v2.A4
3×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ 3×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A4
ºÛ³ ³ ³ ³ ³ ³ ³þ³ ³ ³ ³ ³ ³ ³Ûº º±³°³°³°³°³°³°³þ³°³°³°³°³°³°³Ûº > v2.A4
4×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ 4×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A4
ºÛ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³Ûº º±³°³°³°³°³°³°³°³°³°³°³°³°³°³Ûº > v2.A4
5×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ 5×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A4
º ³Û³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³Û³ º º ³±³°³°³°³°³°³°³°³°³°³°³°³Û³ º > v2.A4
6×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ 6×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A4
º ³ ³Û³Û³ ³ ³ ³ ³ ³ ³ ³Û³Û³ ³ º º ³ ³±³±³°³°³°³°³°³°³°³Û³Û³ ³ º > v2.A4
7×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ 7×ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅĶ > v2.A4
º ³ ³ ³ ³Û³Û³Û³Û³Û³Û³Û³ ³ ³ ³ º º ³ ³ ³ ³Û³Û³Û³Û³Û³Û³Û³ ³ ³ ³ º > v2.A4
8ÈÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍŒ 8ÈÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍÏÍŒ > v2.A4
If you look closely at the right diagram, you will notice that the > v2.A4
oval isn't "balanced". This is because in this situation, the oval > v2.A4
is centered about a particular point, but the filled oval is > v2.A4
partially offset on an odd-boundary - the filled interior is 8 pixels > v2.A4
to the left of the center point (inclusive), and 7 pixels to the > v2.A4
right of the center point (inclusive). This is due to the resolution > v2.A4
independent nature of filled regions. If you need to draw a > v2.A4
perfectly smooth filled oval, draw one with a solid fill and with > v2.A4
borders enabled, both with the same drawing and fill color. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 69
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 2.7 þ COLOR PALETTES AND HARDWARE - COLOR TRANSLATION º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
With versions of RIPscrip prior to v2.0, the color palette was > v2.A0
limited to 16 colors maximum out of a total of 64 colors in the > v2.A0
Master Color Palette. This was due to the hardware origins of the > v2.A4
language in its initial releases. With the popularity of higher > v2.A4
color video sub-systems, RIPscrip needed to grow to accomodate these > v2.A4
advancing trends. In addition, it needed to be open-ended enough to > v2.A4
accomodate yet unknown hardware environments that might provide for > v2.A4
even higher color resolution. > v2.A4
The 1.xx RIPscrip specification provided for 16 colors out of a > v2.A0
palette of 64 colors. This 64 color palette corresponded to 2-bits > v2.A4
of Red, Green and Blue information each, giving you four levels of > v2.A0
color saturation in each of the three categories. Unlike typical RGB > v2.A0
implementations the color palette entry numbers are not sequentially > v2.A0
ordered based on the R, G and B components. The bit-layouts of the > v2.A4
color values as follows: > v2.A4
Primary Secondary > v2.A0
ÃÄÄÄÄÄÄÄÄÄŽ ÃÄÄÄÄÄÄÄÄÄŽ > v2.A0
ÉÍÍÍÑÍÍÍËÍÍÍÑÍÍÍÑÍÍÍËÍÍÍÑÍÍÍÑÍÍÍ» > v2.A0
º±±±³±±±º ³ ³ º ³ ³ º > v2.A0
º±±±³±±±º R ³ G ³ B º r ³ g ³ b º > v2.A0
º±±±³±±±º ³ ³ º ³ ³ º > v2.A0
ÈÍÍÍÏÍÍÍÊÍÍÍÏÍÍÍÏÍÍÍÊÍÍÍÏÍÍÍÏÍÍÍŒ > v2.A0
80 40 20 10 8 4 2 1 (hex) > v2.A0
7 6 5 4 3 2 1 0 (position) > v2.A0
Notice that each of the R, G and B sections are broken up into two > v2.A0
separate bit sections in the color palette entry number. Also, the > v2.A0
bits are reversed when they are encoded. Let's look at four separate > v2.A0
colors of Red, Green and Blue to see how the bit patterns correspond > v2.A0
to the actual Palette entries: > v2.A0
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» > v2.A0
º RED º GREEN º BLUE º > v2.A0
ÉÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍ͹ > v2.A0
º Level º xxRGBrgb ³ Value º xxRGBrgb ³ Value º xxRGBrgb ³ Value º > v2.A0
ÌÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍ͹ > v2.A0
º 00 º 00000000 ³ 0 º 00000000 ³ 0 º 00000000 ³ 0 º > v2.A4
º 01 º 00100000 ³ 32 º 00010000 ³ 16 º 00001000 ³ 8 º > v2.A4
º 10 º 00000100 ³ 4 º 00000010 ³ 2 º 00000001 ³ 1 º > v2.A4
º 11 º 00100100 ³ 36 º 00010010 ³ 18 º 00001001 ³ 9 º > v2.A4
ÈÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍŒ > v2.A0
The base 16 color palette in RIPscrip 1.54 and earlier was modified > v2.A4
by the RIP_SET_PALETTE and RIP_ONE_PALETTE commands. These commands > v2.A4
are limited to a maximum of 16 colors and only accomodate 2-bits for > v2.A4
each color component. These commands are here on out referred to as > v2.A4
the "desktop palette" alteration commands and are only designed to > v2.A4
make "simple" changes to the lowest 16 colors with a limited set of > v2.A4
color saturation in each of the red, green and blue components. > v2.A4
Under RIPscrip 2.0 and later, we deal with the concept of a 256-entry > v2.A4
color lookup table (otherwise known as the drawing palette). This > v2.A4
palette of RGB colors is used to cross-reference a particular color > v2.A4
number to some arbitrary RGB color combination much like the earlier > v2.A4
1.xx palette counterparts, but with some more important differences. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 70
The newer set palette commands allow you to specify the number of > v2.A4
bits for each red, green and blue component, and in addition, the > v2.A4
internal layout of each RGB value isn't encoded in a seemingly > v2.A4
haphazard fashion. A color value is a raw binary number without any > v2.A4
frills or complications. If the bit value were 00100100 then the > v2.A4
actual color saturation level would be 36, not encoded in a strange > v2.A4
bit swapped fashion as in the older color palette commands. It is > v2.A4
prophesized that the older color palette commands will not be used > v2.A4
much (if at all) in the newer 2.0 environments due to their > v2.A4
complexity - about the only way that the older commands will be used > v2.A4
is via software packages that only output colors in the older syntax. > v2.A4
Since RIPscrip 1.54 and earlier didn't know about the 256-entry > v2.A4
color lookup table, we have introduced two new color palette > v2.A4
commands: > v2.A4
RIP_ONE_DRAWING_PALETTE ... Set one color in the drawing > v2.A4
palette to an arbitrary RGB > v2.A4
color combination. > v2.A4
RIP_SET_DRAWING_PALETTE ... Set a block of colors in the > v2.A4
drawing palette to some set of > v2.A4
arbitrary RGB color values. > v2.A4
These commands supercede the older 1.54 commands and are much more > v2.A4
flexible. They not only allow you to access the entire 256-entry > v2.A4
color lookup table, but they allow you to specify how many bits of > v2.A4
precision of RGB component data are used in the RGB encoded data. > v2.A4
No matter what hardware configuration your actual RIPscrip software > v2.A4
is running under, there is some low-level inherent bit-precision for > v2.A4
each RGB color component (whether it be 2 bits each, 4, 6, 8 or more > v2.A4
bits per color component). With this in mind, the actual "set > v2.A4
palette" commands need to internally convert any RGB color values to > v2.A4
the "native" values of the target operating system's graphics > v2.A4
environment. The actual discussion of this goes beyond the scope of > v2.A4
this document, however the actual conversion should be rather > v2.A4
trivial. > v2.A4
Supporting the older 1.54 "set palette" commands that modify the > v2.A4
lower 16 color of the drawing palette are also just as trivial. All > v2.A4
you need to do is map the 4 levels of RGB data to target values in > v2.A4
the native graphics environment and you're done. For example, if > v2.A4
your target environment has 6 bits of precision (0-63), then your > v2.A4
2-bit to 6-bit conversions might be something like this (a simple > v2.A4
bit shift operation): > v2.A4
ÉÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍ» > v2.A4
º 2-bit ³ 6-bit º > v2.A4
ÌÍÍÍÍÍÍÍØÍÍÍÍÍÍ͹ > v2.A4
º 0 ³ 0 º > v2.A4
º 1 ³ 16 º > v2.A4
º 2 ³ 32 º > v2.A4
º 3 ³ 48 º > v2.A4
ÈÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍŒ > v2.A4
This is an overly simplistic example, and if you notice that the > v2.A4
6-bit range goes from 0-63, not 0-48! With this in mind, a simple > v2.A4
bit shift operation (eg, shifting left 4 bits or multiplying by 16) > v2.A4
in this example doesn't get the job done just right - a full > v2.A4
intensity BLUE component (value 3 in 2-bit components) maps to a > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 71
value of 48 in 6-bit components which is not a full-intensity blue). > v2.A4
What you need to do is take the maximum target value (63 in this > v2.A4
example), and divide it by the maximum value of the source range (3). > v2.A4
This yields a value of 21. So, our range would evaluate to the > v2.A4
following based on this new algorithm: > v2.A4
ÉÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍ»
º ³ (x21) º > v2.A4
º 2-bit ³ 6-bit º > v2.A4
ÌÍÍÍÍÍÍÍØÍÍÍÍÍÍ͹ > v2.A4
º 0 ³ 0 º > v2.A4
º 1 ³ 21 º > v2.A4
º 2 ³ 42 º > v2.A4
º 3 ³ 63 º > v2.A4
ÈÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍŒ > v2.A4
This gives a perfectly proportioned range where each division in the > v2.A4
target color range is evenly spaced and covers the base (black) and > v2.A4
the top (purest color) perfectly. > v2.A4
If you considered another example of 8-bit target colors, this rule > v2.A4
still applies - 255 / 3 = 85, which is our division as in the > v2.A4
following 2 to 8 bit table: > v2.A4
ÉÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍ»
º ³ (x85) º > v2.A4
º 2-bit ³ 8-bit º > v2.A4
ÌÍÍÍÍÍÍÍØÍÍÍÍÍÍ͹ > v2.A4
º 0 ³ 0 º > v2.A4
º 1 ³ 85 º > v2.A4
º 2 ³ 170 º > v2.A4
º 3 ³ 255 º > v2.A4
ÈÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍŒ > v2.A4
This same algorithm should work relatively well for any color > v2.A4
component mapping operation from any bit precision to another where > v2.A4
the source bit precision is less than the target's precision. Some > v2.A4
"fractional" component operations may need to be performed to > v2.A4
compensate for non-integral divisions, but this shouldn't pose any > v2.A4
problems in a real-world scenario. In fact, this same algorithm can > v2.A4
equally be used by the 2.0 extended "set palette" commands to map the > v2.A4
RGB color component values to the actual "bit precision" of the > v2.A4
target graphics environment's video hardware. > v2.A4
If the source's bit precision is greater than the target's, then a > v2.A4
simple right bit shift operation would accomplish the job without > v2.A4
yielding any "uneven" divisions in the target environment's color > v2.A4
components (eg, if you had 3-bit color values and a 2-bit target > v2.A4
environment, shifting the values right by one bit (dividing by 2) > v2.A4
would give you the perfect results. Here's the translation table so > v2.A4
that you can see this alternative algorithm at work: > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 72
ÉÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍ» > v2.A4
º ³ (ö2) º > v2.A4
º 3-bit ³ 2-bit º > v2.A4
ÌÍÍÍÍÍÍÍØÍÍÍÍÍÍ͹ > v2.A4
º 0 ³ 0 º > v2.A4
º 1 ³ 0 º > v2.A4
º 2 ³ 1 º > v2.A4
º 3 ³ 1 º > v2.A4
º 4 ³ 2 º > v2.A4
º 5 ³ 2 º > v2.A4
º 6 ³ 3 º > v2.A4
º 7 ³ 3 º > v2.A4
ÈÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍŒ > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 73
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 2.7.1 þ COLOR PALETTES AND HARDWARE - THE DRAWING PALETTE º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
Now that we've discussed how to translate an RGB color from one > v2.A4
environment to another, now let's discuss the larger picture as far > v2.A4
as RIPscrip is concerned: The Drawing Palette. > v2.A4
The Drawing Palette in RIPscrip is a table of 256 entries, where each > v2.A4
entry is a set of RGB color component values. This table is a > v2.A4
mechansim to "map" color codes (from 0-255) to arbitrary RGB color > v2.A4
values. > v2.A4
It may be distinctly possible that the RIPscrip software is running > v2.A4
in an environment that allows for an actual "color palette". If this > v2.A4
is the case then this color lookup table will match the color palette > v2.A4
of the video hardware entry-for-entry. Color 5 in the lookup table > v2.A4
would correspond with color 5 in the video system's hardware color > v2.A4
palette. This works for environments where the color palette is > v2.A4
"completely redefinable". What this means is that the RIPscrip > v2.A4
software can completely control the entire video hardware color > v2.A4
palette. > v2.A4
It is also very possible that the RIPscrip software could be running > v2.A4
on a video system that cannot support 256 simultaneous colors, and > v2.A4
only has a color palette of smaller size (typically 16 colors). In > v2.A4
this case, the lowest 16 colors (the desktop palette) would typically > v2.A4
map one-for-one with the actual hardware color palette, although the > v2.A4
programmer might opt to choose a more intelligent approach of color > v2.A4
selection based on color distribution. This rather complex issue > v2.A4
goes beyond the scope of this discussion and it is recommended that > v2.A4
for simplicity, the lowest 16 colors of the drawing palette be mapped > v2.A4
to the target palette.. This again, assumes that the RIPscrip > v2.A4
software has complete control over the video color palette system and > v2.A4
can change any or all of the entries at its discretion. > v2.A4
There are two other important situations that can occur: > v2.A4
1) The video hardware doesn't have a color palette (eg, its a > v2.A4
24-bit color system and doesn't have an actual palette), or > v2.A4
2) The operating system is running in an environment with only > v2.A4
a certain number of colors (eg, 256, 16, etc), but you > v2.A4
cannot redefine any or them, or you can only redefine some > v2.A4
of them (eg, Microsoft Windows under many configurations, > v2.A4
etc). > v2.A4
Situation #1 is the easiest to work with. You don't have an actual > v2.A4
color palette to modify, so any color values (from 0-255) simply > v2.A4
lookup the RGB data in the color lookup table and use that raw color > v2.A4
component data to set the color of the current drawing operation. > v2.A4
In this manner, the lookup table is "pretending" to be a hardware > v2.A4
video palette. This is a situation where having the lookup table > v2.A4
is very important. It isn't extremely important when you have a > v2.A4
one-to-one mapping of lookup colors to actual hardware color palette > v2.A4
colors because the lookup table does the exact same thing as the > v2.A4
hardware color palette. But, in modes where you have no palette, > v2.A4
this information becomes vital. In practice, this local lookup table > v2.A4
aids in color translation of image files (JPEG, GIF, BMP, etc), and > v2.A4
also aids in color translation in other situations. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 74
Situation #2, where you don't have complete control over the target > v2.A4
video palette is much more complicated. For example, under > v2.A4
Microsoft Windows, you typically cannot redefine the colors black > v2.A4
or white. This gives you only a sub-set of the actual palette to > v2.A4
work with. Also, other applications in the environment may have > v2.A4
"locked" several entries in the color palette for their own exclusive > v2.A4
use. This can reduce your target color palette even further. How > v2.A4
you handle which colors in the lookup table to "activate" (if any), > v2.A4
and in what order you activate them is entirely up the discretion of > v2.A4
the programmer(s) of the RIPscrip package dealing with this kind of > v2.A4
environment. The topic of algorithms for this situation goes > v2.A4
completely beyond the scope of this RIPscrip specification. Suffice > v2.A4
it to say that the programmer would have to determine some way of > v2.A4
mapping the lookup table to a suitable set of colors in the actual > v2.A4
destination color environment. If he uses strange methods of > v2.A4
dithering (like Windows does), or other mechanisms to achieve the > v2.A4
desired color to the user, so be it. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 75
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 2.7.2 þ COLOR PALETTES - PALETTE MAPPING AND DIRECT RGB MODE º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
Under RIPscrip 2.0, you have two methods of specifying color values. > v2.A4
You have already seen how colors can be specified by a color index > v2.A4
number into the color lookup table (from 0-255). What RGB color that > v2.A4
actually maps to is based on the contents of that entry in the actual > v2.A4
color lookup table. This is called "Palette mapping mode". In > v2.A4
palette mapping mode, most locations in RIPscrip commands that allow > v2.A4
for color values take a color number (from 0-255) which references > v2.A4
some RGB value in the color lookup table. > v2.A4
We also allow for another mode in RIPscrip, called "Direct RGB > v2.A4
Encoding". This mode allows you to specify actual "raw RGB" values > v2.A4
instead of color lookup table indices. When a direct RGB value is > v2.A4
found, it is decoded (ie, breaking up the red, green and blue > v2.A4
components) and is used for the actual color. What happens at this > v2.A4
particular moment depends on the environment that the RIPscrip > v2.A4
software is running under. > v2.A4
If the software is running in an environment with a color palette, > v2.A4
where the hardware video palette is set to some combination of the > v2.A4
colors used in the color lookup table, then the RGB encoded data is > v2.A4
matched to the "closest" color in the actual target hardware video > v2.A4
palette and that color number is actually used. Under many > v2.A4
situations, this color value will be the same one as used in the > v2.A4
actual color lookup table (for situations where the software is > v2.A4
running on a 256-color palette environment with complete control over > v2.A4
the hardware palette). Under modes that are more limited, but where > v2.A4
a hardware palette is still being used, the same algorithm can still > v2.A4
be applied - but there won't be a one-to-one mapping of color lookup > v2.A4
table values to the hardware palette. This is unavoidable and in > v2.A4
the case of direct RGB encoding, irrelevant. > v2.A4
If the software is running in an environment like 24-bit mode, then > v2.A4
life couldn't be simpler. Simply take the color value and use its > v2.A4
RGB components (possibly with some color component remapping), and > v2.A4
and activate that color in the environment. > v2.A4
Direct RGB encoding mode, unlike palette mapping mode, allows you to > v2.A4
specify the bit-precision of RGB color codes used subsequently in > v2.A4
RIPscrip code (where direct RGB colors are permitted - not all > v2.A4
RIPscrip commands permit direct RGB encoded color codes). This > v2.A4
allows you to have color values with the same flexibility as "set > v2.A4
color palette" commands, where you can specify arbitrary precisions > v2.A4
of RGB data to potentially accomodate high-end color systems like > v2.A4
24-bit, 16-bit, 15-bit, etc). > v2.A4
By default, RIPscrip operates in palette mapping mode, Whenever a > v2.A4
reset operation occurs (any type of reset), palette mapping mode is > v2.A4
once again re-enabled. In order to go to RGB encoding mode, you must > v2.A4
explicitly specify a RIP_COLOR_MODE command, or a $COLORMODE()$ text > v2.A4
variable to activate direct RGB encoding mode. When you specify > v2.A4
direct RGB encoding mode, you indicate how many bits of precisions to > v2.A4
allow for each red, green and blue component. This value is used for > v2.A4
all three components. For example, if you specify 8 bits of > v2.A4
precision for each component, then combined they will amount to 24 > v2.A4
bits of RGB data (eg, 24-bit mode). This is unlike some unusual > v2.A4
environments on the IBM-PC where 16-bit modes (5 red, 6 green and 5 > v2.A4
blue bits) are allowed on some VGA environments. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 76
When a direct RGB encoded color value is received, it is decoded > v2.A4
uniformly based on the N bits of precision. Blue is always in the > v2.A4
lowest N bits of the RGB value, then green, then red in the highest > v2.A4
bits. Let's say we have an 8-bit RGB encoded value of 04140D > v2.A4
hexadecimal. Given this hexadecimal number, we would have the bit > v2.A4
pattern of "000001000001010000001100". Breaking this up into > v2.A4
8-bit groups, we would have the following in binary, hexadecimal and > v2.A4
decimal: > v2.A4
ÉÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍ» > v2.A4
º RED ³ GREEN ³ BLUE º > v2.A4
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍ͹ > v2.A4
º binary º 00000100 ³ 00010100 ³ 00001100 º > v2.A4
º hexadecimal º 04h ³ 14h ³ 0Dh º > v2.A4
º decimal º 4 ³ 20 ³ 12 º > v2.A4
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍŒ > v2.A4
Given that we are working with 8-bit components (from 0-255), this > v2.A4
would yield a very dark shade of cyan (approximately). > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 77
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 2.7.3 þ DEFAULT RGB VALUES OF COLOR LOOKUP TABLE º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
When a reset command is executed, all unprotected color palette data > v2.A4
table entries are reset to some suitable default values. The exact > v2.A4
RGB values used in this default color palette table are listed below. > v2.A4
In this table, we list the values with six bits of precision for > v2.A4
red, green and blue. This is a carefully calculated color palette > v2.A4
designed to be of optimal use both in 16 color modes, and in 256 > v2.A4
color modes. > v2.A4
ÉÍÍÑÍÍÑÍÍËÍÍÑÍÍÑÍÍËÍÍÑÍÍÑÍÍËÍÍÑÍÍÑÍÍËÍÍÑÍÍÑÍÍËÍÍÑÍÍÑÍÍ» > v2.A1
Num º R³ G³ Bº R³ G³ Bº R³ G³ Bº R³ G³ Bº R³ G³ Bº R³ G³ Bº > v2.A1
ÌÍÍØÍÍØÍÍÎÍÍØÍÍØÍÍÎÍÍØÍÍØÍÍÎÍÍØÍÍØÍÍÎÍÍØÍÍØÍÍÎÍÍØÍÍØÍ͹ > v2.A1
0 º 0³ 0³ 0º 0³ 0³42º 0³42³ 0º 0³42³42º42³ 0³ 0º42³ 0³42º > v2.A1
6 º42³21³ 0º42³42³42º21³21³21º21³21³63º21³63³21º21³63³63º > v2.A1
12 º63³21³21º63³21³63º63³63³21º63³63³63º 0³ 0³ 0º 4³ 4³ 4º > v2.A1
18 º 8³ 8³ 8º13³13³13º17³17³17º21³21³21º25³25³25º29³29³29º > v2.A1
24 º34³34³34º38³38³38º42³42³42º46³46³46º50³50³50º55³55³55º > v2.A1
30 º59³59³59º63³63³63º 0³ 0³ 0º 0³ 0³21º 0³ 0³42º 0³ 0³63º > v2.A1
36 º 0³ 9³ 0º 0³ 9³21º 0³ 9³42º 0³ 9³63º 0³18³ 0º 0³18³21º > v2.A1
42 º 0³18³42º 0³18³63º 0³27³ 0º 0³27³21º 0³27³42º 0³27³63º > v2.A1
48 º 0³36³ 0º 0³36³21º 0³36³42º 0³36³63º 0³45³ 0º 0³45³21º > v2.A1
54 º 0³45³42º 0³45³63º 0³54³ 0º 0³54³21º 0³54³42º 0³54³63º > v2.A1
60 º 0³63³ 0º 0³63³21º 0³63³42º 0³63³63º10³ 0³ 0º10³ 0³21º > v2.A1
66 º10³ 0³42º10³ 0³63º10³ 9³ 0º10³ 9³21º10³ 9³42º10³ 9³63º > v2.A1
72 º10³18³ 0º10³18³21º10³18³42º10³18³63º10³27³ 0º10³27³21º > v2.A1
78 º10³27³42º10³27³63º10³36³ 0º10³36³21º10³36³42º10³36³63º > v2.A1
84 º10³45³ 0º10³45³21º10³45³42º10³45³63º10³54³ 0º10³54³21º > v2.A1
90 º10³54³42º10³54³63º10³63³ 0º10³63³21º10³63³42º10³63³63º > v2.A1
96 º21³ 0³ 0º21³ 0³21º21³ 0³42º21³ 0³63º21³ 9³ 0º21³ 9³21º > v2.A1
102 º21³ 9³42º21³ 9³63º21³18³ 0º21³18³21º21³18³42º21³18³63º > v2.A1
108 º21³27³ 0º21³27³21º21³27³42º21³27³63º21³36³ 0º21³36³21º > v2.A1
114 º21³36³42º21³36³63º21³45³ 0º21³45³21º21³45³42º21³45³63º > v2.A1
120 º21³54³ 0º21³54³21º21³54³42º21³54³63º21³63³ 0º21³63³21º > v2.A1
126 º21³63³42º21³63³63º31³ 0³ 0º31³ 0³21º31³ 0³42º31³ 0³63º > v2.A1
132 º31³ 9³ 0º31³ 9³21º31³ 9³42º31³ 9³63º31³18³ 0º31³18³21º > v2.A1
138 º31³18³42º31³18³63º31³27³ 0º31³27³21º31³27³42º31³27³63º > v2.A1
144 º31³36³ 0º31³36³21º31³36³42º31³36³63º31³45³ 0º31³45³21º > v2.A1
150 º31³45³42º31³45³63º31³54³ 0º31³54³21º31³54³42º31³54³63º > v2.A1
156 º31³63³ 0º31³63³21º31³63³42º31³63³63º42³ 0³ 0º42³ 0³21º > v2.A1
162 º42³ 0³42º42³ 0³63º42³ 9³ 0º42³ 9³21º42³ 9³42º42³ 9³63º > v2.A1
168 º42³18³ 0º42³18³21º42³18³42º42³18³63º42³27³ 0º42³27³21º > v2.A1
174 º42³27³42º42³27³63º42³36³ 0º42³36³21º42³36³42º42³36³63º > v2.A1
180 º42³45³ 0º42³45³21º42³45³42º42³45³63º42³54³ 0º42³54³21º > v2.A1
186 º42³54³42º42³54³63º42³63³ 0º42³63³21º42³63³42º42³63³63º > v2.A1
192 º52³ 0³ 0º52³ 0³21º52³ 0³42º52³ 0³63º52³ 9³ 0º52³ 9³21º > v2.A1
198 º52³ 9³42º52³ 9³63º52³18³ 0º52³18³21º52³18³42º52³18³63º > v2.A1
204 º52³27³ 0º52³27³21º52³27³42º52³27³63º52³36³ 0º52³36³21º > v2.A1
210 º52³36³42º52³36³63º52³45³ 0º52³45³21º52³45³42º52³45³63º > v2.A1
216 º52³54³ 0º52³54³21º52³54³42º52³54³63º52³63³ 0º52³63³21º > v2.A1
222 º52³63³42º52³63³63º63³ 0³ 0º63³ 0³21º63³ 0³42º63³ 0³63º > v2.A1
228 º63³ 9³ 0º63³ 9³21º63³ 9³42º63³ 9³63º63³18³ 0º63³18³21º > v2.A1
234 º63³18³42º63³18³63º63³27³ 0º63³27³21º63³27³42º63³27³63º > v2.A1
240 º63³36³ 0º63³36³21º63³36³42º63³36³63º63³45³ 0º63³45³21º > v2.A1
246 º63³45³42º63³45³63º63³54³ 0º63³54³21º63³54³42º63³54³63º > v2.A1
252 º63³63³ 0º63³63³21º63³63³42º63³63³63º°°³°°³°°º°°³°°³°°º > v2.A1
ÈÍÍÏÍÍÏÍÍÊÍÍÏÍÍÏÍÍÊÍÍÏÍÍÏÍÍÊÍÍÏÍÍÏÍÍÊÍÍÏÍÍÏÍÍÊÍÍÏÍÍÏÍÍŒ > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 78
The first 16 entries in the above color table correspond to the > v2.A1
default color palette used in v1.xx of RIPscrip and corresponds > v2.A1
directly to the color palette used for 16 color ANSI text. The next > v2.A1
16 colors in the color table above is a 16 level gray-scale used for > v2.A1
gray-scale image output and to provide a basic spectrum of grays. > v2.A1
The remaining 224 entries is a "uniform distribution" of RGB colors. > v2.A1
The actual organization of the colors is mathematically based such > v2.A1
that an arbitrary RGB color value can be mapped to a color value in > v2.A1
the default palette with a simple calculation (instead of searching > v2.A1
through the entire palette for the closest entry). This block tries > v2.A1
to cover as many colors in the color spectrum as possible. > v2.A1
There are four levels of Blue, eight levels of green and seven > v2.A1
levels of red. Each block is organized with Blue the color that > v2.A1
changes every entry, green the next most changing, and red the > v2.A1
least frequently changing. If you have a RED value from 0-6, a > v2.A1
GREEN value from 0-7 and a BLUE value from 0-3, you can easily > v2.A1
calculate the correct palette index entry with the following > v2.A1
equation: > v2.A1
INDEX = 32 + BLUE + GREEN*4 + RED*32 > v2.A1
Or in C with bit-shifting, you could do it like this: > v2.A1
INDEX = 32 + BLUE + GREEN<<2 + RED<<5 > v2.A1
The main reason for choosing this color palette was to facilitate the > v2.A1
ability to display many color images onto the screen at the same time > v2.A1
in 256 color mode without having to alter the color palette for each > v2.A1
image. The color representation may not be 100% exact, but it would > v2.A1
be close enough with dithering to accurately represent the original > v2.A1
image. > v2.A1
The exact determination of this color palette was very carefully > v2.A4
chosen. The lowest 16 colors, which happen to default to the basic > v2.A4
colors of ANSI color codes (universally used throughout the computer > v2.A4
world seemingly), are a good sub-set of colors for basic 16 color > v2.A4
operations. The next 16 colors are defined as a dedicated gray-scale > v2.A4
color palete (only of use in 256 color modes), and gives a very good > v2.A4
breakdown of the gray-scale monotone color palette. The remaining > v2.A4
224 entries are broken down mathematically (as you've seen above) > v2.A4
with 7 levels of red, 8 levels of green and 4 levels of blue. This > v2.A4
seemingly odd configuration of color distrubution was very > v2.A4
scientifcally chosen. > v2.A4
Extensive experimental research has determined that the human eye is > v2.A4
more susceptible to particular "hues" of light than others. > v2.A4
Specifcally, the human eye is most susceptible to subtle changes in > v2.A4
the shade of green than any other color. Next comes red, then > v2.A4
finally blue at the very lowest end of the perceptivity scale. If > v2.A4
you recall, red is at the lower end of the light spectrum (eg, near > v2.A4
infrared), and blue is at the upper end of the spectrum (near ultra- > v2.A4
violet). Green is in the middle. This tells us that our eye is > v2.A4
most responsive to light in the middle-to-lower bands of the color > v2.A4
spectrum. After scientific analysis, our eye was determined to be > v2.A4
responsive to the following levels of each color band (comparitively > v2.A4
based on an 8 level scale, 1 being lowest): > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 79
8 - green > v2.A4
7 - red > v2.A4
4 - blue > v2.A4
Taking this information into account, we constructed a default > v2.A4
palette which reflected the best distribution of color that the human > v2.A4
eye can perceive. By no means is it perfectly suited for all > v2.A4
environments, but it is a "best case" situation for most images and > v2.A4
environments. As you can undoubtedly guess, a photograph with a lot > v2.A4
of blues and violets would be significantly degraded in quality in > v2.A4
this color environment, but many typical images where a broad range > v2.A4
of colors is used works very well, and when dithering is used, the > v2.A4
situation improves even more. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 80
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 2.8 þ AUDIO (SOUND & MUSIC) FORMATS º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
RIPscrip 2.0 permits the support of digitized audio to be played in > v2.A4
the background whild graphics and other operations are being > v2.A4
performed. This includes playing sounds while graphical commands are > v2.A4
being received from the host (without interruption). > v2.A4
The format of audio data used by RIPscrip 2.0 is formally defined as > v2.A4
straight audio data in the Microsoft WAVE file format. When dealing > v2.A4
with host systems and downloading digitized audio data, or being > v2.A4
told to play back audio data, RIPscrip will assume that you are > v2.A4
working with WAVE files. For example, you might be told to playback > v2.A4
a file named SOUND.WAV. If you are not internally supporting the > v2.A4
actual WAVE format, but some other format, then you need to translate > v2.A4
the name of the file to the correct name in your environment (if > v2.A4
necessary) and perform the playback. > v2.A4
When dealing with the RIP_FILE_QUERY command, you need to be careful > v2.A4
if you're not dealing with true WAVE files. The RIP_FILE_QUERY > v2.A4
command is used to "detect" if a particular file is present on the > v2.A4
target system and if so, if it is the right date/time and file size > v2.A4
as the file on the host. The file on the host will be in WAVE format > v2.A4
so if you're translating the files as they're received, you need to > v2.A4
translate the RIP_FILE_QUERY information returned to the host so that > v2.A4
it thinks that the file you have on your local hard disk is actually > v2.A4
a WAVE file (ie, translate the file size to a WAVE equivalent). If > v2.A4
the sizes and, or the time/date don't match, the host could download > v2.A4
a new file to you (via the RIP_ENTER_BLOCK_MODE command) thinking > v2.A4
that your's is out of date. > v2.A4
If you receive a WAVE file via the RIP_ENTER_BLOCK_MODE command, or > v2.A4
by some other meanss, and you're dealing with anther digitized audio > v2.A4
file format, it is up to you to translate that WAVE file to your > v2.A4
destination format. Consequently, if you are requested to send a > v2.A4
WAVE file to the host system, and the host system is requesting a > v2.A4
.WAV file, then you must translate your file to WAVE format before > v2.A4
sending it. > v2.A4
A Microsoft WAVE file is actually a normal "Pulse Code Modulation" > v2.A4
digitized audio file stored with a bit of header information to > v2.A4
identify whether it is stereo, 16-bit, 8-bit, etc, and other pieces > v2.A4
of critical information for the decoding of the data. See the > v2.A4
"Microsoft Windows Programmer's Reference Guide" for more specific > v2.A4
information on the internal format of WAVE files. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 81
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 2.9 þ TEXT WINDOWS AND TERMINAL EMULATION PROTOCOLS º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
[ BEGIN REWORD ]
Discuss text windows and terminal emulations here
[ END REWORD ]
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 82
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 2.10 þ VIEWPORTS AND TEXT WINDOWS - OVERLAPPING ISSUES º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
Since there are multiple text windows and ports (with their > v2.A3
viewports) allowed in the RIPscrip specification, some elaboration > v2.A3
needs to be made on what happens if any overlap each other. Very > v2.A1
simple, they do what they have always done - draw text, or draw > v2.A1
graphics. For example, if a viewport overlaps a text window and you > v2.A1
draw some graphics (say a circle) over the top of some text in a text > v2.A1
window, and the text window subsequently scrolls, all or part of the > v2.A1
circle could scroll with it! Now, of course, from the viewport's > v2.A1
standpoint, the graphics are no longer what you originally sent to > v2.A1
the viewport, but that doesn't matter - you don't preserve any of the > v2.A1
commands you used to create the graphics - you simply draw the > v2.A1
graphics and that's it. So with this in mind, even if multiple > v2.A1
viewports overlap each other it doesn't matter because the final > v2.A1
result is what's on the screen - doing things in one viewport might > v2.A1
do some overlapping graphics in another viewport but that is alright. > v2.A1
If a text window overlaps another text window, the same thing > v2.A1
happens. To a RIPscrip terminal, text is simply just a piece of > v2.A1
graphical information that is being placed on the screen in a > v2.A1
formatted fashion. If two text windows overlap and text is placed on > v2.A1
an area that overlap the other window, then you will be drawing > v2.A1
graphics (essentially) on top of another text window. The same thing > v2.A1
as the circle example above would happen if that text window > v2.A1
scrolled. > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 83
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 2.11 þ MISCELLANEOUS NOTES/INFORMATION º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
Later in this document, references are made to Mouse Fields and Mouse > v1.54
Buttons. Specifically, it is noted that up to 128 of these types of > v1.54
commands may exist simultaneously on-screen. This means that you can > v1.54
have 128 mouse fields, 128 mouse buttons, or any combination of the > v1.54
above, but combined, their total number cannot exceed 128. > v1.54
When the user clicks his/her mouse on the screen, all mouse regions > v1.54
(whether mouse fields or mouse buttons) are scanned from most recent > v1.54
to the least recent. This means that if a mouse region is received > v1.54
that overlaps another (previously received) mouse region, the newest > v2.A3
one would be selected if the user clicked in that region. > v2.A3
If you are implementing a client terminal to support RIPscrip > v1.54
graphics and you do not intend on supporting 100% of all pre-defined > v1.54
text variables, you SHOULD at least recognize them and do nothing. > v1.54
This makes it so that if a particular text variable is used to make > v1.54
a sound (for example), then if you don't support it, you just ignore > v1.54
it instead of popping up a dialog box on your user's screen asking > v1.54
them to enter data for the variable $MUSIC$ for example! > v1.54
NOTE: Many of the text variables like $PCB$ and other key variables > v2.A1
are very important to GUI design and should be implemented! > v2.A1
If you are going to omit any of the text variable, do not > v2.A1
omit any of the active text variables - these are CRITICAL > v2.A1
to implementing a full GUI system using RIPscrip 2.0!!! > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 84
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 3 þ RIPscrip PROTOCOL DEFINITION º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
The following sub-sections define the actual structure of the > v2.A4
RIPscrip graphical language. The topic of Host Commands and Text > v2.A4
Variables is covered in a section devoted specifically to that topic. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 85
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 3.1 þ ANSI SEQUENCES (AUTO-SENSING) º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
RIPscrip predominantly uses non-ANSI command sequences. In a couple
of situations though, an ANSI-like sequence is allowed to perform a > v2.A3
specific function. There are currently four separate escape > v2.A3
sequences defined in the RIPscrip protocol to perform various
actions. They are as follows:
ESC[! Query RIPscrip version number. RIPterm will respond with > v1.54
RIPSCRIPxxyyvs where "xx" is equal to the major version > v1.54
number (zero padded), "yy" is equal to the minor version > v1.54
number (zero padded), "v" is the vendor code of the > v1.54
terminal program (see below), and "s" is the vendor's > v1.54
sub-version code for their software. For v1.54, the > v1.54
returned sequence for RIPterm (Vendor Code "1") would be > v1.54
RIPSCRIP015410. Another example, v1.23 with a Vendor Code > v1.54
of "2" and a sub-revision code of "5" would return > v1.54
RIPSCRIP012325. > v1.54
Valid Vendor Codes are: > v1.54
ÉÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» > v1.54
º CODE ³ VENDOR º > v1.54
ÌÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹ > v1.54
º 0 ³ Generic RIPscrip terminal (vendor unknown) º > v1.54
º 1 ³ RIPterm (from TeleGrafix Communications) º > v1.54
º 2 ³ Qmodem Pro (from Mustang Software, Inc) º > v1.54
º 3 ³ deltaComm Development (Telix) º > v2.A1
º 4 ³ Qmodem Pro for Windows (Mustang Software) º > v2.A1
ÈÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ > v1.54
This ANSI sequence is often used for "Auto-Sensing" if a > v1.54
RIPscrip terminal exists on the remote end of the > v1.54
connection. If a non-RIPscrip terminal receives this > v1.54
ANSI sequence, it will ignore it. > v1.54
NOTE: This method of vendor determination is obsolete > v2.A1
in RIPscrip 2.0. See the section Pre-Defined > v2.A1
Text variable for Vendor specific text variables > v2.A4
which can be used more generically to determine > v2.A1
a specific terminal vendor (ie, $TERMINFO$()). > v2.A4
You still use this escape sequences to detect > v2.A3
RIPscrip capability, but to determine the > v2.A3
specific terminal program or manufacturer, use > v2.A3
the $TERMINFO()$ text variable. To determine > v2.A4
specific capabilities of the terminal, use the > v2.A3
$IFS()$ text variable (Is Function Supported). > v2.A3
To determine the current language that the > v2.A3
terminal is running in, use the $LANGUAGE$ > v2.A3
text variable (see the text variable section > v2.A3
later for more details). > v2.A3
ESC[0! Same as ESC [ ! (see above)
ESC[1! Disables all RIPscrip processing. Any RIPscrip sequences
are interpreted as raw text.
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 86
ESC[2! Enabled RIPscrip processing. Any RIPscrip sequences will
be parsed and processed.
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 87
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 3.2 þ RIPscrip PROTOCOL - SYNTAX AND GENERAL STRUCTURE º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
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 "!"
(ASCII code 33 decimal). > v2.A3
3. Every RIPscrip command is preceded by the universal RIPscrip
delimiter, vertical-bar "|" (ASCII code 124 decimal). > v2.A3
4. Individual RIPscrip commands may be combined on the same line
providing they are separated by the vertical bar delimiter.
There are some exceptions to this (RIP_ENTER_BLOCK_MODE, and > v2.A1
a few others). See individual command descriptions for > v2.A1
exceptions. > v2.A1
5. RIPscrip commands or command lines may be split across multiple
lines with a backslash "\" (ASCII code 92 decimal) just before > v2.A3
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 multiple Graphical Windows and > v2.A1
multiple Text Windows. A Graphical Window is where all RIPscrip > v2.A1
graphics appear. A Text Window is where raw text appears. Raw
Text includes ANSI color and cursor movement codes (a subset of > v2.A3
VT-100 terminal emulation), and possibly other terminal > v2.A3
emulations like VT-100, VT-102, VT-220, etc. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 88
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<cmd>").
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 of the following characters: > v2.A0
ABCDEFGHIJKLMNOPQRSTUVWXYZ > v2.A0
abcdefghijklmnopqrstuvwxyz > v2.A0
@#$&*()[]{}<>:;'",.?-_=+! > v2.A0
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.
If a RIPscrip command does not have a string parameter, but > v2.A3
does have numeric parameters, the last parameter may be shortened > v2.A3
to get a bit more efficiency out of it. If the last parameter > v2.A3
is more than one digit long and the left-most digits are zeros, > v2.A3
they may be omitted. At least one digit must remain though after > v2.A3
all of the shortening is done (eg, "0001" can be shortened to "1" > v2.A3
but "0000" cannot be shortened to "", it can only be shortened to > v2.A3
"0"). > v2.A3
For example, the RIP_COLOR command, used to set the current > v2.A3
drawing color, requires one parameter - a color number. If we > v2.A3
were going to set color 1 (usually dark blue), then the command > v2.A3
would appear formally as follows: > v2.A3
!|c01 > v2.A3
Under this shortening clause, you could omit the "0" and make > v2.A3
the command appear like this: > v2.A3
!|c1 > v2.A3
This allows you to shave one byte off of the command. If you > v2.A3
were trying to set color number zero (normally black), then you > v2.A3
could still shorten the parameter, but you still have to leave > v2.A3
at least one digit there (0), so the command would appear like > v2.A3
this: > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 89
!|c0 > v2.A3
There is an additional optimization that can be used for commands > v2.A2
that have no string parameter, and have a reserved parameter as > v2.A2
the LAST parameter for that command. In this case, the reserved > v2.A2
parameter may be omitted completely, and the value should be > v2.A2
assumed to be zero (`0'). Please take note that the previous > v2.A2
paragraphs still apply! You can omit the reserved parameter AND > v2.A2
shorten the last transmitted parameter so as to squeeze out as > v2.A2
many unnecessary characters from the command as possible. > v2.A2
Numbers are normally represented in base-36 (unless altered by > v2.A0
a RIPscrip command). This compacts numbers down to roughly 3/5 > v2.A0
of their decimal form. This numbering system, technically called > v2.A0
"Hexa-Tri-Decimal" or "MegaNums" is unlike Hexadecimal which uses > v2.A0
0-9 and A-F. MegaNums take advantage of the entire alphabet, > v2.A0
using characters 0-9 and A-Z.
See the next section about Base Math variations. > v2.A0
11. An exclamation mark (!) or vertical bar (|) character can appear
in a RIPscrip text parameter by preceding it with a backslash(\).
This is known as "quoting" a special character. A literal > v2.A3
backslash is represented with a double-backslash (\\). Also, in > v2.A3
some situations you need to quote specific characters so that > v2.A3
they are not misinterpretted. For example, in a button host > v2.A3
string, the characters [, ], (, and $ are used as special host > v2.A3
command characters and will need to be quoted (eg, \[, \], > v2.A3
\( and \$ respectively). See rule #14 below for more details > v2.A3
on quoting these special sequences.
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] - ASCII character 1) character, or Ctrl-B > v2.A3
(STX - ASCII character 2) character. Since 99.9% of all BBS' do > v2.A3
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.
Let's take an example, where we have a piece of raw text and > v2.A3
then a RIPscrip command immediately following the text before > v2.A3
the carriage return (in this example <STX> stands for the STX > v2.A3
character): > v2.A3
This is raw text<STX>|c01|@1010hello world > v2.A3
In the above example, the text "This is raw text" would be > v2.A3
sent to the active text window, then the RIPscrip sequences > v2.A3
would be processed - set the color to blue (01), then print > v2.A3
the text "hello world" on the screen at (10,10) in meganums > v2.A3
or (36,36) in decimal. > v2.A3
13. If the last couple of bytes on a RIPscrip text line are > v1.54
backslashes, special care must be taken to make sure that they > v1.54
are not interpreted as a line-continuation. If a literal > v1.54
backslash is desired as the last position on the line, it must > v1.54
be specified as a double-backslash (eg, "\\"). If a line- > v1.54
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 90
continuation is used then there would have to be three > v1.54
backslashes used on the line as in the following example: > v1.54
!|@2233this is a text line with a literal \\\ > v1.54
used in the message > v1.54
This would text output at (22,33) [meganum] the message: > v1.54
this is a text line with a literal \used in the message > v1.54
14. Some character sequences in text parameter strings can be > v2.A1
misinterpreted as RIPscrip command sequences (eg, $, <>, > v2.A1
((, )), [, ], [], etc). To avoid syntax confusion these > v2.A1
sequences can be "escaped" to indicate that they are actually > v2.A1
literal sequences, not to be confused with a RIPscrip command > v2.A1
sequence identifier. For example, the sequence: > v2.A1
$Name$ > v2.A1
would normally be interpreted as a RIPscrip text variable that > v2.A1
requires the user's response. If however, you wanted this > v2.A1
sequence to be interpretted as literal text, you should perform > v2.A1
the following escape sequences: > v2.A1
\$Name\$ > v2.A1
This makes it so a RIPscrip terminal doesn't misinterpret the > v2.A1
dollar signs as text variable delimiters. > v2.A1
15. Extraneous information. If too much data is encountered for a > v2.A1
particular RIPscrip command, or too little information is found > v2.A1
(aside from a short last parameter) then the command is > v2.A1
considered "hopelessly corrupted" and discarded. The RIPscrip > v2.A1
parser should synchronize to the next vertical bar delimiter > v2.A1
to begin the next command. > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 91
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 3.3 þ DESCRIPTION OF RIPscrip COMMAND LEVELS º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
As previously described, RIPscrip is composed of ten different levels > v2.A1
of commands. The distribution of commands over different levels is > v2.A1
done in a rather organized fashion based on command type. Each level > v2.A1
of command in general, is progressively higher level in concept. For > v2.A1
example, level 0 commands are the most basic building blocks of > v2.A1
RIPscrip (eg, graphical primitives, protocol setup, etc). Level one > v2.A1
commands are simple user interface objects. Level 2 commands are > v2.A1
higher level still in that they deal with context swapping issues. > v2.A1
At the highest level, level-9, we deal with binary transfer modes > v2.A1
like file transfer protocols, etc. A more formal definition of the > v2.A1
currently used levels are: > v2.A1
ÉÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» > v2.A1
º Level ³ Description º > v2.A1
ÌÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹ > v2.A1
º 0 ³ Lowest-level RIPscrip primitives. Simple graphical º > v2.A1
º ³ drawing primitives, low-level RIPscrip protocol º > v2.A1
º ³ mode settings, etc. º > v2.A1
ÇÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ > v2.A1
º 1 ³ Simple user interface objects (buttons, mouse º > v2.A1
º ³ fields, clipboard slots, formatted text regions). º > v2.A2
º ³ This level consolidates one or more simple building º > v2.A2
º ³ blocks from level 0 and also introduces more º > v2.A1
º ³ abstract user interface objects (eg, mouse fields). º > v2.A1
ÇÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ > v2.A1
º 2 ³ Basic context switching information (switching º > v2.A1
º ³ styles, and other window or context senstive º > v2.A1
º ³ commands. º > v2.A1
ÇÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ > v2.A1
º 3 ³ Basic time-related commands (baud rate emulation º > v2.A1
º ³ and delay commands). º > v2.A1
ÇÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ > v2.A1
º 4 ³ Open for future development º > v2.A1
ÇÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ > v2.A1
º 5 ³ Open for future development º > v2.A1
ÇÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ > v2.A1
º 6 ³ Open for future development º > v2.A1
ÇÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ > v2.A1
º 7 ³ Open for future development º > v2.A1
ÇÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ > v2.A1
º 8 ³ Open for future development º > v2.A1
ÇÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ > v2.A1
º 9 ³ Binary related data transfer functions (ie, block º > v2.A1
º ³ protocol modes, UU-Encoding, etc). º > v2.A1
ÈÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 92
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 3.4 þ RIPscrip COMMAND REFERENCE º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
The remaing bulk of this document details the RIPscrip command set.
Each command has these aspects:
SYMBOL - the symbolic constant that is referenced in RIPscrip > v2.A3
documents. This is the universal name for the command. > v2.A3
FUNCTION - A short description of the command.
LEVEL - The Command Level. Sub-levels (if any) are > v2.A3
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 character identifying the command
ARGUMENTS - The arguments or parameters for the command.
Commands that do not require any parameters
after the command type character are shown
here as "<none>". Each parameter is shown in
the order it appears in the command, and is
represented by a name. If a parameter is
numeric, it is followed by a width specifier
indicating how many meganum or ultranum digits > v2.A2
the parameter consists of (e.g., ":2" means a
2-digit number, or a value between 0 and > v2.A2
1295 for meganums, or 0 and 4095 for ultranums). > v2.A2
If a parameter does not have a width specifier,
it is by default a text parameter, and should be
the last parameter of the command. > v2.A2
If a command is variable length (see POLYGON),
then it will appear with an ellipe (...), > v2.A2
meaning that the command repeats the specific > v2.A2
parameters a variable number of times. > v2.A2
If the parameter is a variable-width coordinate > v2.A2
that can be set by the RIP_SET_COORDINATE_SIZE, or > v2.A3
via the RIP_HEADER commands, then the parameter > v2.A3
will be followed by a coordinate specifier (e.g., > v2.A2
":XY" means that the parameter is a variable-width > v2.A2
coordinate). > v2.A2
If the parameter is a color parameter whose format is > v2.A3
determined by the RIP_SET_COLOR_MODE command, (ie, the > v2.A3
parameter switches between "color mapping mode" or > v2.A3
"direct RGB encoding" mode), then a color mode > v2.A3
specifier will come after the parameter name (e.g., > v2.A3
":CM" indicates this parameter uses the current color > v2.A3
mode). > v2.A3
Some commands do not allow color parameters to switch > v2.A3
modes based on RIP_SET_COLOR_MODE. These exceptional > v2.A3
commands document these exceptions and the :CM > v2.A3
specifier will not be present. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 93
FORMAT - This represents the format of the command, with
the starting "!|", the level digits, the
command type character, and the parameter list,
with the parameter names in angle brackets.
(These parameters 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.
BACK COLOR - If YES, then this command uses (or affects) the > v2.A1
current background pen drawing color. > v2.A1
LINE STYLE - If YES, then this command uses or affects the
current Line Style Pattern.
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 STYLE - If YES, then this command uses or affects the > v2.A3
current Font Style/size/orientation. > v2.A3
VIEWPORT - If YES, then this command adheres to the > v1.54
graphical viewport (draws inside it). Any > v1.54
RIPscrip command that adheres to the graphical > v1.54
viewport will be drawn (when received) only > v1.54
if the viewport is activated. If the viewport > v2.A4
is deactivated, then the command is parsed, but > v2.A4
completely ignored. > v1.54
USES PORT - If YES, then this command adheres to, is affected by, > v2.A3
or modifies the definition of a port. > v2.A3
BASE MATH - Indicates which base math this command responds to. > v2.A2
The possible settings are N/A (does not apply), > v2.A2
Meganums (uses meganums ONLY), Ultranums (uses Ultranums > v2.A2
ONLY), and Current (uses current base math setting as > v2.A2
set by either RIP_HEADER or RIP_SET_BASE_MATH). > v2.A2
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 94
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 3.4.1 þ LEVEL-0 RIPscrip COMMANDS º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
Level-0 commands are the graphical building blocks of RIPscrip. They > v2.A4
embody all of the simple primitive commands for actually drawing > v2.A4
simple graphics like lines, circles, normal graphical text. > v2.A4
This level also contains all of the commands necessary to the basic > v2.A4
setup and operation of RIPscrip (eg, base math, color modes, etc). > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 95
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.1 þ RIP_ARC ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Draw circular arc in current color/line thickness
Level: 0
Command: A
Arguments: x:XY y:XY start_ang:2 end_ang:2 radius:XY > v2.A2
Format: !|A <x> <y> <start_ang> <end_ang> <radius>
Example: !|A1E18003G0T > v2.A2
Uses Draw Color: YES
Uses Back Color: YES > v2.A1
Uses Line Style: YES > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: YES > v2.A1
Uses Font Style: NO
Uses Viewport: YES > v1.54
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
This command draws a circular arc, or a segment of a circle. Drawing
begins at <start_ang> and terminates at <end_ang>. The angles are
represented starting at zero for the 3 o'clock position and
increasing counterclockwise through a full circle to 360:
90ø
³
180øÄÄÄÄÅÄÄÄÄ0ø
³
270ø
The arc drawing begins at the <start_angle> and continues counter-
clockwise to the <end_angle>. A full circle will be displayed if
<start_ang>=0 and <end_ang>=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.
The radius is considered to be in the horizontal direction for the > v2.A3
purpose of aspect ratio calculations. > v2.A3
Both angles can be greater than 360 degrees. The starting angle > v2.A3
must be greater or equal to the ending angle. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 96
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.2 þ RIP_BACK_COLOR ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Set background Drawing Color for graphics > v2.A1
Level: 0 > v2.A1
Command: k > v2.A1
Arguments: color:CM > v2.A2
Format: !|k <color> > v2.A1
Example: !|k0004 > v2.A2
Uses Draw Color: NO > v2.A1
Uses Back Color: YES > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO > v2.A1
Uses Font Style: NO > v2.A1
Uses Viewport: NO > v2.A1
Uses Port: NO > v2.A3
Uses Base Math: Current setting > v2.A2
This command alters the setting of the background pen drawing color. > v2.A1
This color is used for fill operations for the background pixels of > v2.A1
the fill as well as some erase functions. The color of the > v2.A3
foreground pixels of the fill pattern are specified with a > v2.A1
RIP_FILL_STYLE and RIP_FILL_PATTERN command. Upon a > v2.A1
RIP_RESET_WINDOWS, the background color is automatically set to black > v2.A1
and remains that way unless overidden by a RIP_BACK_COLOR command. > v2.A1
The background color can also affect the way line patterns/styles > v2.A1
appear on the screen. Normally a line pattern is a sequence of on > v2.A1
and off pixels where the on pixels are drawn in the normal RIPscrip > v2.A1
foreground drawing color as set by the RIP_COLOR command. The other > v2.A1
pixels (the off pixels) are normally not drawn at all (ie, > v2.A3
transparent). When you use the RIP_LINE_STYLE command, you can > v2.A3
specify that these off pixels are to be drawn in the current > v2.A3
background color (set with this command). See the RIP_LINE_STYLE for > v2.A1
exact syntax on using this mode. > v2.A1
See the RIP_COLOR command for an exact description of the <color> > v2.A1
parameter used in this command (both Color Palette mode and Direct > v2.A1
RGB color mode are supported). > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 97
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.3 þ RIP_BAR ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Draw filled rectangle using fill style/no border > v2.A2
Level: 0
Command: B
Arguments: x0:XY y0:XY x1:XY y1:XY > v2.A2
Format: !|B <x0> <y0> <x1> <y1>
Example: !|B00010A0E
Uses Draw Color: NO
Uses Back Color: YES > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: YES > v2.A2
Uses Write Mode: YES > v2.A1
Uses Font Style: NO
Uses Viewport: YES > v1.54
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
This command fills a rectangular region with the current fill color
and pattern. No border is drawn.
NOTE: If the borders are enabled, then this command will still draw > v2.A3
a rectangle with no border. This is the only RIPscrip > v2.A3
command that ignores the border option. > v2.A3
This command also does not adhere to the resolution independent > v2.A3
method of performing fills. In other words, the fill actually goes > v2.A3
to the very lower-left corner of the rectangle. In this manner, > v2.A3
this command is not truly resolution independent. If you want to > v2.A3
draw a resolution independent filled rectangle, use the > v2.A3
RIP_FILLED_RECTANGLE with borders disabled. > v2.A3
Before the rectangle is actually drawn, the (x0,y0) and (x1,y1) > v2.A3
coordinates are "normalized". This means that they are adjusted so > v2.A3
that they specify the upper-left and lower-right coordinates > v2.A3
respectively. For example, if the parameters are received in the > v2.A3
order of (50,25) and (25,75) - upper-right and lower-left > v2.A3
respectively - they would be reorganized to be (25,25) and (50,75) > v2.A3
before the rectangle is actually drawn. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 98
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.4 þ RIP_BEZIER ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Draw a bezier curve
Level: 0
Command: Z
Arguments: x1:XY y1:XY x2:XY y2:XY x3:XY y3:XY > v2.A2
x4:XY y4:XY cnt:2 > v2.A2
Format: !|Z <x1> <y1> <x2> <y2> <x3> <y3> <x4> <y4> <cnt>
Example: !|Z0A0B0C0D0E0F0G0H1G
Uses Draw Color: YES
Uses Back Color: YES > v2.A1
Uses Line Style: YES > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: YES
Uses Font Style: NO
Uses Viewport: YES > v1.54
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
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 (usually), but points 1 and 4 are. > v2.A3
X2
ÜßßßÜ
Üß ßßÜÜ
Û ßÜ X4
Û ßÜ Û
X1 Û Üß
Û Üß
ßÜÜß
X3
The last parameter of this command is the <cnt> 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.
The entire bezier curve is drawn using the current line pattern, > v2.A3
thickness and write mode. > v2.A3
The actual bezier curve can be described mathematically by the > v2.A3
following parametric equations: > v2.A3
X = X1*(1-t)^3 + X2*3*t*(t-1)^2 + X3*3*t^2*(1-t) + X*4*t^3 > v2.A3
Y = Y1*(1-t)^3 + Y2*3*t*(t-1)^2 + Y3*3*t^2*(1-t) + Y*4*t^3 > v2.A3
These are the normal equational forms of the weighted sum B-Spline > v2.A3
function using four control points instead of directional vectors. > v2.A3
The variable T is varied from 0.0 through 1.0 over some increment to > v2.A3
achieve the total curve. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 99
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.5 þ RIP_CIRCLE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Draw circle in current color and line thickness
Level: 0
Command: C
Arguments: x_center:XY y_center:XY radius:XY > v2.A2
Format: !|C <x_center> <y_center> <radius>
Example: !|C1E180M
Uses Draw Color: YES
Uses Back Color: YES > v2.A1
Uses Line Style: YES > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: YES > v2.A1
Uses Font Style: NO
Uses Viewport: YES > v1.54
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
This command draws a circle in the current drawing color and line
thickness. The <radius> 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 radius is considered to be in the horizontal direction for the > v2.A3
purpose of aspect ratio calculations. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 100
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.6 þ RIP_COLOR ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Set current Drawing Color for graphics
Level: 0
Command: c
Arguments: color:CM > v2.A2
Format: !|c <color>
Example: !|cA
Uses Draw Color: YES
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO
Uses Font Style: NO
Uses Viewport: NO > v1.54
Uses Port: NO > v2.A3
Uses Base Math: Current setting > v2.A2
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 when borders are enabled. (The interior of the ellipse would > v2.A3
be drawn according to the most recent RIP_FILL_STYLE command).
The <color> parameter of this command serves two purposes depending > v2.A0
on what Color Mode is currently set. The default mode, Color Map > v2.A0
mode, signifies that the color parameter of this command will use the > v2.A0
parameter as an index into the 256 color Drawing Palette color > v2.A0
mapping table. In this mode, this parameter will use the current > v2.A0
Base Math set by the global RIP_SET_BASE_MATH command. > v2.A0
In Direct RGB Color Mode, the color parameter will be encoded in > v2.A0
UltraNums (regardless of the current Base Math setting). The total > v2.A0
number of digits used will vary depending on the number of bits per > v2.A0
color component (R, G and B). The following table will provide a > v2.A0
breakdown of bits vs. total number of UltraNum digits used for Direct > v2.A0
RGB Color codes: > v2.A0
Bits Total Digits > v2.A0
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A0
1 1 > v2.A0
2 1 > v2.A0
3 2 > v2.A0
4 2 > v2.A0
5 3 > v2.A0
6 3 > v2.A0
7 4 > v2.A0
8 4 > v2.A0
These numeric values will be an encoded RGB value allowing you to set > v2.A0
arbitrary RGB colors directly with the Set Color commands. If the > v2.A0
RGB color is not permissable, the closest match from the Color > v2.A0
palette table will be located and used. The number of bits of > v2.A3
precision used in the encoded RGB value will be determined by the > v2.A0
RIP_SET_COLOR_MODE command. > v2.A0
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 101
When Direct RGB Colors Codes are used, the bits for each Red, Green > v2.A0
and Blue are encoded as tightly as possible to ensure no wasted > v2.A0
space. For example, if 6 bits were used for R, G and B, you would > v2.A0
have the following layout in binary form: > v2.A0
rrrrrr gggggg bbbbbb > v2.A0
where each of "r", "g" and "b" could be individual ones or zeros. > v2.A0
This binary representation of the color code is then converted to > v2.A0
UltraNum using the proper number of digits from the preceding table. > v2.A0
For example, if you had binary values: > v2.A0
RED: 011011 > v2.A0
GREEN: 001001 > v2.A0
BLUE: 100100 > v2.A0
You would have the following binary number: > v2.A0
011011 001001 100100 (111,204 decimal) > v2.A0
And in UltraNum, the value would be: R9a > v2.A0
When Color Mapping Mode is in use, the color parameter may be shorter > v2.A0
than four digits. This is for space savings, as it is allowable in > v2.A0
the specification for the last numeric parameter in a parameter list > v2.A0
to be "shorter" than the full length. > v2.A0
In Color Map mode, this command chooses one of the colors of the > v2.A0
256-color Drawing Palette defined by the class of Set Palette > v2.A0
commands. Here is the default 16 lowest colors of the Desktop > v2.A0
Palette (these correspond to the colors of ANSI text graphics): > v2.A3
Master 64-Color > v2.A0
Palette Color Code > v2.A0
16ÄColor RIP Palette ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ R/G/B > v2.A0
Color Code Base-10 B-36 B-64 (0-3) Color > v2.A0
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ > v2.A0
00 0 (00) [0] 0 0 0 Black > v2.A0
01 1 (01) [1] 0 0 2 Blue > v2.A0
02 2 (02) [2] 0 2 0 Green > v2.A0
03 3 (03) [3] 0 2 2 Cyan > v2.A0
04 4 (04) [4] 2 0 0 Red > v2.A0
05 5 (05) [5] 2 0 2 Magenta > v2.A0
06 20 (0K) [K] 2 1 0 Brown > v2.A0
07 7 (07) [7] 2 2 2 Light Gray > v2.A0
08 56 (1K) [u] 1 1 1 Dark Gray > v2.A0
09 57 (1L) [v] 1 1 3 Light Blue > v2.A0
0A 58 (1M) [w] 1 3 1 Light Green > v2.A0
0B 59 (1N) [x] 1 3 3 Light Cyan > v2.A0
0C 60 (1O) [y] 3 1 1 Light Red > v2.A0
0D 61 (1P) [z] 3 1 3 Light Magenta > v2.A0
0E 62 (1Q) [#] 3 3 1 Yellow > v2.A0
0F 63 (1R) [@] 3 3 3 White > v2.A0
The raw color values (0-63) correspond to an RGB color definition in > v2.A0
which two bits are used for each of the Red, Green and Blue > v2.A0
components. The layout of the binary number is shown as follows: > v2.A0
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 102
Primary Secondary > v2.A0
ÃÄÄÄÄÄÄÄÄÄŽ ÃÄÄÄÄÄÄÄÄÄŽ > v2.A0
ÉÍÍÍÑÍÍÍËÍÍÍÑÍÍÍÑÍÍÍËÍÍÍÑÍÍÍÑÍÍÍ» > v2.A0
º±±±³±±±º ³ ³ º ³ ³ º > v2.A0
º±±±³±±±º R ³ G ³ B º r ³ g ³ b º > v2.A0
º±±±³±±±º ³ ³ º ³ ³ º > v2.A0
ÈÍÍÍÏÍÍÍÊÍÍÍÏÍÍÍÏÍÍÍÊÍÍÍÏÍÍÍÏÍÍÍŒ > v2.A0
80 40 20 10 8 4 2 1 (hex) > v2.A0
7 6 5 4 3 2 1 0 (position) > v2.A0
Notice that each of the R, G and B sections are broken up into two > v2.A0
separate bit sections in the color palette entry number. Also, the > v2.A0
bits are reversed when they are encoded. Let's look at four separate > v2.A0
colors of Red, Green and Blue to see how the bit patterns correspond > v2.A0
to the actual Palette entries: > v2.A0
RED PALETTE ENTRY GREEN PALETTE ENTRY BLUE PALETTE ENTRY > v2.A0
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ > v2.A0
xxRGBrgb xxRGBrgb xxRGBrgb > v2.A0
ÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄ > v2.A0
00 00000000 00 00000000 00 00000000 > v2.A0
01 00100000 01 00010000 01 00001000 > v2.A0
10 00000100 10 00000010 10 00000001 > v2.A0
11 00100100 11 00010010 11 00001001 > v2.A0
Color 00 of the 16-color RIP palette is always the background color
(which is typically Black).
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 103
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.7 þ RIP_COMMENT ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Put in a comment as part of a RIPscrip sequence > v2.A2
Level: 0 > v2.A2
Command: ! > v2.A2
Arguments: string... > v2.A2
Format: !|!This is a comment > v2.A2
Example: !|!Everything from this point on is ignored > v2.A2
Uses Draw Color: NO > v2.A2
Uses Back Color: NO > v2.A2
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO > v2.A2
Uses Font Style: NO > v2.A2
Uses Viewport: NO > v2.A2
Uses Port: NO > v2.A3
Uses Base Math: N/A > v2.A2
A comment may be embedded inside a RIPscrip file. A comment is one > v2.A2
line or longer in length. A comment is a special case of a RIPscrip > v2.A2
command letter. In this case, it is the command letter "!". If a > v2.A2
"!" is encountered right after a "!|", a "SOH |" or an "STX |" > v2.A2
sequence, then the remainder of the command line is a comment. > v2.A2
Comments may be line-continued with backslashes just like regular > v2.A2
RIPscrip commands can. Some examples of comments might be: > v2.A2
!|!This is a comment > v2.A2
!|c0F|!Set the color to white|c00|!Set the color to black > v2.A2
!|c0F|!this is a very long, continued\ > v2.A2
comment line. Line-continued comments\ > v2.A2
adhere to standard RIPscrip line continuation rules > v2.A2
Note that the second example shows a comment starting after a > v2.A2
legitimate RIPscrip command (set color). This is valid. > v2.A2
The RIP_COMMENT is treated exactly like any other RIPscrip command > v2.A2
for the purposes of parsing RIPscrip commands, EXCEPT that the > v2.A2
string is explicitly ignored for text variables. Any use of `|' will > v2.A2
be interpreted as the beginning of the next command, and `\' will > v2.A2
interpreted as a line continuation. No other characters need be > v2.A2
escaped out. > v2.A2
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 104
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.8 þ RIP_ERASE_EOL ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Erase current line from cursor to end of line
Level: 0
Command: >
Arguments: <none>
Format: !|>
Example: !|>
Uses Draw Color: NO
Uses Back Color: YES > v2.A3
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO
Uses Font Style: NO
Uses Viewport: NO > v1.54
Uses Port: NO > v2.A3
Uses Base Math: N/A > v2.A2
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.
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 105
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.9 þ RIP_ERASE_VIEW ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Clear Graphics Window to current background color
Level: 0
Command: E
Arguments: <none>
Format: !|E
Example: !|E
Uses Draw Color: NO
Uses Back Color: YES > v2.A3
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO
Uses Font Style: NO
Uses Viewport: NO > v1.54
Uses Port: YES > v2.A3
Uses Base Math: N/A > v2.A2
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 text window portion(s) also. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 106
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.10 þ RIP_ERASE_WINDOW ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Clears Text Window to current background color
Level: 0
Command: e
Arguments: <none>
Format: !|e
Example: !|e
Uses Draw Color: NO
Uses Back Color: NO > v2.A3
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO
Uses Font Style: NO
Uses Viewport: NO > v1.54
Uses Port: NO > v2.A3
Uses Base Math: N/A > v2.A2
This clears the TTY text window to the current graphics background > v2.A4
color (color #0) and positions the cursor in the upper-left corner of > v2.A4
the window. > v2.A4
The area that is erased is actually the bounding rectangle of the > v2.A4
text window, not only the display region inside the bounding > v2.A4
rectangle. This is different than ANSI commands which erase the text > v2.A4
window to a certain color. ANSI/VT-102 commands only erase the > v2.A4
display region, not the entire bounding rectangle. > v2.A4
If the text window is not in use or deactivated, then > v2.A4
this command is ignored. If the text window and any viewports > v2.A4
overlap, then this command will clear the overlapping viewport(s) > v2.A4
also. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 107
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.11 þ RIP_EXTENDED_FONT_STYLE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Select current outline font style (True Type style) > v2.A3
Level: 0 > v2.A1
Command: y > v2.A1
Arguments: direction:3 size:2 style:2 h_align:1 v_align:1 > v2.A2
reserved:4 font_name_string > v2.A2
Format: !|y <direction> <size> <style> <h_align> > v2.A1
<v_align> <reserved> <font_name_string> > v2.A2
Example: !|y0P01203000000courier > v2.A2
Uses Draw Color: NO > v2.A1
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO > v2.A1
Uses Font Style: YES > v2.A1
Uses Viewport: NO > v2.A1
Uses Port: NO > v2.A3
Uses Base Math: Current setting > v2.A2
This command is an extended form of the RIP_FONT_STYLE command. The > v2.A1
use of this command opens up a large number of other fonts that > v2.A1
aren't like the older RIPscrip 1.x fonts. They are not vector based > v2.A1
and they're not bitmapped based like those used with the > v2.A1
RIP_FONT_STYLE command. The older fonts are very useful for many > v2.A1
applications, but when it comes to production video graphics they > v2.A1
leave a bit to be desired. This command utilizes True-Type (tm) > v2.A1
style fonts which are "outline" fonts. By outline, we mean that they > v2.A1
draw the outline of the font and fill-in the interior of the font. > v2.A1
They also have a number of special attributes that you may assign to > v2.A1
them (ie, Bold, Italic, Strikeout and Underline). > v2.A1
The addition of this extended font system fills a need in RIPscrip > v2.A1
for solid fonts that are extensible (ie, specifying fonts not in the > v2.A1
default system). Fonts are scalable to an arbitrary point size > v2.A1
(unlike the fonts in RIP_FONT_STYLE which have pre-defined font > v2.A1
sizes). > v2.A1
The commands RIP_TEXT, RIP_TEXT_XY, RIP_REGION_TEXT and RIP_BUTTON > v2.A1
use whichever font command is most recent (eg, RIP_FONT_STYLE or > v2.A1
RIP_EXTENDED_FONT_STYLE). In other words, whichever font style that > v2.A1
has been selected will be the one that is used for rendering the > v2.A1
associated RIPscrip text related commands. > v2.A1
This command differs from the RIP_FONT_STYLE in several respects. > v2.A1
One, it doesn't use built-in font sizes like the older format does > v2.A1
(see RIP_FONT_STYLE); this command specifies fonts in a more > v2.A1
universal format of Point Sizes. A "point" is technically defined as > v2.A1
1/72nd of an inch. Secondly, these fonts have the ability to alter > v2.A1
the text "facing" which should be shown to the user (bold, italic, > v2.A1
etc). > v2.A1
This font system supports simple horizontal or vertical orientations > v2.A1
for the text. The way you specify the font direction is different! > v2.A1
The direction of the font is specified in tenths (1/10's) of degrees > v2.A2
for future expadability. The possible values for the font <direction> > v2.A2
are (in decimal, meganum, and ultranum): > v2.A2
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 108
Dec Meg Ult Description > v2.A2
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A2
000 000 000 Horizontal text (left to right text) > v2.A2
900 0P0 0E4 Vertical text (bottom to top - rotated 90.0 degrees) > v2.A2
The <direction> parameter may be enhanced in a future revision to > v2.A1
support arbitrary rotation of the font (in tenths of a degree > v2.A3
increments). For now, valid values for this parameter are 0.0 and > v2.A3
90.0 degrees. > v2.A3
The <h_align> parameter determines the orientation of the displayed > v2.A1
text around the specified text beginning coordinates. In other > v2.A1
words, the text might begin at the coordinate and move left, right, > v2.A1
or be centered around the location. The possible values for the > v2.A1
<h_align> parameter are as follows: > v2.A1
Value Description of Horizontal Alignment > v2.A1
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A1
0 Align text to the left - X/Y location is the far left > v2.A1
of the text > v2.A1
1 Right align text. The X/Y location is the far right > v2.A1
of the text > v2.A1
2 Center the text horizontally around the X/Y location > v2.A1
The <v_align> parameter is much like the <h_align> parameter in that > v2.A1
it defines the orientation of the font in relation to the X/Y text > v2.A1
coordinates. This command though performs vertical justification of > v2.A1
the font instead of horizontal justification (like the <h_align> > v2.A1
parameter). The possible values for this parameter are: > v2.A1
Value Description of Vertical Alignment > v2.A1
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A1
0 Align the text vertically with the X/Y location at > v2.A1
the very top of the tallest character in the font. > v2.A1
1 Make the X/Y location of the text at the very bottom > v2.A1
of the tallest character in the font. > v2.A1
2 Center the text vertically around the X/Y location > v2.A1
(this takes descenders into consideration). > v2.A1
3 Align the text where the X/Y base point defines the > v2.A1
location where the baseline of the font will appear. > v2.A1
The <size> parameter defines the point size of the font to be > v2.A1
displayed on the screen. > v2.A1
In order to maintain resolution independence with extended fonts and > v2.A1
various resolutions, we need to formally define how a point size is > v2.A1
rendered at different resolutions. For the purposes of RIPscrip font > v2.A1
systems, we formally define a point size as one physical pixel on a > v2.A1
640x480 resolution device. Since a 640x480 device on a 13" > v2.A1
monitor is exactly 1 point per pixel, this definition holds well. > v2.A1
For other resolutions, we simply adjust the point size to some > v2.A1
proportion. For example, a 1280x1024 resolution is exactly twice as > v2.A1
wide as a 640x480 screen, but the height is 2.1333 times that of its > v2.A1
480 counterpart. So a little bit of adjustment must be made on the > v2.A1
fonts to accomodate this precisely. The ideal method for this would > v2.A1
be if you could apply certain scaling parameters to the font system > v2.A1
in both the horizontal and vertical directions separately. Not all > v2.A1
font systems will allow this though so a "closest approximation" > v2.A1
might have to occur. In our 1280x1024 example, you might decide to > v2.A1
just use twice the specified point size and leave it at that (and not > v2.A1
worrying about the slight discrepency on the height portion of the > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 109
font). When getting into resolution independence, it is not always > v2.A1
possible to get 100.0% pixel perfect accuracy. If you can, > v2.A1
wonderful, but it can't be expected 100.0% on all platforms. > v2.A1
For the standard RIPterm resolutions of 640x350, 640x480, 800x600, > v2.A1
1024x768 and 1280x1024, only two of the resolutions do not have > v2.A1
perfectly square pixels - these are 640x350 and 1280x1024. These are > v2.A1
not the only resolutions possible under RIPscrip - they're just the > v2.A1
ones that TeleGrafix's RIP products utilize. The 640x350 resolution > v2.A1
is like the 1280x1024 resolution in that the height of fonts will > v2.A1
need to be adjusted to be pixel accurate with their 640x480 > v2.A1
counterparts. If you cannot do this with your font system, then you > v2.A1
might wish to reduce the point size a little bit so that the vertical > v2.A1
component more closely matches the visual size of the font on a > v2.A1
640x480 screen (note that your horizontal size will shrink a little > v2.A1
bit smaller than the 640x480 font - this is a compromise - the choice > v2.A3
is your's). > v2.A3
The <style> parameter defines the style in which the font is to be > v2.A1
rendered (eg, Normal, Bold, etc). The style options are organized as > v2.A1
a set of flags which may be combined (OR'ed) together to produce a > v2.A1
final, composite result: > v2.A1
Style Description > v2.A1
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A1
00 Normal font sizing > v2.A1
01 Bold font > v2.A1
02 Italic font > v2.A1
04 Strike-out font > v2.A1
08 Underlined font > v2.A1
The last, and possibly most important parameter in this command is > v2.A1
the text parameter, <font_name_string>. This string of text defines > v2.A1
the name of the font to activate. If a specified font is not > v2.A1
recognized, then the default font in the RIP_FONT_STYLE is selected > v2.A1
(with size of 1). > v2.A1
The possible (pre-defined) font names are: > v2.A1
Name Description > v2.A1
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A1
COURIER Courier mono-spaced font > v2.A1
HELV Helvetica proportional font > v2.A1
TIMESROM Times Roman proportional font > v2.A1
OLDENGL Old English (gothic) proportional font > v2.A1
SANSSERF Sans Serif proportional font > v2.A1
These pre-defined fonts must be supported by all RIPscrip 2.0 and > v2.A1
later software packages. A font name is up to eight characters in > v2.A1
length. Other fonts may be specified by an application designer. In > v2.A1
order for these fonts to be usable by the terminal system, they must > v2.A1
already exist on the system and have some form of recognizable name > v2.A1
associated with them. In RIPscrip 2.0, we define an extended font > v2.A1
name as a name up to eight character in length. In order for the > v2.A1
font to be recognized by the target terminal system it has to > v2.A1
understand the same font name (presumably a font filename). > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 110
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.12 þ RIP_EXTENDED_TEXT_WINDOW ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Define a resolution independent text window > v2.A4
Level: 0 > v2.A4
Command: b > v2.A4
Arguments: x0:XY y0:XY x1:XY y1:XY width:2 height:2 font_no:1 > v2.A4
flags:4 reserved:3 > v2.A4
Format: !|b <x0> <y0> <x1> <y0> <width> <height> <font_no> > v2.A4
<flags> <reserved> > v2.A4
Example: !|b0000ZKQO280P2000H000 > v2.A4
Uses Draw Color: NO > v2.A4
Uses Back Color: NO > v2.A4
Uses Line Style: NO > v2.A4
Uses Fill Style: NO > v2.A4
Uses Write Mode: NO > v2.A4
Uses Font Style: NO > v2.A4
Uses Viewport: NO > v2.A4
Uses Port: NO > v2.A4
Uses Base Math: Current setting > v2.A4
This RIPscrip command is a more sophisticated way of defining a text > v2.A4
window than by using the older RIP_TEXT_WINDOW command. The older > v2.A4
command doesn't permit you the luxury of creating a truly resolution > v2.A4
independent text window - this command does and is far superior in > v2.A4
design to the older RIPscrip 1.xx RIP_TEXT_WINDOW command. If at all > v2.A4
possible, you should use this command instead of the older command as > v2.A4
it provides more flexibility and more methods of interfacing with the > v2.A4
text window via text variable query statements. > v2.A4
This version of a text window works by establishing a bounding > v2.A4
rectangle that is to contain the actual text window display region. > v2.A4
This bounding rectangle is specified just like you would in drawing > v2.A4
a filled rectangle, by indicating the upper-left X/Y coordinates and > v2.A4
the lower-right X/Y coordinates of the bounding rectangle. Note that > v2.A4
the lower-right corner of the bounding rectangle is non-inclusive to > v2.A4
the bounding rectangle region, just like with filled rectangles. See > v2.A4
the earlier section entitled "THE MATHEMATICS OF GRAPHICS AND > v2.A4
COORDINATES" for more detailed information on this subject and why it > v2.A4
is important. > v2.A4
Once a bounding rectangle is established, you indicate how many > v2.A4
columns wide and how many lines tall you wish your text window to be, > v2.A4
and also indicate the desired text font you wish to use for your > v2.A4
window. The RIPscrip software will take your desired width, height > v2.A4
and text font into consideration and determine if it can fit a text > v2.A4
window inside your bounding rectangle with this font's dimensions. > v2.A4
If it can make a text window exactly the width and height of your > v2.A4
request, it does so - centering the text window inside the bounding > v2.A4
rectangle as in the following diagram: > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 111
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» > v2.A4
º º > v2.A4
º ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» º > v2.A4
º º º º > v2.A4
º º ÉÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ» º º > v2.A4
º º ÇÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅŶ º º > v2.A4
º º ÇÅText window displayŶ º º > v2.A4
º º ÇÅÅÅÅÅÅrectangleÅÅÅÅÅŶ º º > v2.A4
º º ÇÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅŶ º º > v2.A4
º º ÇÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅŶ º º > v2.A4
º º ÈÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏŒ º º > v2.A4
º º º º > v2.A4
º ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ º > v2.A4
º Text window bounding rectangle º > v2.A4
º º > v2.A4
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ > v2.A4
Graphics Screen > v2.A4
If the font number provided would make either the width or height of > v2.A4
the text window "too large" to fit inside the bounding rectangle, > v2.A4
then several things may happen (in the following order): > v2.A4
1) The font number is checked. If a narrower or shorter font > v2.A4
is available in the RIPscrip text window system, it will > v2.A4
be chosen, then everything will be recalculated to see if > v2.A4
the width and/or height can now be fit inside the bounding > v2.A4
rectangle. If it can, then this new font will be used to > v2.A4
accomodate the request. This evaluation process is > v2.A4
incremental in nature. If the width and/or height is too > v2.A4
large, then the next smaller font is checked, so on and > v2.A4
so forth. Here is the table of fonts, their row/column > v2.A4
sizes, and which font number will be checked if the width > v2.A4
or the height (or both) is out of range for the given > v2.A4
bounding rectangle: > v2.A4
Next font to check > v2.A4
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A4
Shrink Shrink Shrink > v2.A4
Font Columns Rows Width Height Both > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ > v2.A4
0 80 43 1 n/a n/a > v2.A4
1 91 43 n/a n/a n/a > v2.A4
2 80 25 3 0 1 > v2.A4
3 91 25 n/a 1 n/a > v2.A4
4 40 25 2 0 0 > v2.A4
If a new font must be chosen, then you evaluate whether you > v2.A4
need to shrink the font in the width, height or in both > v2.A4
directions. Consult the preceding table to determine which > v2.A4
font number to check next. If the entry specifies "n/a", > v2.A4
then you cannot shrink the font any further and must move on > v2.A4
to step number 2 (see below). > v2.A4
2) If you have moved down to the smallest font and you still > v2.A4
cannot obtain the desired height and width of your text > v2.A4
window, you have no alternative then to reduce the width > v2.A4
and/or height to make it fit inside the bounding rectangle. > v2.A4
This is a last resort situation, but must be done if the > v2.A4
text window is to fit inside the bounding rectangle. If > v2.A4
the width is too wide, then one column will be trimmed off > v2.A4
of the text window and then its new pixel width would be > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 112
evaluated. If it still doesn't fit, you keep removing > v2.A4
more columns, one-by-one, until you either get a window > v2.A4
that fits, or you hit zero columns. If your bounding > v2.A4
rectangle is so small that you can't have even a one column > v2.A4
wide or one line tall text window then the text window is > v2.A4
made exactly one line tall, or one column wide to accomodate > v2.A4
the situation and the bounding box is adjusted accordingly > v2.A4
to fit exactly the outer dimensions of the newly defined > v2.A4
text window (albeit an incorrect one). > v2.A4
When the text window is actually defined, the cursor is placed in the > v2.A4
upper-left corner (0,0) and any ANSI/VT-102 attributes are reset to > v2.A4
normal defaults. The vertical scrolling margin for the text window > v2.A4
defined in ANSI/VT-102 is set to the full height of the text window. > v2.A4
The colors are set to light-gray text on a black background > v2.A4
(low intensity white on black - standard ANSI colors). > v2.A4
The <flags> parameter of this command allows you to specify some > v2.A4
extra options to control how the text window is defined and how it > v2.A4
will operate. The available flags, which must be OR'ed togther to > v2.A4
create a final flags "value", are as follows: > v2.A4
Flag Description > v2.A4
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A4
1 Enable character-wrap. If this flag is not present, > v2.A4
then "chop" mode is in use. See the RIP_TEXT_WINDOW > v2.A4
command for more details on this mode of text window > v2.A4
operation. > v2.A4
2 Disable the cursor immediately (as if a $COFF$ text > v2.A4
variable were processed). This hides the cursor > v2.A4
immediately when the text window is created (see flag > v2.A4
16 for more on this). This doesn't mean that text > v2.A4
won't be displayed, it only means that you won't see > v2.A4
a cursor in the text window when it is current and > v2.A4
active. > v2.A4
4 Deactivate the text window immediately upon creation. > v2.A4
This acts as if immediately after defining the text > v2.A4
window, a $DTW$ text variable command were issued. > v2.A4
Any raw text received by the terminal would not be > v2.A4
displayed in this text window if it is the current > v2.A4
one. When deactivated, the cursor for this text > v2.A4
window is hidden and any text variables requesting > v2.A4
information about this text window will return a > v2.A4
result indicating that the text window is deactivated. > v2.A4
Note, that the $INUSE(TW)$ text variable will still > v2.A4
respond that this text window is "in use", even > v2.A4
though it is deactivated. > v2.A4
8 Ignore the font number parameter. This flag gives > v2.A4
the text window definition software the task of > v2.A4
finding the best font to use for the text window. > v2.A4
This alleviates the coder from having to determine > v2.A4
the proper font to use. This makes life a bit > v2.A4
easier in choosing fonts. > v2.A4
16 Erase the text window immediately after it is > v2.A4
created. This erases the contents of the entire > v2.A4
bounding rectangle, not just the text window display > v2.A4
area! The area is erased to color #0 (which is > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 113
typically black). This operation is performed before > v2.A4
the text window's cursor is displayed (if it is > v2.A4
displayed at all based on flag 2), and before the > v2.A4
text window can possibly be deactivated (via flag 4). > v2.A4
32 The text window is protected immediately after it is > v2.A4
created. > v2.A4
It should be noted that there are some fundamental differences in > v2.A4
nature from the extended text window command and the older normal > v2.A4
text window command. This one is obviously more powerful and has the > v2.A4
benefit of being resolution independent. When working with text > v2.A4
variables to query the status or configuration of text windows, some > v2.A4
text variables cannot query particular pieces of information about > v2.A4
extended text windows (eg, $TWX0$, $TWY0$, $TWX1$ and $TWY1$). The > v2.A4
types of information that cannot be obtained are the text cell > v2.A4
coordinates of the upper-left and lower-right corners of the extended > v2.A4
text window - there aren't any - they're specified in graphical > v2.A4
coordinates, not in text coordinates like with the RIP_TEXT_WINDOW > v2.A4
command. See these text variables for more details about this kind > v2.A4
of situation. > v2.A4
NOTE: A text window definition command is ignored if the current > v2.A4
text window data table entry is protected! > v2.A4
The <reserved> parameter is reserved for future use in > v2.A4
RIPscrip and should be set to "000" for compatibility with > v2.A4
future releases of RIPscrip. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 114
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.13 þ RIP_FILL (this command is no longer supported ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Flood fill screen area with current fill settings
Level: 0
Command: F
This command has been removed from the RIPscrip language. Due to the > v2.A2
numerous issues trying to make it work reliably at all resolutions, > v2.A2
it was decided that this command could not be implemented without > v2.A2
compromising the integrity of the scene. Also, fills work > v2.A2
differently under Windows, OS/2, Macintosh, Amiga, and DOS. With all > v2.A2
of the complexities involved, having a reliable fill operation cannot > v2.A2
be achieved under multiple resolutions and platforms. > v2.A2
There are a number of alternatives to using a flood fill. In fact, a > v2.A2
large number of screens could have been drawn much more efficiently > v2.A2
using the filled object commands listed below, than using a fill. > v2.A2
Basic Drawing Objects Filled Equivalent: > v2.A2
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A2
RIP_PIXEL N/A > v2.A2
RIP_LINE N/A > v2.A2
RIP_RECTANGLE RIP_FILLED_RECTANGLE > v2.A2
N/A RIP_BAR > v2.A2
RIP_CIRCLE RIP_FILLED_CIRCLE > v2.A2
RIP_OVAL RIP_FILLED_OVAL > v2.A2
RIP_ARC RIP_PIE_SLICE > v2.A2
RIP_OVAL_ARC RIP_OVAL_PIE_SLICE > v2.A2
RIP_POLYGON RIP_FILLED_POLYGON > v2.A2
RIP_POLYLINE N/A > v2.A2
RIP_BEZIER N/A > v2.A2
RIP_POLY_BEZIER RIP_FILLED_POLY_BEZIER > v2.A2
RIP_POLY_BEZIER_LINE N/A > v2.A2
RIP_ROUNDED_RECT RIP_FILLED_ROUNDED_RECT > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 115
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.14 þ RIP_FILL_PATTERN ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Set user-definable (custom) fill pattern/color
Level: 0
Command: s
Arguments: c1:2 c2:2 c3:2 c4:2 c5:2 c6:2 c7:2 c8:2 col:CM > v2.A2
Format: !|s <c1> <c2> <c3> <c4> <c5> <c6> <c7> <c8> <col>
Example: !|s11223344556677880F
Uses Draw Color: NO
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: YES > v2.A2
Uses Write Mode: NO
Uses Font Style: NO
Uses Viewport: NO > v1.54
Uses Port: NO > v2.A3
Uses Base Math: Current setting > v2.A2
This command allows you to specify a user-defined, custom Fill
Pattern. This pattern supersedes the predefined patterns of
RIP_FILL_STYLE. A custom fill pattern is an 8x8 pixel array defining
which pixels should be drawn in the current fill color (as set by the
<col> parameter here). The other pixels in the fill area are set to
the current pen background color. > v2.A3
Each of the eight parameters of this command, <c1> through <c8>
represent bit-patterns for a line of the 8x8 pixel array. Each line
is comprised of 8 pixels. The value of each parameter is the binary
representation of these 8 pixels as follows:
Bit 7 6 5 4 3 2 1 0
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
c1 128 64 32 16 8 4 2 1
c2 128 64 32 16 8 4 2 1
c3 128 64 32 16 8 4 2 1
c4 128 64 32 16 8 4 2 1
c5 128 64 32 16 8 4 2 1
c6 128 64 32 16 8 4 2 1
c7 128 64 32 16 8 4 2 1
c8 128 64 32 16 8 4 2 1
So, c1 is the top, and the most-significant bit is to the left.
The <col> parameter of this command serves two purposes depending > v2.A0
on what Color Mode is currently set. The default mode, Color Map > v2.A0
mode, signifies that the color parameter of this command will use the > v2.A0
parameter as an index into the 256 color Drawing Palette color > v2.A0
mapping table. In this mode, this parameter will use the current > v2.A0
Base Math set by the global RIP_SET_BASE_MATH command. > v2.A0
In Direct RGB Color Mode, the color parameter will be a four-digit > v2.A0
UltraNum (regardless of the current Base Math setting). This numeric > v2.A0
value will be an encoded RGB value, allowing you to set arbitrary RGB > v2.A0
colors directly with the Set Color commands. If the RGB color is not > v2.A0
permissable, the closest match from the Color Map table will be > v2.A0
located and used. The number of bits of precision used in the > v2.A0
encoded RGB value will be determined by the RIP_SET_COLOR_MODE > v2.A0
command. > v2.A0
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 116
When Color Mapping Mode is in use, the color parameter may be shorter > v2.A0
than four digits. This is for space savings, as it is allowable in > v2.A0
the specification for the last numeric parameter in a parameter list > v2.A0
to be "shorter" than the full length. > v2.A0
This command does not affect whether borders are enabled or disabled. > v2.A3
See RIP_SET_BORDER command for details on how to alter the status > v2.A3
of borders. > v2.A3
NOTE: The RIP_FILL_STYLE (predefined fill patterns) and this
RIP_FILL_PATTERN (custom fill patterns) completely override
each other's effects.
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 117
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.15 þ RIP_FILL_STYLE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Set current fill style (predefined) & fill color
Level: 0
Command: S
Arguments: pattern:2 color:CM > v2.A3
Format: !|S <pattern> <color> > v2.A3
Example: !|S05000F > v2.A2
Uses Draw Color: NO
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: YES > v2.A2
Uses Write Mode: NO
Uses Font Style: NO
Uses Viewport: NO > v1.54
Uses Port: NO > v2.A3
Uses Base Math: Current setting > v2.A2
This command defines the current fill pattern and fill color for use
in subsequent graphics fill operations. There are twelve (12)
predefined fill patterns. They are:
Pattern Description Example Misc
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
00 Fill with background color (color #0)
01 Solid Fill ÛÛÛÛÛÛÛÛÛÛÛ (fill color)
02 Line Fill ----------- (thick lines)
03 Light Slash Fill / / / / (thin lines)
04 Normal Slash Fill // // // // (thick lines)
05 Normal Backslash Fill \\ \\ \\ \\ (thick lines)
06 Light Backslash Fill \ \ \ \ (thin lines)
07 Light Hatch Fill ########### (thin lines)
08 Heavy Cross Hatch Fill XXXXXXXXXXX (thin lines)
09 Interleaving Line Fill +-+-+-+-+-+ (thin lines)
0A Widely spaced dot fill . : . : . : (pixels only)
0B Closely spaced dot fill ::::::::::: (pixels only)
The <color> parameter is the fill color for subsequent fill commands.
The "active" pixels of the pattern become this color. The "inactive"
pixels become the current pen background color. Fill pattern 00 will > v2.A3
set the entire fill area to the background color. (In this case, the
fill color doesn't matter).
The <color> parameter of this command serves two purposes depending > v2.A0
on what Color Mode is currently set. The default mode, Color Map > v2.A0
mode, signifies that the color parameter of this command will use the > v2.A0
parameter as an index into the 256 color Drawing Palette color > v2.A0
mapping table. In this mode, this parameter will use the current > v2.A0
Base Math set by the global RIP_SET_BASE_MATH command. > v2.A0
In Direct RGB Color Mode, the color parameter will be a four-digit > v2.A0
UltraNum (regardless of the current Base Math setting). This numeric > v2.A0
value will be an encoded RGB value, allowing you to set arbitrary RGB > v2.A0
colors directly with the Fill Style commands. If the RGB color is not > v2.A0
permissable, the closest match from the Color Map table will be > v2.A0
located and used. The number of bits of precision used in the > v2.A0
encoded RGB value will be determined by the RIP_SET_COLOR_MODE > v2.A0
command. > v2.A0
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 118
When Color Mapping Mode is in use, the color parameter may be shorter > v2.A0
than four digits. This is for space savings, as it is allowable in > v2.A0
the specification for the last numeric parameter in a parameter list > v2.A0
to be "shorter" than the full length. > v2.A0
This command does not affect whether borders are enabled or disabled. > v2.A3
See RIP_SET_BORDER command for details on how to alter the status > v2.A3
of borders. > v2.A3
The following twelve diagrams show visually what each fill pattern > v1.54
appears like. Next to each diagram are the eight numerical values > v1.54
which represent the monochrome bit-pattern of each line of each > v1.54
pattern. Numbers are shown in Hexadecimal (base 16), decimal (base > v1.54
10) and MegaNum (base 36): > v1.54
BACKGROUND FILL SOLID FILL > v1.54
ÉÍÍÍÍÍÍÍÍ» HEX DEC MEGA ULTRA ÉÍÍÍÍÍÍÍÍ» HEX DEC MEGA ULTRA > v1.54
º º 00 0 00 00 ºÛÛÛÛÛÛÛÛº FF 255 73 3@ > v1.54
º º 00 0 00 00 ºÛÛÛÛÛÛÛÛº FF 255 73 3@ > v1.54
º º 00 0 00 00 ºÛÛÛÛÛÛÛÛº FF 255 73 3@ > v1.54
º º 00 0 00 00 ºÛÛÛÛÛÛÛÛº FF 255 73 3@ > v1.54
º º 00 0 00 00 ºÛÛÛÛÛÛÛÛº FF 255 73 3@ > v1.54
º º 00 0 00 00 ºÛÛÛÛÛÛÛÛº FF 255 73 3@ > v1.54
º º 00 0 00 00 ºÛÛÛÛÛÛÛÛº FF 255 73 3@ > v1.54
º º 00 0 00 00 ºÛÛÛÛÛÛÛÛº FF 255 73 3@ > v1.54
ÈÍÍÍÍÍÍÍÍŒ ÈÍÍÍÍÍÍÍÍŒ > v1.54
00 01 > v1.54
LINE FILL LIGHT SLASH FILL > v1.54
ÉÍÍÍÍÍÍÍÍ» HEX DEC MEGA ULTRA ÉÍÍÍÍÍÍÍÍ» HEX DEC MEGA ULTRA > v1.54
ºÛÛÛÛÛÛÛÛº FF 255 73 3@ º Ûº 01 1 01 01 > v1.54
ºÛÛÛÛÛÛÛÛº FF 255 73 3@ º Û º 02 2 02 02 > v1.54
º º 00 0 00 00 º Û º 04 4 04 04 > v1.54
º º 00 0 00 00 º Û º 08 8 08 08 > v1.54
ºÛÛÛÛÛÛÛÛº FF 255 73 3@ º Û º 10 16 0G 0G > v1.54
ºÛÛÛÛÛÛÛÛº FF 255 73 3@ º Û º 20 32 0W 0W > v1.54
º º 00 0 00 00 º Û º 40 64 1S 10 > v1.54
º º 00 0 00 00 ºÛ º 80 128 3K 20 > v1.54
ÈÍÍÍÍÍÍÍÍŒ ÈÍÍÍÍÍÍÍÍŒ > v1.54
02 03 > v1.54
NORMAL SLASH FILL LIGHT BACKSLASH FILL > v1.54
ÉÍÍÍÍÍÍÍÍ» HEX DEC MEGA ULTRA ÉÍÍÍÍÍÍÍÍ» HEX DEC MEGA ULTRA > v1.54
ºÛÛÛ º E0 224 68 3W ºÛÛÛÛ º F0 240 60 3m > v1.54
ºÛÛ Ûº C1 193 5D 31 º ÛÛÛÛ º 78 120 3C 1u > v1.54
ºÛ ÛÛº 83 131 3N 23 º ÛÛÛÛ º 3C 60 1O 0y > v1.54
º ÛÛÛº 07 7 07 07 º ÛÛÛÛ º 1E 30 0U 0U > v1.54
º ÛÛÛ º 0E 15 0F 0F º ÛÛÛÛº 0F 15 0F 0F > v1.54
º ÛÛÛ º 1C 28 0S 0S ºÛ ÛÛÛº 87 135 3R 27 > v1.54
º ÛÛÛ º 38 56 1K 0u ºÛÛ ÛÛº C3 195 5F 33 > v1.54
º ÛÛÛ º 70 112 34 1m ºÛÛÛ Ûº E1 225 69 3X > v1.54
ÈÍÍÍÍÍÍÍÍŒ ÈÍÍÍÍÍÍÍÍŒ > v1.54
04 05 > v1.54
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 119
LIGHT BACKSLASH FILL LIGHT HATCH FILL > v1.54
ÉÍÍÍÍÍÍÍÍ» HEX DEC MEGA ULTRA ÉÍÍÍÍÍÍÍÍ» HEX DEC MEGA ULTRA > v1.54
ºÛ Û Û Ûº A5 165 4L 2b ºÛÛÛÛÛÛÛÛº FF 255 73 3@ > v1.54
ºÛÛ Û Û º D2 210 5U 3I ºÛ Û º 88 136 3S 28 > v1.54
º ÛÛ Û Ûº 69 105 2X 1f ºÛ Û º 88 136 3S 28 > v1.54
ºÛ ÛÛ Û º B4 180 50 2q ºÛ Û º 88 136 3S 28 > v1.54
º Û ÛÛ Û º 5A 90 2I 1Q ºÛÛÛÛÛÛÛÛº FF 255 73 32 > v1.54
º Û ÛÛ Ûº 2D 45 19 0j ºÛ Û º 88 136 3S 28 > v1.54
ºÛ Û ÛÛ º 96 150 46 2M ºÛ Û º 88 136 3S 28 > v1.54
º Û Û ÛÛº 4B 75 23 1B ºÛ Û º 88 136 3S 28 > v1.54
ÈÍÍÍÍÍÍÍÍŒ ÈÍÍÍÍÍÍÍÍŒ > v1.54
06 07 > v1.54
HEAVY CROSS HATCH FILL INTERLEAVING LINE FILL > v1.54
ÉÍÍÍÍÍÍÍÍ» HEX DEC MEGA ULTRA ÉÍÍÍÍÍÍÍÍ» HEX DEC MEGA ULTRA > v1.54
ºÛ Ûº 81 129 3L 21 ºÛÛ ÛÛ º CC 204 5O 3C > v1.54
º Û Û º 42 66 1U 12 º ÛÛ ÛÛº 33 51 1F 0p > v1.54
º Û Û º 24 36 10 0a ºÛÛ ÛÛ º CC 204 5O 3C > v1.54
º ÛÛ º 18 24 0O 0O º ÛÛ ÛÛº 33 51 1F 0p > v1.54
º ÛÛ º 18 24 0O 0O ºÛÛ ÛÛ º CC 204 5O 3C > v1.54
º Û Û º 24 36 10 0a º ÛÛ ÛÛº 33 51 1F 0p > v1.54
º Û Û º 42 66 1U 12 ºÛÛ ÛÛ º CC 204 5O 3C > v1.54
ºÛ Ûº 81 129 3L 21 º ÛÛ ÛÛº 33 51 1F 0p > v1.54
ÈÍÍÍÍÍÍÍÍŒ ÈÍÍÍÍÍÍÍÍŒ > v1.54
08 09 > v1.54
WIDELY SPACED DOT FILL CLOSELY SPACED DOT FILL > v1.54
ÉÍÍÍÍÍÍÍÍ» HEX DEC MEGA ULTRA ÉÍÍÍÍÍÍÍÍ» HEX DEC MEGA ULTRA > v1.54
ºÛ º 80 128 3K 20 ºÛ Û º 88 136 3S 28 > v1.54
º º 00 0 00 00 º º 00 0 00 00 > v1.54
º Û º 08 8 08 08 º Û Û º 22 34 0Y 04 > v1.54
º º 00 0 00 00 º º 00 0 00 00 > v1.54
ºÛ º 80 128 3K 20 ºÛ Û º 88 136 3S 28 > v1.54
º º 00 0 00 00 º º 00 0 00 00 > v1.54
º Û º 08 8 08 08 º Û Û º 22 34 0Y 24 > v1.54
º º 00 0 00 00 º º 00 0 00 00 > v1.54
ÈÍÍÍÍÍÍÍÍŒ ÈÍÍÍÍÍÍÍÍŒ > v1.54
0A 0B > v1.54
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 120
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.16 þ RIP_FILLED_CIRCLE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Draw a filled circle in current color/line style > v2.A2
Level: 0 > v2.A2
Command: G > v2.A2
Arguments: x_center:XY y_center:XY radius:XY > v2.A2
Format: !|G <x_center> <y_center> <radius> > v2.A3
Example: !|G1E180M > v2.A3
Uses Draw Color: YES > v2.A2
Uses Back Color: YES > v2.A2
Uses Line Style: YES > v2.A2
Uses Fill Style: YES > v2.A2
Uses Write Mode: YES > v2.A2
Uses Font Style: NO > v2.A2
Uses Viewport: YES > v2.A2
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
This command draws a complete filled circle on the screen. The > v2.A2
interior of the circle is drawn using the current fill pattern and > v2.A2
fill color. The outline of the circle is drawn using the current > v2.A2
drawing color and line thickness (if borders are enabled). > v2.A3
The radius is considered to be in the horizontal direction for the > v2.A3
purpose of aspect ratio calculations. > v2.A3
When borders are disabled, this command adheres to the resolution > v2.A3
independent method of filled regions. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 121
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.17 þ RIP_FILLED_OVAL ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Draw filled ellipse using current color/pattern
Level: 0
Command: o
Arguments: x_center:XY y_center:XY x_rad:XY y_rad:XY > v2.A2
Format: !|o <x_center> <y_center> <x_rad> <y_rad>
Example: !|o1G2B0M0G
Uses Draw Color: YES
Uses Back Color: YES > v2.A1
Uses Line Style: YES > v2.A2
Uses Fill Style: YES > v2.A2
Uses Write Mode: YES > v2.A1
Uses Font Style: NO
Uses Viewport: YES > v1.54
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
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.
When borders are disabled, this command adheres to the resolution > v2.A3
independent method of filled regions. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 122
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.18 þ RIP_FILLED_POLYGON (formerly RIP_FILL_POLYGON) ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Draw filled polygon in current color/fill pattern
Level: 0
Command: p
Arguments: npoints:2 x1:XY y1:XY ... xn:XY yn:XY > v2.A2
Format: !|p <npoints> <x1> <y1> ... <xn> <yn>
Example: !|p03010105050909
Uses Draw Color: YES
Uses Back Color: YES > v2.A1
Uses Line Style: YES > v2.A2
Uses Fill Style: YES > v2.A2
Uses Write Mode: YES
Uses Font Style: NO
Uses Viewport: YES > v1.54
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
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 utilize Write Mode, but the outline of the polygon > v2.A3
does not.
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 123
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.19 þ RIP_FILLED_POLY_BEZIER ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Draw a poly-bezier curve (multi-segmented) > v2.A2
Level: 0 > v2.A2
Command: x > v2.A2
Arguments: num:2 count:2 x_base:XY y_base:XY ... > v2.A2
type:1 x1:XY y1:XY x2:XY y2:XY x3:XY y3:XY ... > v2.A2
type:1 x1:XY y1:XY ... > v2.A2
Format: !|z <num> <count> <x_base> <y_base> ... > v2.A2
<type> <x1> <y1> <x2> <y2> <x3> <y3> ... > v2.A2
<type> <x1> <y1> ... > v2.A2
Example: !|z > v2.A2
Uses Draw Color: YES > v2.A2
Uses Back Color: YES > v2.A2
Uses Line Style: YES > v2.A2
Uses Fill Style: YES > v2.A2
Uses Write Mode: YES > v2.A2
Uses Font Style: NO > v2.A2
Uses Viewport: YES > v2.A2
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
This command is identical to RIP_POLY_BEZIER, except that the > v2.A2
interior of the poly-bezier is filled with the current fill color > v2.A2
and fill pattern. The actual outline of the poly-bezier is drawn > v2.A2
using the current drawing color, line pattern and thickness. > v2.A2
NOTE: You will get unusual effects if the lines of the poly-bezier > v2.A2
overlap, creating a poly-bezier with internal "gaps". (The > v2.A2
rule is this: regions that are "inside" the poly-bezier an > v2.A2
even number of times due to overlap are NOT filled.) The > v2.A2
interior fill does utilize Write Mode, but the outline of the > v2.A3
the poly-bezier does not. > v2.A3
When borders are disabled, then the filled interior of the poly- > v2.A3
bezier curve adheres to the resolution independent nature of filled > v2.A3
regions. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 124
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.20 þ RIP_FILLED_RECTANGLE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Draw filled rectangle with fill style/line style > v2.A2
Level: 0 > v2.A2
Command: K > v2.A2
Arguments: x0:XY y0:XY x1:XY y1:XY > v2.A2
Format: !|K <x0> <y0> <x1> <y1> > v2.A3
Example: !|K00010A0E > v2.A3
Uses Draw Color: YES > v2.A2
Uses Back Color: YES > v2.A2
Uses Line Style: YES > v2.A2
Uses Fill Style: YES > v2.A2
Uses Write Mode: YES > v2.A2
Uses Font Style: NO > v2.A2
Uses Viewport: YES > v2.A2
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
This command draws a filled rectangle in the current drawing color, > v2.A2
using the current line style, pattern and thickness, and the current > v2.A2
fill style. (x0,y0) and (x1,y1) are any two opposing corners of the > v2.A2
rectangle. If x0=x1 or y0=y1 then the command will draw a single > v2.A2
vertical or horizontal line (or possibly a single pixel) (if borders > v2.A3
are off, then this command draws nothing in this situation). > v2.A3
This command operates similarly to the RIP_BAR command when borders > v2.A3
are disabled, however the lower-left and lower-right edges of the > v2.A3
filled rectangle obey the resolution independent method of performing > v2.A3
fills (see the section called "THE MATHEMATICS OF GRAPHICS AND > v2.A3
COORDINATES" for details on how this works. > v2.A3
Before the rectangle is actually drawn, the (x0,y0) and (x1,y1) > v2.A3
coordinates are "normalized". This means that they are adjusted so > v2.A3
that they specify the upper-left and lower-right coordinates > v2.A3
respectively. For example, if the parameters are received in the > v2.A3
order of (50,25) and (25,75) - upper-right and lower-left > v2.A3
respectively - they would be reorganized to be (25,25) and (50,75) > v2.A3
before the rectangle is actually drawn. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 125
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.21 þ RIP_FILLED_ROUNDED_RECT ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Draw a filled rectangle with rounded corners > v2.A3
Level: 0 > v2.A3
Command: u > v2.A3
Arguments: x0:XY y0:XY x1:XY y1:XY rad:2 > v2.A3
Example: !|u00010A0E09 > v2.A3
Uses Draw Color: YES > v2.A3
Uses Back Color: YES > v2.A3
Uses Line Style: YES > v2.A3
Uses Fill Style: YES > v2.A3
Uses Write Mode: YES > v2.A3
Uses Font Style: NO > v2.A3
Uses Viewport: YES > v2.A3
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A3
This command draws a rounded corner rectangle which is filled in with > v2.A3
the current fill pattern and fill color. The corners of the > v2.A3
rectangle are not drawn at right angles like normal rectangles. The > v2.A3
rounded rectangle has circular arcs drawn at all four corners of the > v2.A3
drawn object. The radius of the arc that is used to fill-in the > v2.A3
corners is specified in the <rad> parameter. The <x0,y0> and <x1,y1> > v2.A3
parameters define the upper left and lower right corners of the > v2.A3
rectangle as if the corners were actually specified as a normal > v2.A3
rectangle. The circular arcs drawn in the corners of the rounded > v2.A3
rectangle are truly circular in nature and adhere to aspect ratios > v2.A3
relating to the actual video configuration of the destination > v2.A3
application program. > v2.A3
If borders are enabled, then the outer portion of the rounded > v2.A3
rectangle are drawn in the current line style, foreground pen color > v2.A3
and line style. The border is drawn in "copy" mode - the border of > v2.A3
this command (if any) is never drawn in any operation other than the > v2.A3
COPY write mode. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 126
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.22 þ RIP_FONT_STYLE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Select current vector/bitmap font style > v2.A3
Level: 0
Command: Y
Arguments: font:2 direction:2 size:2 flags:2 > v2.A4
Format: !|Y <font> <direction> <size> <flags> > v2.A4
Example: !|Y01000400
Uses Draw Color: NO
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO
Uses Font Style: YES
Uses Viewport: NO > v1.54
Uses Port: NO > v2.A3
Uses Base Math: Current setting > v2.A2
This command sets the font, direction and size for RIP_TEXT commands.
Font Description of Font
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
00 Default 8x8 (*) font Bit-Mapped > v2.A3
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
(*) Font 00 is an 8x8 font at 640x350. Its actual cell-size > v2.A3
varies depending on the current resolution. This is > v2.A3
equivalent to the 80x43 font of the text window. See the > v2.A3
RIP_TEXT_WINDOW for a more detailed discussion of font > v2.A3
sizes and resolutions. > v2.A3
For the Direction parameter, use 00 to indicate horizontal and 01 for
vertical. Horizontal text appears from left to right. Vertical > v2.A3
text is drawn with the base-line to the right, and is read from > v2.A3
bottom to the top. > v2.A3
For the Size parameter, use 01 for the normal default size, 02 for
level 2 magnification, 03 for level 3 magnification, and 0A for level > v2.A3
10 magnification. For the bitmapped font (00), these magnification > v2.A3
factors are actual scaling factors - size 2 is twice as large as size > v2.A3
1, size 3 is three times as large, etc. The vector fonts (01-0A) are > v2.A3
not direct magnification factors - they are based on the following > v2.A3
table: > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 127
Mag Factor Actual Scaling Factor > v2.A3
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A3
01 3/5 of actual size > v2.A4
02 2/3 of actual size > v2.A4
03 3/4 of actual size > v2.A4
04 1/1 of actual size > v2.A4
05 4/3 of actual size > v2.A4
06 5/3 of actual size > v2.A4
07 2/1 of actual size > v2.A4
08 5/2 of actual size > v2.A4
09 3/1 of actual size > v2.A4
0A (10) 4/1 of actual size > v2.A4
The physical pixel dimensions of any particular font cell at a given > v2.A3
magnification level vary depending on resolution in such a way that > v2.A3
they appear to be the same size on the screen. For example, if a > v2.A3
font at magnification level 4 is 35 pixels tall at 640x350 > v2.A3
resolution, at 640x480 resolution, the font would be the same width, > v2.A3
but would be 48 pixels tall. This makes sure that the fonts are > v2.A3
resolution independent. > v2.A3
The <flags> parameter allows you to alter the orientation and other > v2.A4
special attributes of the subsequent text operations. The possible > v2.A4
flag values which may be combined are as follows (they must be OR'd > v2.A4
together): > v2.A4
Value Description of Flag > v2.A4
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A4
1 Right justify text in relation to the base point > v2.A4
2 Center justify text horizontally around base point > v2.A4
4 Bottom justify the font (at the bottom of any > v2.A4
descenders. > v2.A4
8 Baseline justify the font (base point is at the base > v2.A4
line of the font). > v2.A4
16 Vertically center the text (base point is vertically > v2.A4
in the center of the font cell). > v2.A4
32 Dropshadow the text using the current background > v2.A4
drawing color (set with RIP_BACK_COLOR). The > v2.A4
foreground text is drawn using the current foreground > v2.A4
drawing color (set with RIP_COLOR). The shadow is > v2.A4
drawn one pixel down and one pixel to the right of > v2.A4
the font for both vertical and horizontal text. > v2.A4
Flag values 1 and 2 are mutually exclusive. This means that either > v2.A4
one of them may be specified, but not both! If both are omitted, > v2.A4
then the text is "left justified". Flags 4, 8 and 16 are also > v2.A4
mutually exclusive. If either of them are omitted, then the text is > v2.A4
drawn with "top" justification. If both flags 1 and 2 are specified, > v2.A4
or more than one of the flags 4, 8 and 16 are specified then the > v2.A4
command is considered an error and is completely ignored. > v2.A4
Each form of justification uses the base point as a starting point. > v2.A4
Where the text is drawn in relation to this base point is a matter > v2.A4
of the justification. Here is an example of horizontal text with > v2.A4
all of the base point justifcation references pointed out: > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 128
Center > v2.A4
Left ÄÄ¿ ³ ÚÄÄ Right > v2.A4
   > v2.A4
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ > v2.A4
Top ÄijÛÛÛÛÛÛÛÛÛÛ ³ ³ > v2.A4
³ÛÛ ÛÛ ³ ³ > v2.A4
³ÛÛ ÛÛ ³ ³ > v2.A4
³ÛÛÛÛÛÛÛÛÛÛ ³ÛÛ ÛÛ ³ > v2.A4
Center ÄijÛÛ ÛÛ ³ÛÛ ÛÛ ³ > v2.A4
³ÛÛ ÛÛ ³ÛÛ ÛÛ ³ > v2.A4
Base ÄijÛÛÛÛÛÛÛÛÛÛ ³ ÛÛÛÛÛÛÛÛÛÛ ³ > v2.A4
³ ³ ÛÛ ³ > v2.A4
Bottom Äij ³ ÛÛÛÛÛÛÛÛÛÛ ³ > v2.A4
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ > v2.A4
The significance of each justification can be thought of in the > v2.A4
following diagrams of horizontal text: > v2.A4
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ > v2.A4
³°°ÛÛÛÛÛÛÛÛ ³ ³ ³ÛÛÛÛÛÛÛÛÛÛ ³ °°³ > v2.A4
³ÛÛ ÛÛ ³ ³ ³ÛÛ ÛÛ ³ ³ > v2.A4
³ÛÛ ÛÛ ³ ³ ³ÛÛ ÛÛ ³ ³ > v2.A4
³ÛÛÛÛÛÛÛÛÛÛ ³ÛÛ ÛÛ ³ ³ÛÛÛÛÛÛÛÛÛÛ ³ÛÛ ÛÛ ³ > v2.A4
³ÛÛ ÛÛ ³ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ³ÛÛ ÛÛ ³ > v2.A4
³ÛÛ ÛÛ ³ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ³ÛÛ ÛÛ ³ > v2.A4
³ÛÛÛÛÛÛÛÛÛÛ ³ ÛÛÛÛÛÛÛÛÛÛ ³ ³ÛÛÛÛÛÛÛÛÛÛ ³ ÛÛÛÛÛÛÛÛÛÛ ³ > v2.A4
³ ³ ÛÛ ³ ³ ³ ÛÛ ³ > v2.A4
³ ³ ÛÛÛÛÛÛÛÛÛÛ ³ ³ ³ ÛÛÛÛÛÛÛÛÛÛ ³ > v2.A4
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ > v2.A4
Top Justified Top Justified > v2.A4
Left Justified Right Justified > v2.A4
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ > v2.A4
³ÛÛÛÛÛÛÛÛÛÛ ³ ³ ³ÛÛÛÛÛÛÛÛÛÛ ³ ³ > v2.A4
³ÛÛ ÛÛ ³ ³ ³ÛÛ ÛÛ ³ ³ > v2.A4
³ÛÛ ÛÛ ³ ³ ³ÛÛ ÛÛ ³ ³ > v2.A4
³ÛÛÛÛÛÛÛÛÛÛ ³ÛÛ ÛÛ ³ ³ÛÛÛÛÛÛÛÛÛÛ ³ÛÛ ÛÛ ³ > v2.A4
³°° ÛÛ ³ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ³ÛÛ ÛÛ°°³ > v2.A4
³ÛÛ ÛÛ ³ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ³ÛÛ ÛÛ ³ > v2.A4
³ÛÛÛÛÛÛÛÛÛÛ ³ ÛÛÛÛÛÛÛÛÛÛ ³ ³ÛÛÛÛÛÛÛÛÛÛ ³ ÛÛÛÛÛÛÛÛÛÛ ³ > v2.A4
³ ³ ÛÛ ³ ³ ³ ÛÛ ³ > v2.A4
³ ³ ÛÛÛÛÛÛÛÛÛÛ ³ ³ ³ ÛÛÛÛÛÛÛÛÛÛ ³ > v2.A4
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ > v2.A4
Vertically Centered Vertically Centered > v2.A4
Left Justified Right Justified > v2.A4
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ > v2.A4
³ÛÛÛÛÛÛÛÛÛÛ ³ ³ ³ÛÛÛÛÛÛÛÛÛÛ ³ ³ > v2.A4
³ÛÛ ÛÛ ³ ³ ³ÛÛ ÛÛ ³ ³ > v2.A4
³ÛÛ ÛÛ ³ ³ ³ÛÛ ÛÛ ³ ³ > v2.A4
³ÛÛÛÛÛÛÛÛÛÛ ³ÛÛ ÛÛ ³ ³ÛÛÛÛÛÛÛÛÛÛ ³ÛÛ ÛÛ ³ > v2.A4
³ÛÛ ÛÛ ³ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ³ÛÛ ÛÛ ³ > v2.A4
³ÛÛ ÛÛ ³ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ³ÛÛ ÛÛ ³ > v2.A4
³°°ÛÛÛÛÛÛÛÛ ³ ÛÛÛÛÛÛÛÛÛÛ ³ ³ÛÛÛÛÛÛÛÛÛÛ ³ ÛÛÛÛÛÛÛÛÛÛ°°³ > v2.A4
³ ³ ÛÛ ³ ³ ³ ÛÛ ³ > v2.A4
³ ³ ÛÛÛÛÛÛÛÛÛÛ ³ ³ ³ ÛÛÛÛÛÛÛÛÛÛ ³ > v2.A4
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 129
Base Line Justified Base Line Justified > v2.A4
Left Justified Right Justified > v2.A4
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ > v2.A4
³ÛÛÛÛÛÛÛÛÛÛ ³ ³ ³ÛÛÛÛÛÛÛÛÛÛ ³ ³ > v2.A4
³ÛÛ ÛÛ ³ ³ ³ÛÛ ÛÛ ³ ³ > v2.A4
³ÛÛ ÛÛ ³ ³ ³ÛÛ ÛÛ ³ ³ > v2.A4
³ÛÛÛÛÛÛÛÛÛÛ ³ÛÛ ÛÛ ³ ³ÛÛÛÛÛÛÛÛÛÛ ³ÛÛ ÛÛ ³ > v2.A4
³ÛÛ ÛÛ ³ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ³ÛÛ ÛÛ ³ > v2.A4
³ÛÛ ÛÛ ³ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ³ÛÛ ÛÛ ³ > v2.A4
³ÛÛÛÛÛÛÛÛÛÛ ³ ÛÛÛÛÛÛÛÛÛÛ ³ ³ÛÛÛÛÛÛÛÛÛÛ ³ ÛÛÛÛÛÛÛÛÛÛ ³ > v2.A4
³ ³ ÛÛ ³ ³ ³ ÛÛ ³ > v2.A4
³°° ³ ÛÛÛÛÛÛÛÛÛÛ ³ ³ ³ ÛÛÛÛÛÛÛÛÛÛ°°³ > v2.A4
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ > v2.A4
Bottom Justified Bottom Justified > v2.A4
Left Justified Right Justified > v2.A4
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ > v2.A4
³ÛÛÛÛÛÛÛÛÛÛ °°³ ³ ³ÛÛÛÛÛÛÛÛÛÛ ³ ³ > v2.A4
³ÛÛ ÛÛ ³ ³ ³ÛÛ ÛÛ ³ ³ > v2.A4
³ÛÛ ÛÛ ³ ³ ³ÛÛ ÛÛ ³ ³ > v2.A4
³ÛÛÛÛÛÛÛÛÛÛ ³ÛÛ ÛÛ ³ ³ÛÛÛÛÛÛÛÛÛÛ ³ÛÛ ÛÛ ³ > v2.A4
³ÛÛ ÛÛ ³ÛÛ ÛÛ ³ ³ÛÛ ÛÛ°°³ÛÛ ÛÛ ³ > v2.A4
³ÛÛ ÛÛ ³ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ³ÛÛ ÛÛ ³ > v2.A4
³ÛÛÛÛÛÛÛÛÛÛ ³ ÛÛÛÛÛÛÛÛÛÛ ³ ³ÛÛÛÛÛÛÛÛÛÛ ³ ÛÛÛÛÛÛÛÛÛÛ ³ > v2.A4
³ ³ ÛÛ ³ ³ ³ ÛÛ ³ > v2.A4
³ ³ ÛÛÛÛÛÛÛÛÛÛ ³ ³ ³ ÛÛÛÛÛÛÛÛÛÛ ³ > v2.A4
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ > v2.A4
Top Justified Vertically Centered > v2.A4
Horizontally Centered Horizontally Centered > v2.A4
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ > v2.A4
³ÛÛÛÛÛÛÛÛÛÛ ³ ³ ³ÛÛÛÛÛÛÛÛÛÛ ³ ³ > v2.A4
³ÛÛ ÛÛ ³ ³ ³ÛÛ ÛÛ ³ ³ > v2.A4
³ÛÛ ÛÛ ³ ³ ³ÛÛ ÛÛ ³ ³ > v2.A4
³ÛÛÛÛÛÛÛÛÛÛ ³ÛÛ ÛÛ ³ ³ÛÛÛÛÛÛÛÛÛÛ ³ÛÛ ÛÛ ³ > v2.A4
³ÛÛ ÛÛ ³ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ³ÛÛ ÛÛ ³ > v2.A4
³ÛÛ ÛÛ ³ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ³ÛÛ ÛÛ ³ > v2.A4
³ÛÛÛÛÛÛÛÛÛÛ °°³ ÛÛÛÛÛÛÛÛÛÛ ³ ³ÛÛÛÛÛÛÛÛÛÛ ³ ÛÛÛÛÛÛÛÛÛÛ ³ > v2.A4
³ ³ ÛÛ ³ ³ ³ ÛÛ ³ > v2.A4
³ ³ ÛÛÛÛÛÛÛÛÛÛ ³ ³ °°³ ÛÛÛÛÛÛÛÛÛÛ ³ > v2.A4
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ > v2.A4
Base Line Justify Bottom Justification > v2.A4
Horizontally Centered Horizontally Centered > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 130
The significance of each justification can be thought of in the > v2.A4
following diagrams of vertical text: > v2.A4
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ > v2.A4
³ ³ ³ ³ ³°° ³ > v2.A4
³ ÛÛÛÛÛÛÛÛÛÛ ³ ³ ÛÛÛÛÛÛÛÛÛÛ ³ ³ ÛÛÛÛÛÛÛÛÛÛ ³ > v2.A4
³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ > v2.A4
³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ > v2.A4
³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ > v2.A4
³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ > v2.A4
³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ > v2.A4
³ ÛÛÛÛÛÛ ³ ³ ÛÛÛÛÛÛ ³ ³ ÛÛÛÛÛÛ ³ > v2.A4
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄŽ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄŽ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄŽ > v2.A4
³ ³ ³°° ³ ³ ³ > v2.A4
³ ÛÛÛÛ ÛÛÛÛ ³ ³ ÛÛÛÛ ÛÛÛÛ ³ ³ ÛÛÛÛ ÛÛÛÛ ³ > v2.A4
³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ > v2.A4
³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ > v2.A4
³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ > v2.A4
³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ > v2.A4
³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ > v2.A4
³°°ÛÛÛÛÛÛÛÛÛÛÛÛ ³ ³ÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ³ ³ÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ³ > v2.A4
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ > v2.A4
Left Justified Horizontally Centered Right Justified > v2.A4
Top Justified Top Justified Top Justified > v2.A4
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ > v2.A4
³ ³ ³ ³ ³ °° ³ > v2.A4
³ ÛÛÛÛÛÛÛÛÛÛ ³ ³ ÛÛÛÛÛÛÛÛÛÛ ³ ³ ÛÛÛÛÛÛÛÛÛÛ ³ > v2.A4
³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ > v2.A4
³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ > v2.A4
³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ > v2.A4
³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ > v2.A4
³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ > v2.A4
³ ÛÛÛÛÛÛ ³ ³ ÛÛÛÛÛÛ ³ ³ ÛÛÛÛÛÛ ³ > v2.A4
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄŽ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄŽ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄŽ > v2.A4
³ ³ ³ °° ³ ³ ³ > v2.A4
³ ÛÛÛÛ ÛÛÛÛ ³ ³ ÛÛÛÛ ÛÛÛÛ ³ ³ ÛÛÛÛ ÛÛÛÛ ³ > v2.A4
³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ > v2.A4
³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ > v2.A4
³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ > v2.A4
³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ > v2.A4
³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ > v2.A4
³ÛÛÛÛÛÛÛÛ°°ÛÛÛÛ ³ ³ÛÛÛÛÛÛÛÛÛÛÛÛ°° ³ ³ÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ³ > v2.A4
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ > v2.A4
Left Justified Horizontally Centered Right Justified > v2.A4
Vertically Centered Vertically Centered Vertically Centered > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 131
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ > v2.A4
³ ³ ³ ³ ³ °° ³ > v2.A4
³ ÛÛÛÛÛÛÛÛÛÛ ³ ³ ÛÛÛÛÛÛÛÛÛÛ ³ ³ ÛÛÛÛÛÛÛÛÛÛ ³ > v2.A4
³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ > v2.A4
³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ > v2.A4
³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ > v2.A4
³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ > v2.A4
³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ > v2.A4
³ ÛÛÛÛÛÛ ³ ³ ÛÛÛÛÛÛ ³ ³ ÛÛÛÛÛÛ ³ > v2.A4
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄŽ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄŽ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄŽ > v2.A4
³ ³ ³ °° ³ ³ ³ > v2.A4
³ ÛÛÛÛ ÛÛÛÛ ³ ³ ÛÛÛÛ ÛÛÛÛ ³ ³ ÛÛÛÛ ÛÛÛÛ ³ > v2.A4
³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ > v2.A4
³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ > v2.A4
³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ > v2.A4
³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ > v2.A4
³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ > v2.A4
³ÛÛÛÛÛÛÛÛÛÛÛÛ°° ³ ³ÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ³ ³ÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ³ > v2.A4
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ > v2.A4
Left Justified Horizontally Centered Right Justified > v2.A4
Base Line Justify Base Line Justify Base Line Justified > v2.A4
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ > v2.A4
³ ³ ³ ³ ³ °°³ > v2.A4
³ ÛÛÛÛÛÛÛÛÛÛ ³ ³ ÛÛÛÛÛÛÛÛÛÛ ³ ³ ÛÛÛÛÛÛÛÛÛÛ ³ > v2.A4
³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ > v2.A4
³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ > v2.A4
³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ > v2.A4
³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ > v2.A4
³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ ³ ÛÛ ÛÛ³ > v2.A4
³ ÛÛÛÛÛÛ ³ ³ ÛÛÛÛÛÛ ³ ³ ÛÛÛÛÛÛ ³ > v2.A4
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄŽ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄŽ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄŽ > v2.A4
³ ³ ³ °°³ ³ ³ > v2.A4
³ ÛÛÛÛ ÛÛÛÛ ³ ³ ÛÛÛÛ ÛÛÛÛ ³ ³ ÛÛÛÛ ÛÛÛÛ ³ > v2.A4
³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ > v2.A4
³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ > v2.A4
³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ > v2.A4
³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ > v2.A4
³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ ³ÛÛ ÛÛ ÛÛ ³ > v2.A4
³ÛÛÛÛÛÛÛÛÛÛÛÛÛÛ °°³ ³ÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ³ ³ÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ³ > v2.A4
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ > v2.A4
Left Justified Horizontally Centered Right Justified > v2.A4
Bottom Justified Bottom Justified Bottom Justified > v2.A4
Here is how a font would look if it had dropshadowing enabled. The > v2.A4
solid squares (Û) are the foreground text drawn with the color set by > v2.A4
the RIP_COLOR command, and the shaded squares (°) are the pixels > v2.A4
drawn with the background drawing color set by the RIP_BACK_COLOR > v2.A4
command. Note that for dropshadowed text, the dropshadow is drawn > v2.A4
first, then the foreground text is drawn after the dropshadow is > v2.A4
drawn. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 132
ÛÛÛÛÛÛÛÛÛÛ ÛÛÛÛ ÛÛÛÛ > v2.A4
ÛÛ°°°°°°°°ÛÛ ÛÛ °°ÛÛ °°ÛÛ > v2.A4
ÛÛ°° ÛÛ°° ÛÛ°° ÛÛ°° ÛÛ°° > v2.A4
ÛÛÛÛÛÛÛÛÛÛ °° ÛÛ°° ÛÛ°° ÛÛ°° > v2.A4
ÛÛ°°°°°°°°ÛÛ ÛÛ°° ÛÛ°° ÛÛ°° > v2.A4
ÛÛ°° ÛÛ°° ÛÛ°° ÛÛ°° ÛÛ°° > v2.A4
ÛÛÛÛÛÛÛÛÛÛ °° ÛÛÛÛÛÛÛÛÛÛÛÛÛÛ°° > v2.A4
°°°°°°°°°° °°°°°°°°°°°°°° > v2.A4
Horizontal text Vertical text > v2.A4
(with dropshadow) (with dropshadow) > v2.A4
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 - A are smooth scalable vector fonts.
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 133
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.23 þ RIP_GOTOXY ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Move text cursor to row & column in Text Window
Level: 0
Command: g
Arguments: x:2 y:2 > v2.A3
Format: !|g <x> <y>
Example: !|g0509
Uses Draw Color: NO
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO
Uses Font Style: NO
Uses Viewport: NO > v1.54
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
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, <Esc>[x;yH, except that the
coordinates of that ANSI command are 1-based and the coordinates of
this RIPscrip command are 0-based.
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 134
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.24 þ RIP_GROUP_BEGIN ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Start a grouping of RIPscrip commands > v2.A2
Level: 0 > v2.A2
Command: ( > v2.A2
Arguments: <none> > v2.A2
Format: !|( > v2.A2
Example: !|( > v2.A2
Uses Draw Color: NO > v2.A2
Uses Back Color: NO > v2.A2
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO > v2.A2
Uses Font Style: NO > v2.A2
Uses Viewport: NO > v2.A2
Uses Port: NO > v2.A3
Uses Base Math: N/A > v2.A2
This command has one special usage, that is to group blocks of > v2.A2
commands together into logical groupings. This has no functional use > v2.A2
to a terminal program, but to a paint program, it can be used to > v2.A2
perform block moves of commands from one area in a scene to another. > v2.A2
In order to accomodate this, a standardized method of doing group > v2.A2
definitions is being created. > v2.A2
To specify a command grouping, specify the commands like this: > v2.A2
!|( > v2.A2
... > v2.A2
... RIPscrip commands > v2.A2
... > v2.A2
!|) > v2.A2
When putting RIPscrip data files online on a host, you would > v2.A2
typically want to remove groupings for efficiency, although this is > v2.A2
not required. A terminal program should just ignore RIP_GROUP_BEGIN > v2.A2
and RIP_GROUP_END commands, at it has no conceivable use for the > v2.A3
information at this time. > v2.A3
Also note that a group may consist of several groups and commands. > v2.A2
In other words, groups may be nested inside of each other for the > v2.A2
purpose of bundling them together. > v2.A2
NOTE: Any currently active group definitions are "closed" when a > v2.A3
RIP_NO_MORE command is encountered in a paint program or > v2.A3
some kind of conversion utility that uses groups. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 135
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.25 þ RIP_GROUP_END ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: End a grouping of RIPscrip commands > v2.A2
Level: 0 > v2.A2
Command: ) > v2.A2
Arguments: <none> > v2.A2
Format: !|) > v2.A2
Example: !|) > v2.A2
Uses Draw Color: NO > v2.A2
Uses Back Color: NO > v2.A2
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO > v2.A2
Uses Font Style: NO > v2.A2
Uses Viewport: NO > v2.A2
Uses Port: NO > v2.A3
Uses Base Math: N/A > v2.A2
This command ends a group of RIPscrip commands. See RIP_GROUP_BEGIN > v2.A2
for a detailed explanation. > v2.A2
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 136
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.26 þ RIP_HEADER ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Header command for subsequent RIPscrip sequence > v2.A1
Level: 0 > v2.A1
Command: h > v2.A1
Arguments: revision:2 flags:4 res:2 > v2.A2
Format: !|h <flags> <revision> <res> > v2.A1
Example: !|h010A0100 > v2.A1
Uses Draw Color: NO > v2.A1
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO > v2.A1
Uses Font Style: NO > v2.A1
Uses Viewport: NO > v2.A1
Uses Port: YES > v2.A3
Uses Base Math: Ultranums only > v2.A2
This command was introduced in RIPscrip 2.0. It is specifically > v2.A1
designed with two purposes in mind. First, it is defined to > v2.A1
provide a consistent method for determining the revision of RIPscrip > v2.A1
that is to follow in subsequent RIPscrip code (up to a RIP_NO_MORE > v2.A3
command). Second, it provides a way of performing many different > v2.A3
kinds of reset operations (if any) in one command - much more > v2.A1
flexible than the older RIP_RESET_WINDOWS command. This command has > v2.A1
the ability to set many states and situations for subsequent RIPscrip > v2.A1
code (whether MegaNums are to be used, or UltraNums, what gets reset > v2.A1
and what doesn't, etc). > v2.A1
The <revision> code of this command defines the revision of RIPscrip > v2.A1
code that is to follow. The valid defined revisions are as follows: > v2.A1
ÉÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» > v2.A1
º Revision ³ Description º > v2.A1
ÌÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹ > v2.A1
º 00 ³ RIPscrip 1.54.00 code º > v2.A1
º 01 ³ RIPscrip 2.00.00 code º > v2.A1
ÈÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ > v2.A1
The real heart of this command is the <flags> parameter. This field > v2.A1
defines all of the attributes of the header command other then the > v2.A1
revision field. The possible values which may be combined in this > v2.A1
parameter (OR'ed together) are as follows: > v2.A1
Value Description > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ > v2.A1
0 Do nothing > v2.A1
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A1
1 Use MegaNums for subsequent RIPscrip code > v2.A1
2 * Use UltraNums for subsequent RIPscrip code > v2.A1
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A1
4 * Auto-set world coordinate frame > v2.A1
8 Set world frame to 640x350 (backward compatible mode) > v2.A1
NOTE: This flag should be used in revision "00" code. > v2.A3
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A1
16 Perform a hard reset - this resets everything. This > v2.A1
includes clearing all data backup area, even if entries > v2.A3
are protected. The entry is protected, then cleared. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 137
32 * This performs a soft reset. The screen is cleared, > v2.A1
all viewports are reset and viewport slot 0 is made > v2.A1
full screen, text windows are deleted and text > v2.A1
window 0 is made full screen. All resident queries > v2.A1
are deleted, graphical style slots are erased as are > v2.A1
the button style slots. This is identical in nature > v2.A1
to the RIP_RESET_WINDOWS. > v2.A1
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A1
64 Clears port data table > v2.A3
128 Clears resident queries only > v2.A1
256 Clears mouse/button definitions only > v2.A1
512 Clears all data save slots and resets stack pointers > v2.A3
1024 Clears all base save areas > v2.A1
2048 Clears and stops any playing sound/music > v2.A1
4096 Clears the screen to background color (usually black) > v2.A1
8192 Resets all viewports of all drawing ports to the full > v2.A3
size of their respective ports (no erasing performed). > v2.A3
16384 Clears all text window data table entries and makes > v2.A1
entry 0 full screen in default text (no window > v2.A3
clearing performed) > v2.A3
32768 Clears all graphical style data table entries > v2.A3
65536 Clears all button style data table entries > v2.A3
131072 Resets all palette data table entries to defaults > v2.A3
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A1
262144 All existing viewports are erased. If combined with > v2.A1
flag 8192, then this is done first, then flag 8192 is > v2.A1
executed. > v2.A1
524288 All existing text windows are erased. If combined > v2.A1
with flag 16384, then this is done first, then flag > v2.A1
16384 is executed. > v2.A1
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A1
1048576 * Disables all mouse/keyboard input (discards) until a > v2.A1
RIP_NO_MORE command is encountered thus signifying the > v2.A1
end of a RIPscrip sequence. This prevents the user > v2.A1
from accidentally interrupting the data stream with > v2.A1
keyboard activity. The mouse cursor should be changed > v2.A1
to something like an hourglass or disabled entirely. > v2.A1
If no RIP_NO_MORE is found and no RIPscrip or raw text > v2.A1
data is being received, then a RIP_NO_MORE should be > v2.A1
assumed after some suitable timeout (up to the > v2.A1
developer's discretion). > v2.A1
NOTE: Items marked with a `*' are recommended defaults. > v2.A2
As you can see, the <flags> parameter allows you to reset only > v2.A1
segments of things that you want to reset giving you considerable > v2.A1
flexibility in starting off RIPscrip scenes. > v2.A1
Most of the flag options are fairly self-explanatory. Some mention > v2.A1
should be made to several of them. Note that the flags described > v2.A1
above are grouped into logically related flag groups. Flags 1 and 2 > v2.A1
are mutually exlusive meaning only "1" or "2" may be used, but not > v2.A1
both. Choosing either flag 1 or 2 resets coordinate sizes to 2 > v2.A1
bytes. > v2.A1
Flag 4 requires some explanation. Auto-setting the world coordinate > v2.A1
frame (WCF) will auto-set the world coordinate frame to a set of > v2.A1
high-resolution world coordinates. The exact choices of coordinates > v2.A1
chosen depend on whether you specified UltraNums or MegaNums. If you > v2.A1
specify flag 4, then you must specify either flag 1 or flag 2 to > v2.A1
determine which base math to use. MegaNums set the width of the > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 138
world coordinate frame to 1280, and the WCF height to 960. > v2.A4
This provides for a square world frame pixels. If UltraNums are > v2.A1
used, then the width of the world frame is set to 4096 and the height > v2.A1
is set to 3072. Again, this provides for square world frame pixels. > v2.A1
If you physically need a larger world frame then you either need to > v2.A1
alter the base math setting explicitly or alter the X/Y coordinate > v2.A1
parameter size (see the next few commands). > v2.A1
Most video displays have a 4:3 width to height pixel ratio. For > v2.A2
example, 640x480 is 4:3, 1024x768 is 4:3, etc. Note that 1280x1024 > v2.A2
is NOT a 4:3 ratio (the 4:3 ratio for 1280 would be 1280x960.) > v2.A2
The Hard Reset option (flag 16) will perform a complete reset of the > v2.A1
RIPscrip environment. This is equivalent to choosing flags 64 > v2.A1
through 131072. In effect, this clears everything including > v2.A1
data save slots and the base save areas. > v2.A1
The Soft Reset option (flag 32) will perform a reset that is > v2.A1
identical in nature to the RIP_RESET_WINDOWS reset. This is > v2.A1
equivalent to choosing flags 1, 8, 64, 128, and 2048 through 131072. > v2.A1
This doesn't delete any data save slots or base save areas, doesn't > v2.A1
intentionally affect the world frame except that it sets it to > v2.A1
640x350, and chooses MegaNums as the numbers of choice. > v2.A1
NOTE: This command ALWAYS sets the mouse cursor back to the default > v2.A2
arrow pointer unless the "disable mouse input" flag is used > v2.A3
whereas the mouse will be temporarily changed to an hourglass > v2.A3
or disabled entirely until a RIP_NO_MORE. After this, then > v2.A3
the pointer will be reset back to an arrow. See > v2.A3
RIP_SET_MOUSE_CURSOR for details. > v2.A2
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 139
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.27 þ RIP_HOME ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Move cursor to upper-left corner of Text Window
Level: 0
Command: H
Arguments: <none>
Format: !|H
Example: !|H
Uses Draw Color: NO
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO
Uses Font Style: NO
Uses Viewport: NO > v1.54
Uses Port: NO > v2.A3
Uses Base Math: N/A > v2.A2
This command positions the text cursor to the upper-left corner in
the TTY Text Window, if it is active. This is equivalent to the ANSI > v2.A3
command "ESC[1;1H". > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 140
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.28 þ RIP_LINE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Draw a line in the current color/line style
Level: 0
Command: L
Arguments: x0:XY y0:XY x1:XY y1:XY > v2.A2
Format: !|L <x0> <y0> <x1> <y1>
Example: !|L00010A0E
Uses Draw Color: YES
Uses Back Color: YES > v2.A1
Uses Line Style: YES > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: YES
Uses Font Style: NO
Uses Viewport: YES > v1.54
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
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.
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 141
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.29 þ RIP_LINE_STYLE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Defines a line's pattern and thickness
Level: 0
Command: =
Arguments: off_draw:1 style:1 user_pat:4 thick:2 > v2.A3
Format: !|= <off_draw> <style> <user_pat> <thick> > v2.A3
Example: !|=01000001
Uses Draw Color: NO
Uses Back Color: NO > v2.A1
Uses Line Style: YES > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO
Uses Font Style: NO
Uses Viewport: NO > v1.54
Uses Port: NO > v2.A3
Uses Base Math: Current setting > v2.A2
This command establishes the current line pattern and thickness for
many subsequent graphics primitive commands. There are four built-in
line styles plus provisions for custom line patterns.
Style Description Binary Hex > v1.54
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v1.54
0 Normal, Solid Line 1111111111111111 FFFF > v1.54
1 Dotted Line 0011001100110011 3333 > v1.54
2 Centered Line 0001111000111111 1E3F > v1.54
3 Dashed Line 0001111100011111 1F1F > v1.54
4 Custom Defined line (see about <user_pat> below)
If the <style> is set to a value of 4 (custom pattern), then the
<user_pat> parameter is used as a 16-bit representation of the pixels
in the line pattern. For example:
Repeating Pattern Binary Coding Hex Decimal MegaNum
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
- - - - - - - - 1010101010101010 AAAA 43690 0XPM
---- ---- 1111000011110000 F0F0 61680 1BLC
So, the most-significant-bit of <user_pat> is toward the starting
point of the line or border that uses this fill pattern. If the
<style> parameter is not 4, then the <user_pat> parameter is ignored.
In RIPscrip v2.0, the off spaces of a patterned line can now be > v2.A3
something other than transparent (as in 1.x RIPscrip format). If > v2.A1
the <off_draw> parameter is set to a non-zero value, then the current > v2.A3
pen background color is used to draw the off pixels of a patterned > v2.A3
line. The values of the <off_draw> field are as follows: > v2.A3
Value Description > v2.A1
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A1
0 Draw off pixels as transparent pixels > v2.A3
1 Draw off pixels using pen background color > v2.A3
In earlier verions of RIPscrip (v1.54 and earlier), only two > v2.A1
different line thickness options were allowed (1 pixel wide and 3 > v2.A1
pixels wide). In 2.00 and later revisions, arbitrary thicknesses of > v2.A1
lines are supported from 1 pixel on up. If the thickness is an even > v2.A1
number than it is up to the destination system's graphics engine to > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 142
determine whether the even pixel is drawn to the left or right of the > v2.A1
center point in vertical orientations, or above/below for horizontal > v2.A1
orientations. In any event, the thickness value of lines is > v2.A1
specified by the <thick> parameter. > v2.A1
When a RIP_RESET_WINDOWS or a RIP_HEADER command is executed that > v2.A3
resets the environment, the current line style is set to a single > v2.A3
pixel wide solid line. Off pixels are set to transparent mode. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 143
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.30 þ RIP_MOVE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Move the current drawing position to (X,Y)
Level: 0
Command: m
Arguments: x:XY y:XY > v2.A2
Format: !|m <x> <y>
Example: !|m0509
Uses Draw Color: NO
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO
Uses Font Style: NO
Uses Viewport: YES > v1.54
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
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.
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 144
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.31 þ RIP_NO_MORE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: End of RIPscrip Scene
Level: 0
Command: #
Arguments: <none>
Format: !|#
Example: !|#
Uses Draw Color: NO
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO
Uses Font Style: NO
Uses Viewport: NO > v1.54
Uses Port: NO > v2.A3
Uses Base Math: N/A > v2.A2
This command indicates that RIPscrip commands are complete. This
allows the terminal program to activate Mouse Regions, or respond to
queued up Mouse Clicks without disturbing the natural flow of the
script transmission.
For noise-immunity, the Host should transmit three or more
RIP_NO_MORE command consecutively to make sure the message gets to
the terminal. The terminal should also time-out if no data is
received for a while, and assume RIP_NO_MORE.
The actual duration of the "time-out" is entirely up to the > v1.54
implementor of their terminal program. A good recommended setting > v1.54
would be at least an entire second or more after the receipt of the > v1.54
last RIPscrip command. Raw ASCII/ANSI text does not contribute to > v1.54
the time-out in any way. Only an actual RIPscrip command could > v1.54
cause the time-out counter to be reset (thus starting the time-out > v1.54
countdown all over again). Timing-out is not a pre-requisite to > v1.54
supporting RIPscrip. It is a highly desirable feature to do this, > v1.54
but it is not required. > v1.54
This command also re-activates user input previously disabled with > v2.A1
a RIP_HEADER command. This is useful to prevent the user from > v2.A1
clicking on buttons before the scene is completely drawn. See the > v2.A1
RIP_HEADER command for more details on this mode of operation. > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 145
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.32 þ RIP_ONE_DRAWING_PALETTE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Set Drawing Palette entries to RGB colors > v2.A0
Level: 0 > v2.A0
Command: d > v2.A0
Arguments: entry:2 bits:1 rgb_color:4 > v2.A3
Format: !|d <entry> <bits> <rgb_color> > v2.A0
Example: !|d018qR3P > v2.A2
Uses Draw Color: YES > v2.A0
Uses Back Color: YES > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO > v2.A0
Uses Font Style: NO > v2.A0
Uses Viewport: NO > v2.A0
Uses Port: NO > v2.A3
Uses Base Math: Current setting > v2.A2
This command will set a single entry in the Drawing Palette to an > v2.A0
arbitrary RGB color. This allows you to customize the Drawing > v2.A0
Palette with extended color information beyond what you can normally > v2.A3
do with the Desktop Palette. This command is more flexible in nature > v2.A0
in that it allows you to access colors between 0-255 and gives you > v2.A0
the added flexibility to store more than 2 bits of RGB data - thus > v2.A3
allowing you to select colors out of a much larger master palette. > v2.A3
The <entry> parameter specifies which Color Palette Entry number will > v2.A0
be set with the RGB color data. > v2.A0
NOTE: The four-digit color parameters are not MegaNums - they are > v2.A0
always ULTRA-NUMS regardless of the setting of the global > v2.A0
base-math value! With four digits at base-64 math, you can > v2.A0
achieve 24-bits of precision in one four-digit number. > v2.A0
If you break-down the four-digit UltraNum color values into their > v2.A0
binary equivalents (three bytes), the MSB would contain the Red > v2.A0
component, the LSB would contain the Blue component and the byte in > v2.A0
between contains the Green component. This command allows you to > v2.A0
specify a number of <bits> for each component. Under no > v2.A0
circumstances are <bit> values above 8 allowed, since this would > v2.A3
overflow a four-digit UltraNum parameter (beyond 24 bits). > v2.A0
Color Entry number zero (0) is the screen's background color. It is > v2.A0
normally set to RGB color 0/0/0, or Black. Changing this color will > v2.A0
alter the background color of the entire screen/environment, so great > v2.A0
care should be taken if you alter color number 0. > v2.A0
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 146
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.33 þ RIP_ONE_PALETTE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Set RGB color of 16-color Desktop Palette > v2.A3
Level: 0
Command: a
Arguments: color:2 value:2
Format: !|a <color> <value>
Example: !|a051B
Uses Draw Color: YES
Uses Back Color: YES > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO
Uses Font Style: NO
Uses Viewport: NO > v1.54
Uses Port: NO > v2.A3
Uses Base Math: Current setting > v2.A2
This command changes one color in the 16-color Desktop Palette. The
color number is sent along with the new color value from the Master
Color Palette. The color <value> 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 <color> number will be changed instantly to the new
color value (providing the terminal is running in palette mode). You > v2.A3
may obtain color cycling effects by using this command. The default
RIP palette is restored when by the RIP_RESET_WINDOWS command.
See the RIP_COLOR command for an exact description of the RGB values > v2.A3
used in this command. > v2.A1
Color 00 of the 16-color RIP palette is always the background color
(which is typically Black).
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 147
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.34 þ RIP_OVAL ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Draw elliptical arc in current color/line style
Level: 0
Command: O
Arguments: x:XY y:XY st_ang:2 end_ang:2 x_rad:XY y_rad:XY > v2.A2
Format: !|O <x> <y> <st_ang> <end_ang> <x_rad> <y_rad>
Example: !|O1E1A18003G15 > v2.A2
Uses Draw Color: YES
Uses Back Color: YES > v2.A1
Uses Line Style: YES > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: YES > v2.A1
Uses Font Style: NO
Uses Viewport: YES > v1.54
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
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 <st_ang> and proceeding counterclockwise to <end_ang>
(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.
NOTE: This command is identical to the RIP_OVAL_ARC due to > v2.A3
historical reasons. See RIP_OVAL_ARC for a discussion > v2.A3
of the starting angle and the ending angle parameters of > v2.A3
this command. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 148
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.35 þ RIP_OVAL_ARC ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Draw an elliptical arc
Level: 0
Command: V
Arguments: x:XY y:XY st_ang:2 e_ang:2 radx:XY rady:XY > v2.A2
Format: !|V <x> <y> <st_ang> <e_ang> <radx> <rady>
Example: !|V1E18003G151Q
Uses Draw Color: YES
Uses Back Color: YES > v2.A1
Uses Line Style: YES > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: YES > v2.A1
Uses Font Style: NO
Uses Viewport: YES > v1.54
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
This command draws an elliptical arc, or a segment of an ellipse.
Drawing begins at <st_ang> and terminates at <e_ang>. The angles are
represented starting at zero for 3 o'clock position and increasing
counterclockwise through a full ellipse at 360 degrees:
90ø
³
180øÄÄÄÄÅÄÄÄÄ0ø
³
270ø
The arc drawing begins at the <st_ang> and continues counterclockwise
to the <e_ang>. A complete ellipse will be displayed if <st_ang>=0
and <e_ang>=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.
Both angles can be greater than 360 degrees. The starting angle > v2.A3
must be greater or equal to the ending angle. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 149
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.36 þ RIP_OVAL_PIE_SLICE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Draws an elliptical pie slice
Level: 0
Command: i
Arguments: x:XY y:XY st_ang:2 e_ang:2 radx:XY rady:XY > v2.A2
Format: !|i <x> <y> <st_ang> <e_ang> <radx> <rady>
Example: !|i1E18003G151Q
Uses Draw Color: YES
Uses Back Color: YES > v2.A1
Uses Line Style: YES > v2.A2
Uses Fill Style: YES > v2.A2
Uses Write Mode: YES > v2.A1
Uses Font Style: NO
Uses Viewport: YES > v1.54
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
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.
Both angles can be greater than 360 degrees. The starting angle > v2.A3
must be greater or equal to the ending angle. > v2.A3
When borders are disabled, this command adheres to the resolution > v2.A3
independent method of filling regions. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 150
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.37 þ RIP_PIE_SLICE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Draws a circular pie slice
Level: 0
Command: I
Arguments: x:XY y:XY start_ang:2 end_ang:2 radius:XY > v2.A2
Format: !|I <x> <y> <start_ang> <end_ang> <radius>
Example: !|I1E18003G15
Uses Draw Color: YES
Uses Back Color: YES > v2.A1
Uses Line Style: YES > v2.A2
Uses Fill Style: YES > v2.A2
Uses Write Mode: YES > v2.A1
Uses Font Style: NO
Uses Viewport: YES > v1.54
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
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.
Both angles can be greater than 360 degrees. The starting angle > v2.A3
must be greater or equal to the ending angle. > v2.A3
The radius is considered to be in the horizontal direction for the > v2.A3
purpose of aspect ratio calculations. > v2.A3
When borders are disabled, this command adheres to the resolution > v2.A3
independent method of filling regions. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 151
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.38 þ RIP_PIXEL ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Draws one pixel using current drawing color
Level: 0
Command: X
Arguments: x:XY y:XY > v2.A2
Format: !|X <x> <y>
Example: !|X1122
Uses Draw Color: YES
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: YES > v2.A1
Uses Font Style: NO
Uses Viewport: YES > v1.54
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
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 heavy use of it.
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 152
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.39 þ RIP_POLYGON ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Draw polygon in current color/line-style
Level: 0
Command: P
Arguments: npoints:2 x1:XY y1:XY ... xn:XY yn:XY > v2.A2
Format: !|P <npoints> <x1> <y1> ... <xn> <yn>
Example: !|P03010105090905
Uses Draw Color: YES
Uses Back Color: YES > v2.A1
Uses Line Style: YES > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: YES
Uses Font Style: NO
Uses Viewport: YES > v1.54
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
This command will draw a multi-sided closed polygon. The polygon is
drawn using the current drawing color, line pattern, thickness and > v2.A3
raster operation (write mode). The <npoints> parameter is between > v2.A3
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.
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 153
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.40 þ RIP_POLYLINE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Draw a Poly-Line (multi-faceted line) > v1.54
Level: 0 > v1.54
Command: l > v1.54
Arguments: npoints:2 x1:XY y1:XY ... xn:XY yn:XY > v2.A2
Format: !|l <npoints> <x1> <y1> ... <xn> <yn> > v1.54
Example: !|l03010105090905 > v1.54
Uses Draw Color: YES > v1.54
Uses Back Color: YES > v2.A1
Uses Line Style: YES > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: YES > v1.54
Uses Font Style: NO > v1.54
Uses Viewport: YES > v1.54
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
This command will draw a multi-faceted line. It is identical in > v1.54
nature to the RIP_POLYGON command above, except that the last point > v1.54
is NOT connected to the first point. Generally speaking, a Poly- > v1.54
Line is not an "enclosed area". The segments of the Poly-Line are > v2.A3
drawn using the current drawing color, line pattern, thickness and > v2.A3
Drawing Write Mode. > v1.54
The <npoints> parameter is between 2 and 512 and indicates how many > v1.54
(x,y) coordinate pairs will follow, which is also the number of sides > v1.54
of the Poly-Line. > v1.54
An example of a five sided (6 vertices) Poly-Line might be: > v1.54
P1 o o P6 > v1.54
ßÜ o P4 Üß > v1.54
ßÜ ÜßÛ Üß > v1.54
ßÜ Üß Û Üß > v1.54
ßÜ Üß Û Üß > v1.54
ßÜ Üß Û Üß > v1.54
ßoÜÜÜÜÜÜoß Û Üß > v1.54
P2 P3 Û Üß > v1.54
P5ÛÜß > v1.54
o > v1.54
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 154
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.41 þ RIP_POLY_BEZIER ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Draw a poly-bezier curve (multi-segmented) > v2.A1
Level: 0 > v2.A1
Command: z > v2.A1
Arguments: num:2 count:2 x_base:XY y_base:XY ... > v2.A2
type:1 x1:XY y1:XY ... > v2.A2
type:1 x1:XY y1:XY x2:XY y2:XY x3:XY y3:XY ... > v2.A2
Format: !|z <num> <count> <x_base> <y_base> ... > v2.A1
<type> <x1> <y1> ... > v2.A2
<type> <x1> <y1> <x2> <y2> <x3> <y3> ... > v2.A2
Example: See below > v2.A2
Uses Draw Color: YES > v2.A1
Uses Back Color: YES > v2.A1
Uses Line Style: YES > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: YES > v2.A1
Uses Font Style: NO > v2.A1
Uses Viewport: YES > v2.A1
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
This command is a variation on the RIP_BEZIER command. The typical > v2.A1
RIP_BEZIER command creates one single bezier curve. This command > v2.A1
combines one or more bezier curves into a chain of connected bezier > v2.A1
curves. Each segment (curve) of the poly-bezier can be of different > v2.A1
types. It can be a bezier curve, or a simple straight line. The > v2.A1
combination of these facilities allows the construction of say, a > v2.A1
text character representation of a font that has some straight line > v2.A3
segments and some curved segments. The curved portions (bezier > v2.A1
curves) are actually comprised of many smaller straight line > v2.A1
segments - when viewed on a monitor, they appear to be a continuous > v2.A1
curve. The actual number of segments comprising a particular curve > v2.A1
in the poly-bezier is determined by the command's <count> parameter. > v2.A1
This command is different than any other in RIPscrip in that its > v2.A1
variable length portion of the command is made up of different blocks > v2.A1
of parameters which can be different byte lengths! If you look at > v2.A1
the definition, the beginning of the command includes a <num>, > v2.A1
<count>, <x_base> and <y_base> parameter - the remainder of the > v2.A3
command is variable length in nature. > v2.A3
The <num> parameter defines how many parameter blocks are to be > v2.A2
expected in this command. > v2.A2
The <count> parameter defines how many "segments" are to be drawn for > v2.A2
each bezier curve segment of this poly-bezier curve. This means that > v2.A2
all bezier curve segments in a poly-bezier will have the same number > v2.A2
of segments for their respective curves. > v2.A2
The <x_base> and <y_base> parameters define the pixel beginning point > v2.A2
for the entire poly-bezier "curve". To determine what type of > v2.A2
parameter block follows, you need to look at the first byte of the > v2.A2
segment; this is the <type> parameter. > v2.A3
The <type> parameter defines what type of parameter block is to be > v2.A1
parsed. The possible types are: > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 155
Type Description > v2.A1
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A1
0 Straight line segment > v2.A1
1 Smooth bezier curve segment > v2.A2
2 Jointed bezier curve segment > v2.A2
A "smooth" segment is a bezier curve whose beginning curve is > v2.A2
totally smooth with the ending curve of a previous bezier curve. > v2.A1
In practice on a terminal system, this doesn't mean anything to a > v2.A1
terminal program because it is going to display a bezier curve as a > v2.A1
normal bezier curve. The meaning of having a second bezier curve > v2.A1
type comes into play when using paint program utilities that let you > v2.A1
manipulate poly-bezier curves. A paint system might use this > v2.A1
information to control how end-points and control points can be moved > v2.A1
because they are "locked" with one or two points from the previous > v2.A1
(or next) bezier curve. See the notes at the end of this command's > v2.A1
description about smooth bezier curve joints. > v2.A1
If the <type> parameter indicates that the segment is a straight-line > v2.A1
segment, then there are only two remaining parameters (not including > v2.A1
the <type> parameter) in the block (the line's end-points) as in the > v2.A1
following syntax definition: > v2.A1
type:1 x1:XY y1:XY > v2.A2
The <type> parameter should be set to "0" for line segments. The > v2.A2
(x1,y1) parameters define the endpoints of the line segment. The > v2.A1
beginning point of the line is the end-point of the last segment (or > v2.A1
the (x_base,y_base) parameters of the command header if this is the > v2.A1
first parameter block). > v2.A1
If the <type> indicates that the segment is a bezier curve, then the > v2.A1
parameter block contains six parameters as in the following syntax > v2.A1
definition (not including the <type> parameter): > v2.A1
type:1 x1:XY y1:XY x2:XY y2:XY x3:XY y3:XY > v2.A1
The first byte is the <type> value for this block (be set to 1 or 2 > v2.A2
for a bezier curve segment). The remaining six parameters define the > v2.A1
first two control points and the end-point for the bezier curve > v2.A1
segment. The beginning point of the curve segment is defined as the > v2.A1
end-point of the previous block (or the (x_base,y_base) parameter in > v2.A1
the header of the command if this is the first parameter block). > v2.A1
Refer to the RIP_BEZIER command for a complete description of bezier > v2.A1
curve beginning/end-points and how control points shape the curve to > v2.A1
a desired result. > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 156
An example of a poly-bezier curve might be shown as follows: > v2.A2
Segment 1 ÄÄÄÄÄÄÄÄÄÄÄÄ¿ P2 > v2.A2
(line) P1  (50,10) P3 (110,10) > v2.A2
(10,10) þ±±±±þ±± X > v2.A2
± ± ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Segment 2 > v2.A2
± ±ÄÙ (bezier) > v2.A2
± ± > v2.A2
± ± X P4 (110,70) > v2.A2
Segment 0 ÄÄÄÄı ±± > v2.A2
(line) ± P5 þ±±± > v2.A2
±(50,70) ± X P6 (120,70) > v2.A2
± ±ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Segment 3 > v2.A2
± ± (bezier) > v2.A2
±(50,130) ± > v2.A2
BASE ± P8 ± P7 (120,130) > v2.A2
POINT ÄÄÄÄþ±±±±þ±±± X > v2.A2
P0/P9  > v2.A2
(10,130) ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Segment 4 > v2.A2
(line) > v2.A2
The above diagram shows 5 different segments to the poly-bezier > v2.A1
curve. Segments 0, 1 and 4 are straight line segments, and semgents > v2.A1
2 and 3 are actual bezier curves. All X/Y points (beginning-points, > v2.A1
end-points and control-points are depicted with X's and are labeled > v2.A1
P0 through P9. The parameters to represent this command might > v2.A1
appear something like the following (in expanded decimal): > v2.A1
Decimal MegaNum Description > v2.A2
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A2
!|z 05 ........ 05 ........ 5 segments > v2.A2
10 ........ 0A ........ 10 lines per bezier curve > v2.A2
10,130 .. 0A 3M ... Base point - P0 > v2.A2
0 ......... 0 ......... Segment 0 - Line > v2.A2
10,10 ... 0A 0A ... Line endpoint - P1 > v2.A2
0 ......... 0 ......... Segment 1 - Line > v2.A2
50,10 ... 1E 0A ... Line endpoint - P2 > v2.A2
1 ......... 1 ......... Segment 2 - Smooth Bezier > v2.A2
110,10 .. 32 0A ... Control point - P3 > v2.A2
110,70 .. 32 1Y ... Control point - P4 > v2.A2
50,70 ... 1E 1Y ... Curve end point - P5 > v2.A2
2 ......... 2 ......... Segment 3 - Jointed Bezier > v2.A2
120,70 .. 3C 1Y ... Control point - P6 > v2.A2
120,130 . 3C 3M ... Control point - P7 > v2.A2
50,130 .. 1E 3M ... Curve end point - P8 > v2.A2
0 ......... 0 ......... Segment 4 - Line > v2.A2
10,130 .. 0A 3M ... Line endpoint - P9 > v2.A2
Notice that in the preceding example we are not expressing numbers in > v2.A1
meganums as would normally be used in RIPscrip files. This is for > v2.A1
simple human readability for this example. > v2.A1
The completed command looks like this (base math setting = meganums): > v2.A2
!|z050A0A3M00A0A01E0A1320A321Y1E1Y23C1Y3C3M1E3M00A3M > v2.A2
This command is often used to combine several segments together > v2.A1
into one larger "curve". As previously mentioned, the end-point of > v2.A1
one segment is the beginning point of the next segment (if any). > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 157
When you are dealing with bezier curve segments, it is possible to > v2.A1
make sure that the end of one curve has a perfectly smooth curve with > v2.A1
the beginning of the next curve. If two adjacent bezier curve blocks > v2.A1
are to have a perfectly smooth "connecting joint", then you must make > v2.A1
sure that the last control point and the end-point of the first curve > v2.A1
are colinear with the first control point of the second curve. This > v2.A1
is not a requirement of this command - it is generic in that it can > v2.A1
display any combination of line segments and bezier curve segments. > v2.A1
We are simply noting this mathematical attribute of bezier curves for > v2.A1
the benefit of the RIPscrip programmer to generate smooth segmented > v2.A1
curves in some sort of paint program. > v2.A1
A bezier curve can also have a "smooth joint" with a line segment. If > v2.A1
the bezier curve is followed by a line segment, then to make sure > v2.A1
that the joint has a smooth curve, you must make sure that the last > v2.A1
control point and the end point of the bezier curve segment are > v2.A1
colinear with the end-point of the following line segment. The same > v2.A1
holds true of the segments are reversed (line segment followed by a > v2.A1
bezier curve segment) - the only difference is that the beginning > v2.A1
point of a line segment is determined by the end-point of its > v2.A1
preceding block (or the base point if the line segment is the first > v2.A1
parameter block) and you would be making the starting point of the > v2.A1
bezier curve and the 1ST control point colinear. > v2.A1
NOTE: Poly-Bezier curves might exhibit pixel annomolies at the > v2.A1
beginning and ending points of each segment if thick lines are used > v2.A1
for the curve with XOR or other non-COPY write modes. The reason for > v2.A1
this is because some graphics engines (Windows, Macintosh, MS-DOS, > v2.A1
etc) might not handle things 100.0% perfectly for thick poly-lines in > v2.A1
XOR mode (poly-lines are used to represent this command after all > v2.A1
segments are broken down). > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 158
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.42 þ RIP_POLY_BEZIER_LINE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Draw a poly-bezier curve (open-ended) > v2.A2
Level: 0 > v2.A2
Command: t > v2.A2
Arguments: num:2 count:2 x_base:XY y_base:XY ... > v2.A2
type:1 x1:XY y1:XY ... > v2.A2
type:1 x1:XY y1:XY x2:XY y2:XY x3:XY y3:XY ... > v2.A2
Format: !|z <num> <count> <x_base> <y_base> ... > v2.A2
<type> <x1> <y1> ... > v2.A2
<type> <x1> <y1> <x2> <y2> <x3> <y3> ... > v2.A2
Example: See below > v2.A2
Uses Draw Color: YES > v2.A2
Uses Back Color: YES > v2.A2
Uses Line Style: YES > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: YES > v2.A2
Uses Font Style: NO > v2.A2
Uses Viewport: YES > v2.A2
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
This command is a variation on the RIP_POLY_BEZIER command. The > v2.A2
difference is that the RIP_POLY_BEZIER command is a closed object, > v2.A2
meaning that the beginning and ending points are connected. With > v2.A2
RIP_POLY_BEZIER_LINE, the object does not have it's end points > v2.A2
connected. This is just like the difference between RIP_POLYGON and > v2.A2
RIP_POLYLINE. > v2.A2
This command uses the same parameter order as RIP_POLY_BEZIER. > v2.A2
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 159
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.43 þ RIP_RECTANGLE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Draw a rectangle in current color/line style
Level: 0
Command: R
Arguments: x0:XY y0:XY x1:XY y1:XY > v2.A2
Format: !|R <x0> <y0> <x1> <y1>
Example: !|R00010A0E
Uses Draw Color: YES
Uses Back Color: YES > v2.A1
Uses Line Style: YES > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: YES
Uses Font Style: NO
Uses Viewport: YES > v1.54
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
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.
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 160
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.44 þ RIP_RESET_WINDOWS ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Clear Graphic/Text Windows & reset to full screen
Level: 0
Command: *
Arguments: <none>
Format: !|*
Example: !|*
Uses Draw Color: NO
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO
Uses Font Style: NO
Uses Viewport: NO > v1.54
Uses Port: YES > v2.A3
Uses Base Math: N/A > v2.A2
A system might use this function before entering a text-only mode
that does not support RIP commands.
This command will:
þ Set the World Coordinate Frame to 640x350 (backwards compat.) > v2.A1
þ Set the Text Window to a full screen > v2.A2
þ Set the Text Window to the user-selected default of the > v2.A2
five Text Window fonts (80x43, 91x43, 80x25, 91x25, and 40x25) > v2.A2
and place the text cursor in the upper left corner. > v2.A2
þ Restore the default RIP color palette (see RIP_SET_PALETTE and > v2.A2
RIP_SET_DRAWING_PALETTE below). > v2.A2
þ Clear the entire screen to the current background color > v2.A2
(which is black because the color palette was just reset!) > v2.A2
þ Delete all Mouse Fields and Mouse Buttons > v2.A2
þ Delete ports #1-35 (unprotected) - port #0 is made full screen > v2.A2
þ Reset all graphical style data tables and Text Window data > v2.A0
tables to suitable defaults. > v2.A3
þ All "active data table entries" are set to entry #0 > v2.A3
current slots are set to slot #0. > v2.A0
þ Reset all button style data tables > v2.A1
þ Set the mouse cursor back to the default arrow pointer. > v2.A2
See RIP_SET_MOUSE_CURSOR for details. > v2.A2
þ Set the current Base Math to Base-36 (meganums). > v2.A0
þ Set the coordinate size to 2 byte MegaNums > v2.A1
þ Set the color palette to map mode (not Direct RGB encoding). > v2.A1
NOTE: The data backup areas are not cleared by this command. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 161
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.45 þ RIP_ROUNDED_RECT ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Draw a rectangle with rounded corners > v2.A3
Level: 0 > v2.A3
Command: U > v2.A3
Arguments: x0:XY y0:XY x1:XY y1:XY rad:2 > v2.A3
Example: !|U00010A0E09 > v2.A3
Uses Draw Color: YES > v2.A3
Uses Back Color: YES > v2.A3
Uses Line Style: YES > v2.A3
Uses Fill Style: NO > v2.A3
Uses Write Mode: YES > v2.A3
Uses Font Style: NO > v2.A3
Uses Viewport: YES > v2.A3
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A3
This command draws a rounded corner rectangle. The corners of the > v2.A3
rectangle are not drawn at right angles like normal rectangles. The > v2.A3
rounded rectangle has circular arcs drawn at all four corners of the > v2.A3
drawn object. The radius of the arc that is used to fill-in the > v2.A3
corners is specified in the <rad> parameter. The <x0,y0> and <x1,y1> > v2.A3
parameters define the upper left and lower right corners of the > v2.A3
rectangle as if the corners were actually specified as a normal > v2.A3
rectangle. The circular arcs drawn in the corners of the rounded > v2.A3
rectangle are truly circular in nature and adhere to aspect ratios > v2.A3
relating to the actual video configuration of the destination > v2.A3
application program. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 162
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.46 þ RIP_SET_BASE_MATH ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Sets the base math for most RIPscrip parameters > v2.A0
Level: 0 > v2.A0
Command: b > v2.A0
Arguments: base_math:2 > v2.A0
Format: !|b <base_math> > v2.A0
Example: !|b1S > v2.A2
Uses Draw Color: NO > v2.A0
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO > v2.A0
Uses Font Style: NO > v2.A0
Uses Viewport: NO > v2.A0
Uses Port: NO > v2.A3
Uses Base Math: MegaNums only > v2.A2
This command sets the Base Math used extensively throughout the > v2.A0
RIPscrip language. By default, the RIPscrip language used Base-36 > v2.A0
math for all of its numeric parameters. This number can be changed > v2.A0
to accomodate larger values for numeric parameters. For example, a > v2.A0
two digit base-36 number can hold a number from 0-1295. A two digit > v2.A3
Base-64 number can hold a number from 0-4095 which is considerably > v2.A0
larger. > v2.A0
This can be used when you set the World Coordinate Frame to larger > v2.A0
coordinates, even larger than 1024x1024. Altering the Base Math of > v2.A0
the parameters gives you the ability to handle larger numbers without > v2.A0
expanding the size (byte-wise) of parameters throughout the language > v2.A0
(see RIP_SET_COORDINATE_SIZE). > v2.A3
NOTE: This command ALWAYS uses base-36 (MegaNum) math for > v2.A0
its parameter. The reason for this is that this is a > v2.A0
universal command, and the Base Math may not be known > v2.A0
at the moment the command is received. > v2.A0
When a RIP_RESET_WINDOWS command is received, the base math is reset > v2.A0
to Base-36 (MegaNum) values. If a scene is received after the Reset > v2.A0
Windows command and it uses Base Math other than Base-36, then you > v2.A0
MUST send a RIP_SET_BASE_MATH command immediately after the > v2.A0
RIP_RESET_WINDOWS command. > v2.A0
The valid settings at this time are: > v2.A0
Base-36 ("10" meganum) > v2.A0
Base-64 ("1S" meganum) > v2.A0
If an illegal Set Base Math command is received (an illegal base math > v2.A0
setting), RIPscrip will default to MegaNums. > v2.A0
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 163
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.47 þ RIP_SET_BORDER ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Enable or disable borders on filled objects > v2.A3
Level: 0 > v2.A3
Command: N > v2.A3
Arguments: borders:2 > v2.A3
Format: !|N <borders> > v2.A3
Example: !|N01 > v2.A3
Uses Draw Color: NO > v2.A3
Uses Back Color: NO > v2.A3
Uses Line Style: NO > v2.A3
Uses Fill Style: NO > v2.A3
Uses Write Mode: NO > v2.A3
Uses Font Style: NO > v2.A3
Uses Viewport: NO > v2.A3
Uses Port: NO > v2.A3
Uses Base Math: Current Setting > v2.A3
This command specifies whether borders are drawn with filled objects > v2.A3
(eg, RIP_FILLED_RECTANGLE, etc). This command does not affect the > v2.A3
command RIP_BAR. When borders are enabled, the following commands > v2.A3
will draw a border around the filled region: > v2.A3
RIP_FILLED_RECTANGLE > v2.A3
RIP_FILLED_CIRCLE > v2.A3
RIP_FILLED_OVAL > v2.A3
RIP_PIE_SLICE > v2.A3
RIP_OVAL_PIE_SLICE > v2.A3
RIP_FILLED_POLYGON > v2.A3
RIP_FILLED_POLY_BEZIER > v2.A3
RIP_FILLED_ROUNDED_RECT > v2.A3
Borders drawn around the filled regions are always drawn in the write > v2.A3
mode COPY (this is to avoid strange pixel interactions in XOR, OR, > v2.A3
AND and NOT modes when they interact with the filled-pixels behind > v2.A3
them. The borders are drawn using the current line thickness. The > v2.A3
polygon related command also adheres to line patterns; all other > v2.A3
commands only use the line thickness. The filled regions are > v2.A3
initially drawn using the resolution independent methods of filling. > v2.A3
After that, the border is drawn based on standard methodologies. > v2.A3
For more details, see the section entitled "THE MATHEMATICS OF > v2.A3
GRAPHICS AND COORDINATES" for a more detailed explanation of these > v2.A3
issues. > v2.A3
Setting the <border> parameter to "01" enables borders around filled > v2.A3
objects. A value of "00" indicates that borders are disabled. > v2.A3
When a RIP_RESET_WINDOWS or a RIP_HEADER command is executed (where > v2.A3
the environment is reset), borders are automatically enabled for > v2.A3
backwards compatibility. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 164
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.48 þ RIP_SET_COLOR_MODE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Set the Color Drawing Mode (MAP or DIRECT RGB) > v2.A0
Level: 0 > v2.A0
Command: M > v2.A0
Arguments: mode:1 bits:1 > v2.A0
Format: !|M <mode> <bits> > v2.A0
Example: !|M18 > v2.A0
Uses Draw Color: NO > v2.A0
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO > v2.A0
Uses Font Style: NO > v2.A0
Uses Viewport: NO > v2.A0
Uses Port: NO > v2.A3
Uses Base Math: Current setting > v2.A2
This command determines whether Color Mapping mode is in use, or if > v2.A0
Direct RGB Colors are being used for color codes. See the beginning > v2.A0
of this specification for a detailed explanation of the differences > v2.A0
between these modes. > v2.A0
The <mode> parameter may take on the following values: > v2.A0
Mode Description > v2.A0
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A0
0 Color Mapping mode (default) > v2.A2
1 Direct RGB Color mode > v2.A0
The <bits> parameter is used to determine how many bits are to be > v2.A0
parsed in the Direct RGB Color mode. This parameter is ignored if > v2.A0
the Color Mapping Mode is in effect. > v2.A0
When in Direct RGB Color Mode, any Color Code parameter in the > v2.A0
RIPscrip language that doesn't explicitly state that it uses only > v2.A0
Color Map Mode will process a color value as a raw RGB value encoded > v2.A0
in the same fashion as the RIP_SET_DRAWING_PALETTE command. These > v2.A0
parameters, when in Direct RGB Color Mode, will be in ULTRA-NUM > v2.A3
format regardless of the global Base Math settings for compression. > v2.A1
Color palette mode though uses the current base math settings for > v2.A1
these color parameters. > v2.A1
In Color Mapping Mode, these color parameters will typically not be > v2.A0
the lengthy four-digit sequence used in Direct RGB Color Mode. When > v2.A0
in Color Mapping Mode, the color parameters used throughout RIPscrip > v2.A0
will obey the global Base Math setting - it's only in Direct RGB > v2.A0
Color Mode where UltraNums are forced ON for these parameters. > v2.A0
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 165
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.49 þ RIP_SET_COORDINATE_SIZE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Sets the number of bytes used for XY coordinates > v2.A1
Level: 0 > v2.A1
Command: n > v2.A1
Arguments: byte_size:1 res:3 > v2.A1
Format: !|n <byte_size> <res> > v2.A1
Example: !|n2000 > v2.A1
Uses Draw Color: NO > v2.A1
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO > v2.A1
Uses Font Style: NO > v2.A1
Uses Viewport: NO > v2.A1
Uses Port: NO > v2.A3
Uses Base Math: Current setting > v2.A2
This command alters the number of bytes that will be expected for all > v2.A1
subsequent X or Y parameters in RIPscrip. By default, all X or Y > v2.A1
parameters are two bytes in length as denoted syntax-wise as x:XY or > v2.A1
y:XY in the specification. This command allows you to alter this > v2.A1
size. In 1.x versions of RIPscrip, the maximum size of a parameter > v2.A1
was in the X direction and the maximum value was 639. This could > v2.A1
safely be represented in two meganum digits. In 2.0 of RIPscrip and > v2.A1
beyond, we introduce a world coordinate system into the specification > v2.A1
which allows you to use a much higher resolution for your drawing > v2.A1
environment. This facilitates resolution independence. To provide > v2.A1
for future expandability when ultra-high resolution devices might > v2.A1
exist, the possibility of an X or Y coordinate exceeding 4095 might > v2.A1
occur. Since this is the largest value that can be accomodated in a > v2.A1
2-byte UltraNum, we offer an option that provides for extensibility. > v2.A3
Using this parameter to expand the byte size beyond 2 will make a > v2.A1
RIPscrip file bigger. This is because every X/Y coordinate will be > v2.A1
expanded in size by a certain number of bytes, and since these are > v2.A1
the fundamental values in any graphical environment, it will result > v2.A1
in larger RIPscrip files. In practice, this command should be used > v2.A1
with caution. When situations permit, do not use this command, or > v2.A1
use it with a byte size of 2 (the default). This will keep files > v2.A1
from ever getting larger than they would be by default. > v2.A1
Valid settings are from 2-5. If any other values are specified, > v2.A3
then a value of 2 will be assumed. > v2.A3
A RIP_RESET_WINDOWS command will reset the coordinate size back to > v2.A1
two byte wide parameters. > v2.A1
NOTE: The <res> parameter is reserved and should be set to "000" > v2.A1
for future expansion by TeleGrafix. > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 166
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.50 þ RIP_SET_DRAWING_PALETTE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Set Drawing Palette entries to RGB colors > v2.A0
Level: 0 > v2.A0
Command: D > v2.A0
Arguments: num:2 start:2 bits:1 c1:4 ... cn:4 > v2.A3
Format: !|D <num> <bits> <start> <c1> ... <cn> > v2.A2
Example: !|D030180GhZPzr3aZr3 > v2.A2
Uses Draw Color: YES > v2.A0
Uses Back Color: YES > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO > v2.A0
Uses Font Style: NO > v2.A0
Uses Viewport: NO > v2.A0
Uses Port: NO > v2.A3
Uses Base Math: Current setting > v2.A2
This command will set one or more colors in the 256-entry Drawing > v2.A0
Palette to arbitrary RGB color mappings. This allows you to > v2.A0
customize the Drawing Palette with extended color information beyond > v2.A0
what you can normally do with the Desktop Palette. This command is > v2.A3
more flexible in nature in that it allows you to access colors > v2.A0
between 0-255 and gives you the added flexibility to store more than > v2.A0
2 bits of red, green and blue information thus allowing you to select > v2.A3
colors out of a much larger master palette. > v2.A3
The <num> parameter specifies how many color entries are contained in > v2.A0
this given Palette command. This is used in determining how many > v2.A0
bytes long the command should be. > v2.A0
NOTE: The four-digit color parameters are not meganums - they are > v2.A0
always ULTRANUMS regardless of the setting of the global > v2.A0
base-math value! With four digits at base-64 math, you can > v2.A0
achieve 24-bits of precision in one four-digit number. > v2.A0
If you break-down the four-digit UltraNum color values into their > v2.A0
binary equivalents (three bytes), the MSB would contain the Red > v2.A0
component, the LSB would contain the Blue component and the byte in > v2.A0
between contains the Green component. The <bits> parameter lets you > v2.A3
specify the number of bits for each component. Under no circumstances > v2.A0
are <bit> values above 8 allowed, since this would overflow a > v2.A3
four-digit UltraNum parameter (beyond 24 bits). > v2.A0
The <start> parameter determines the starting Color Palette Entry > v2.A0
number that the first color in the command will be assigned to. > v2.A0
Every following parameter will correspond to the next highest Color > v2.A0
Palette Entry number. > v2.A0
Color Entry number zero (0) is the screen's background color. It is > v2.A0
normally set to RGB color 0/0/0, or Black. Changing this color will > v2.A0
alter the background color of the entire screen/environment, so great > v2.A0
care should be taken if you alter color number 0. > v2.A0
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 167
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.51 þ RIP_SET_PALETTE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Set 16-color Desktop Palette from 64-clr palette > v2.A0
Level: 0
Command: Q
Arguments: c1:2 c2:2 ... c16:2
Format: !|Q <c1> <c2> ... <c16>
Example: !|Q000102030405060708090A0B0C0D0E0F
Uses Draw Color: YES
Uses Back Color: YES > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO
Uses Font Style: NO
Uses Viewport: NO > v1.54
Uses Port: NO > v2.A3
Uses Base Math: Current setting > v2.A2
This command modifies the 16-color Desktop 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
(providing the terminal is running in palette mode). You may obtain > v2.A3
color cycling effects by using this command. The default 16-color
RIP palette is restored by the RIP_RESET_WINDOWS command.
See the RIP_COLOR command for an exact description of the RGB valus > v2.A3
used in this command. > v2.A3
Color 00 of the 16-color RIP palette is always the screen's > v2.A3
background color (which is typically Black).
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 168
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.52 þ RIP_SET_WORLD_FRAME ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Sets the coordinates for the World Frame > v2.A0
Level: 0 > v2.A0
Command: f > v2.A2
Arguments: x_dim:XY y_dim:XY > v2.A2
Format: !|f <x_dim> <y_dim> > v2.A0
Example: !|fSGSG > v2.A0
Uses Draw Color: NO > v2.A0
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO > v2.A0
Uses Font Style: NO > v2.A0
Uses Viewport: NO > v2.A0
Uses Port: NO > v2.A3
Uses Base Math: Current setting > v2.A2
This command sets the dimensions of the World Coordinate Frame. This > v2.A0
Frame is the Global Coordinate Space of the RIPscrip drawing screen. > v2.A0
It is not the exact size of the Device Frame - that is a lower level > v2.A0
coordinate system. With this frame, you can "map" your scenes into > v2.A0
something, say a 1024x1024 grid and let the terminal worry about > v2.A0
mapping it into whatever device coordinates it is using (eg, 640x350, > v2.A0
800x600, etc). Any coordinates used for setting viewports or other > v2.A0
such things will be specified in World Frame Coordinates. Actual > v2.A0
drawing primitives will use the current Drawing Frame's coordinates - > v2.A0
another level of coordinate mapping. This allows you to do things > v2.A0
like draw full screen images inside a tinier window, leaving > v2.A0
additional drawing space on the screen for other images. > v2.A0
The actual Device Coordinate Frame is not specified in the RIPscrip > v2.A0
language anywhere - it is handled entirely by the remote terminal, > v2.A0
because only it knows the device coordinates of the environment that > v2.A0
it is running under (although the host can query these values from > v2.A3
the terminal). > v2.A3
The <x_dim> parameter is how wide the drawing area is in logical > v2.A0
coordinates. The <y_dim> parameter is how tall the drawing area is > v2.A0
in logical coordinates. > v2.A0
To translate from World Coordinates to Device Coordinates, you need > v2.A0
to know four things: > v2.A0
1/2) The World Frame's dimensions (ie, x_dim and y_dim) > v2.A0
3/4) The dimensions of the actual display device (x_max, y_max) > v2.A0
After you have these four values, you can translate any X/Y > v2.A0
coordinate pair in World Coordinates to Device Coordinates with the > v2.A0
following equations: > v2.A0
EQUATION 1 - TRANSLATE WORLD TO DEVICE COORDINATES > v2.A0
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A0
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» > v2.A0
º Xw * x_max ³ Yw * y_max º > v2.A0
º Xd = ÄÄÄÄÄÄÄÄÄÄ ³ Yd = ÄÄÄÄÄÄÄÄÄÄ º > v2.A0
º x_dim ³ y_dim º > v2.A0
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ > v2.A0
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 169
Where (Xw,Yw) is a point in World Coordinates. We are solving for > v2.A0
the point (Xd,Yd) which is in Device Coordinates. The values > v2.A0
x_max and y_max are the physical dimensions of the display device > v2.A0
(eg, x_max=640, y_max=350). The values x_dim and y_dim are the > v2.A0
dimensions of the World Coordinate Frame (eg, x_dim=1000, > v2.A0
y_dim=1000). > v2.A0
As an example, let's say we are drawing onto a 640x350 display device > v2.A0
and our World Coordinate Frame is 1000x1000 logical pixels in size. > v2.A0
If we plot a pixel at coordinates right in the middle of the screen > v2.A0
at (500,500), here is what we would have: > v2.A0
500 * 640 320,000 > v2.A0
Xd = ÄÄÄÄÄÄÄÄÄ = ÄÄÄÄÄÄÄ = 320 > v2.A0
1000 1000 > v2.A0
500 * 350 175,000 > v2.A0
Yd = ÄÄÄÄÄÄÄÄÄ = ÄÄÄÄÄÄÄ = 175 > v2.A0
1000 1000 > v2.A0
This gives us a final Device coordinate of (320,175) which is smack > v2.A0
in the middle of the device screen as we wanted. > v2.A0
If we solve the above equations for Xw and Yw, we get the inverse > v2.A0
equations - translations from Device Coordinates to World > v2.A0
Coordinates: > v2.A0
EQUATION 2 - TRANSLATE DEVICE TO WORLD COORDINATES > v2.A0
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A0
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» > v2.A0
º Xd * x_dim ³ Yd * y_dim º > v2.A0
º Xw = ÄÄÄÄÄÄÄÄÄÄ ³ Yw = ÄÄÄÄÄÄÄÄÄÄ º > v2.A0
º x_max ³ y_max º > v2.A0
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ > v2.A0
If the World Coordinates are larger than the Device Coordinates, then > v2.A0
when you translate World Coordinates to Device Coordinates, there > v2.A0
will be pixel-perfect translation. This means that translation will > v2.A0
be unambiguous - they will convert to pixel coordinates without there > v2.A0
being any discrepency. For example, if your Device Coordinates are > v2.A0
640x350 and your World Coordinates are 1280x700, then a Point in > v2.A0
World Coordinate space at (0,0) and (1,0) will both translate to the > v2.A0
Device Coordinates (0,0) and (0,0) respectively. This is because the > v2.A0
World Coordinate space is twice as large as the Device Coordinate > v2.A0
space. If on the other hand the Device Coordinates were 1280x700 and > v2.A0
the World Coordinate space were 640x350, then the World Points (0,0) > v2.A0
and (1,0) would translate to (0,0) and (2,0) respectively. Notice > v2.A0
that in the World Coordinates, the pixels were adjacent. But in the > v2.A0
Device Coordinates, they are separated by a one pixel gap. > v2.A0
In summary, World Coordinates should always be equal to or greather > v2.A0
than the size of the Device Coordinate Frame, otherwise disparity > v2.A0
will exist in the translations. Since coordinate translation will > v2.A0
almost ALWAYS be from World -> Device coordinates, everything will be > v2.A0
fine if the World Frame has a larger resolution than the Device > v2.A0
Frame. The same holds true for the inverse equations to translate > v2.A0
from Device to World coordinates. If the World Coordinate Frame is > v2.A0
larger than the Device Coordinate Frame, then any point that is > v2.A0
translated from Device -> World Coordinates (a Mouse X/Y location for > v2.A0
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 170
example), might not translate over precisely - skipping over pixel > v2.A0
spaces in the World Frame - this is simply because of the precision > v2.A0
of translation and cannot be overcome mathematically since a Mouse > v2.A0
Pointer's location is pixel based - it doesn't have any finer > v2.A0
locations than on pixel boundary locations (there's no such thing as > v2.A0
a fractional pixel location in graphics hardware - only > v2.A0
mathematically). > v2.A0
To maintain backward compatibility with previous versions of the > v2.A0
RIPscrip specification, after a RIP_RESET_WINDOWS command is > v2.A0
received, the World Coordinate Frame is defined as having the > v2.A0
dimensions 640x350 until reset by a RIP_SET_WORLD_FRAME or RIP_HEADER > v2.A0
command. > v2.A0
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 171
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.53 þ RIP_TEXT ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Draw text in current font at current XY location > v2.A3
Level: 0
Command: T
Arguments: text-string
Format: !|T <text-string>
Example: !|Thello world
Uses Draw Color: YES
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: YES
Uses Font Style: YES
Uses Viewport: YES > v1.54
Uses Port: YES > v2.A3
Uses Base Math: N/A > v2.A2
This command displays text at the current location in the graphics
window, as set with the RIP_MOVE command, or immediately after > v2.A3
horizontal text drawn with RIP_TEXT_XY or a previous RIP_TEXT > v2.A3
command. Only horizontal text updates the current graphical cursor > v2.A3
position used with the RIP_TEXT related commands. Any form of screen > v2.A3
reset (RIP_RESET or RIP_HEADER with reset options) will reset this > v2.A3
current position to (0,0). A RIP_ERASE_VIEWPORT command does not > v2.A3
reset this position. > v2.A3
The text is also affected by the most recent settings of these
commands:
Command Description of Command
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
RIP_FONT_STYLE font style (vector font, direction, size)
RIP_WRITE_MODE drawing mode (normal or XOR)
RIP_COLOR drawing color (from the 16-color palette)
RIP_EXTENDED_FONT_STYLE extended font styles (True Type style) > v2.A3
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
(even after subsequent graphical operations like circles, rectangles, > v2.A3
lines, etc). > v2.A3
IMPORTANT NOTE: Note that this "current graphics cursor location" > v2.A4
is only updated for horizontal text moving from > v2.A4
left-to-right in "left justified" mode. Any other > v2.A4
orientation does not reset the location! > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 172
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.54 þ RIP_TEXT_WINDOW ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Define the size and location of the Text Window
Level: 0
Command: w
Arguments: x0:XY y0:XY x1:XY y1:XY wrap:1 size:1 > v2.A2
Format: !|w <x0> <y0> <x1> <y1> <wrap> <size>
Example: !|w00001B0M10
Uses Draw Color: NO
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO
Uses Font Style: NO
Uses Viewport: NO > v1.54
Uses Port: NO > v2.A3
Uses Base Math: Current setting > v2.A2
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 deactivated, ignoring all non-RIPscrip bytes, > v2.A4
by setting all RIP_TEXT_WINDOW parameters to zero (0). The X > v2.A4
and Y parameters' ranges vary depending on the setting of the <size>
parameter which governs the font size used for the output text. Valid
settings for the <size> parameter and the ranges for X/Y values are
as follows:
Size Font Size (*) X Range Y Range Columns Rows > v2.A3
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A3
0 8x8 0-79 0-42 80 43 > v2.A3
1 7x8 0-90 0-42 91 43 > v2.A3
2 8x14 0-79 0-24 80 25 > v2.A3
3 7x14 0-90 0-24 91 25 > v2.A3
4 16x14 0-39 0-24 40 25 > v2.A3
(*) Font sizes are based on a 640x350 device resolution > v2.A3
The font sizes in the preceding table vary depending on the > v2.A3
resolution that the terminal software is running under. The actual > v2.A3
cell sizes of each font are calculated based on the number of rows > v2.A3
and columns required. For example, at a resolution of 800x600, the > v2.A3
cell sizes are calculated by dividing the horizontal resolution by > v2.A3
the number of columns (800/80) which yields a cell width of 10. > v2.A3
By doing the same thing for the same height we get 600/43 which > v2.A3
equals 13.95348837. You obviously cannot have a fractional cell size > v2.A3
so we round down. This gives us a cell height of 13. This gives a > v2.A3
vertical region of 559 scan lines of text information yielding 41 > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 173
extra scan lines that don't get used. This method can be used to > v2.A3
determine the cell sizes for any arbitrary resolution. > v2.A3
Now that we know what the font cell sizes are, or more acurately, > v2.A3
how to calculate them, we need to establish a standardized way to > v2.A3
determine screen placement for text characters. RIPscrip 1.54 was > v2.A3
based on 640x350 resolution and text placement was very > v2.A3
straightforward. If the text window was to be defined using font > v2.A3
#2 (8x14 under 640x350) and was to be from (10,15) to (20,25) in > v2.A3
text coordinates, then our actual upper-left corner of the text > v2.A3
window would be located at pixel (10x8,15x14) or (80,210). Now > v2.A3
that we have the upper-left corner of the text window, calculating > v2.A3
an arbitrary row/column in the text window is simple based on the > v2.A3
cell size. > v2.A3
Under resolutions other than 640x350, we need to take very special > v2.A3
care to make the text characters appear as close to the 640x350 > v2.A3
counterparts as possible. In order to calculate the text window's > v2.A3
orientation as closely as possible in other resolutions, calculate > v2.A3
the upper-left corner of the text window at 640x350 coordinates > v2.A3
and scale those coordinates up to the actual resolution used on the > v2.A3
terminal. This will insure that the text window is located as > v2.A3
closely to the 640x350 counterpart as possible. As previously > v2.A3
described, the font cell sizes can leave some "slop space" due to > v2.A3
fractional columns/rows. This means that you cannot be pixel-for- > v2.A3
pixel accurate with text window placement at varying resolutions. > v2.A3
In this matter, the RIP_TEXT_WINDOW command is not truly resolution > v2.A3
independent (see RIP_EXTENDED_TEXT_WINDOW for a truly resolution > v2.A4
independent way of creating text windows). > v2.A3
The <wrap> parameter applies to the horizontal dimension. If <wrap> > v2.A3
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 <wrap> is 0, then any text going beyond
the right margin is truncated and no scrolling is performed; the
cursor remains at the right margin.
When a text window is defined, its coordinates are relative to the > v2.A0
actual screen, not the current graphical Viewport or the Device > v2.A3
Coordinate Frame. > v2.A0
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 <wrap> parameter. For the current
and new text windows to be considered identical, the
parameters <x0>, <y0>, <x1>, <y1> and <size> must be the same.
NOTE: A text window definition command is ignored if the current > v2.A4
text window data table entry is protected! > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 174
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.55 þ RIP_TEXT_XY ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Draw text in current font/color at specific spot
Level: 0
Command: @
Arguments: x:XY y:XY and text-string > v2.A2
Format: !|@ <x> <y> <text-string>
Example: !|@0011hello world
Uses Draw Color: YES
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: YES
Uses Font Style: YES
Uses Viewport: YES > v1.54
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
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 that 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.
See the RIP_TEXT command for a more thorough discussion of this > v2.A3
subject. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 175
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.56 þ RIP_VIEWPORT ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Define the size & location of the Graphics Window
Level: 0
Command: v
Arguments: x0:XY y0:XY x1:XY y1:XY > v2.A2
Format: !|v <x0> <y0> <x1> <y1>
Example: !|v00002E1M
Uses Draw Color: NO
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO
Uses Font Style: NO
Uses Viewport: NO > v1.54
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
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 current TTY window defined > v2.A3
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 deactivated, so RIPscrip > v2.A4
graphics commands are ignored, by setting all parameters to zero (0).
The viewport is physically bound to the current drawing port. In > v2.A3
other words when this command is executed, it will modify the > v2.A3
viewport for the current drawing port. This in effect, modifies the > v2.A3
clipping rectangle for that port. If any of the viewport coordinates > v2.A3
would extend beyond the boundaries of the drawing port, they will be > v2.A3
adjusted to fit inside the port. > v2.A3
Graphics displayed in the viewport are "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 that specify the boundary of the Graphics Viewport are > v2.A0
specified in World Coordinates. The interior area of the Viewport is > v2.A0
then considered the Drawing Frame. The Drawing Coordinate frame are > v2.A0
set to the same size/dimension as the World Coordinate Frame area > v2.A0
that the viewport inhabits. For example, if you define a viewport > v2.A0
from (100,100) to (299,299) in World Coordinates, then your Drawing > v2.A0
Frame will be a drawing area with a resolution of 200x200 logical > v2.A0
drawing pixels. In other words, when you set a viewport, you > v2.A0
immediately have a 1:1 mapping of logical drawing pixels to World > v2.A0
Coordinate Pixels. If you wish to change the X/Y Drawing Frame > v2.A0
resolution to some other value, use the RIP_SET_DRAWING_FRAME command > v2.A0
after setting the viewport. If you draw anything before executing > v2.A0
this command, then the privimitives will be drawing things in the > v2.A0
current Drawing Frame's coordinates (a sub-set of the World > v2.A0
Coordinates). The Drawing Frame's coordinates do not take on another > v2.A0
mapping until you actually set them with a RIP_SET_DRAWING_FRAME > v2.A0
command. > v2.A0
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 176
To re-activate a viewport that was previously deactivated, either > v2.A4
send a correctly configured RIP_SET_VIEWPORT command, or issue a > v2.A4
query command with a $AVP$ text variable (Activate ViewPort). > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 177
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.1.57 þ RIP_WRITE_MODE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Set drawing mode for graphics primitives
Level: 0
Command: W
Arguments: mode:2
Format: !|W <mode>
Example: !|W00
Uses Draw Color: NO
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: YES
Uses Font Style: NO
Uses Viewport: NO > v1.54
Uses Port: NO > v2.A3
Uses Base Math: Current setting > v2.A2
This command sets the current drawing mode for most of the graphics
primitives:
Mode Description Logical
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
00 Normal drawing mode (overwrite) (COPY)
01 Exclusive-OR drawing mode (XOR)
02 Logical OR drawing mode (OR) > v2.A1
03 Logical AND drawing mode (AND) > v2.A1
04 Inverse drawing mode (NOT) > v2.A1
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 merged with the destination pixel using > v2.A1
the logical operation XOR. This is a bitwise manipulation of the > v2.A1
destination and source pixel values. In a monochrome environment, > v2.A1
the following bit combinations would yield the following: > v2.A1
ÉÍÍÍÑÍÍÍËÍÍÍÍÍÍÍÍÍ»
º A ³ B º A XOR B º > v2.A1
ÌÍÍÍØÍÍÍÎÍÍÍÍÍÍÍÍ͹ > v2.A1
º 0 ³ 0 º 0 º > v2.A1
º 0 ³ 1 º 1 º > v2.A1
º 1 ³ 0 º 1 º > v2.A1
º 1 ³ 1 º 0 º > v2.A1
ÈÍÍÍÏÍÍÍÊÍÍÍÍÍÍÍÍÍŒ
In the OR mode, instead of changing each pixel to the current drawing > v2.A1
color, the pixel is merged with the destination pixel using the > v2.A1
logical operation OR. The bits in the source pixel are OR'ed with > v2.A1
the bits in the destination pixel to achieve the final result. In a > v2.A1
monochrome environment, the following bit combinations would yield > v2.A1
the following: > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 178
ÉÍÍÍÑÍÍÍÍËÍÍÍÍÍÍÍÍ»
º A ³ B º A OR B º > v2.A1
ÌÍÍÍØÍÍÍÍÎÍÍÍÍÍÍÍ͹ > v2.A1
º 0 ³ 0 º 0 º > v2.A1
º 0 ³ 1 º 1 º > v2.A1
º 1 ³ 0 º 1 º > v2.A1
º 1 ³ 1 º 1 º > v2.A1
ÈÍÍÍÏÍÍÍÍÊÍÍÍÍÍÍÍÍŒ
In the AND mode, instead of changing each pixel to the current > v2.A1
drawing color, the pixel is merged with the destination pixel using > v2.A1
the logical operation AND. The bits in the source pixel are AND'ed > v2.A1
with the bits in the destination pixel to achieve the final result. > v2.A1
In a monochrome environment, the following bit combinations would > v2.A1
yield the following: > v2.A1
ÉÍÍÍÑÍÍÍÍËÍÍÍÍÍÍÍÍÍ»
º A ³ B º A AND B º > v2.A1
ÌÍÍÍØÍÍÍÍÎÍÍÍÍÍÍÍÍ͹ > v2.A1
º 0 ³ 0 º 0 º > v2.A1
º 0 ³ 1 º 0 º > v2.A1
º 1 ³ 0 º 0 º > v2.A1
º 1 ³ 1 º 1 º > v2.A1
ÈÍÍÍÏÍÍÍÍÊÍÍÍÍÍÍÍÍÍŒ
In the NOT mode, the color of the source pixel is completely ignored. > v2.A1
The bits in the destination pixel's color are inverted (0's become > v2.A1
1's and 1's become 0's). In other words, black becomes white, light > v2.A1
gray becomes dark gray, etc (this is assuming that the color palette > v2.A3
is a 16 color palette with default settings - 256 color palettes may > v2.A3
react differently depending on the colors defined. > v2.A3
This command affects all line drawing operations (line, rectangle, > v2.A1
circle, oval, pie slice, pixel, etc). It also affects any fill-based > v2.A1
operations (filled bar, internal parts of a pie slice, filled circle, > v2.A1
etc). It only affects level-0 drawing primitives. It also affects > v2.A1
fonts that are drawn to the screen (including the default font). > v2.A1
The effects of OR, AND, XOR and NOT can cause distinctly different > v2.A3
resultant colors in 16 color modes as compared to 256 color modes. > v2.A3
For example, if you have a color of 7 (0111 binary) in a 16 color > v2.A3
mode, and you NOT that color, you get 8 (1000 binary). Under a > v2.A3
standard 16 color palette, color 7 is light gray and color 8 is dark > v2.A3
gray. Under a 256 color palette though, color 7 (00000111 binary) > v2.A3
will convert to 248 (11111000 binary). This color is definitely not > v2.A3
dark gray - it is by default, an RGB of (63,54,0) which is a shade of > v2.A3
brownish yellow. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 179
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 3.4.2 þ LEVEL-1 RIPscrip COMMANDS º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
Level-1 commands are basic user-interface commands, and higher level > v2.A4
graphical constructs like images, formatted text regions, and other > v2.A4
such higher level concepts that aren't covered in the level-0 command > v2.A4
set.
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 180
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.2.1 þ RIP_BEGIN_TEXT ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Define a rectangular text region
Level: 1
Command: T
Arguments: x1:XY y1:XY x2:XY y2:XY res:2 > v2.A2
Format: !|1T <x1> <y1> <x2> <y2> <res>
Example: !|1T00110011
Uses Draw Color: NO
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO
Uses Font Style: NO
Uses Viewport: YES > v1.54
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
This command defines a rectangular portion of the graphics viewport
that is to display text, usually a long stream of text. Following
this command should be a number of RIP_REGION_TEXT commands with the
text to be displayed. The RIP_END_TEXT terminates this stream of
text, something like this:
RIP_BEGIN_TEXT
RIP_REGION_TEXT
RIP_REGION_TEXT
RIP_REGION_TEXT
:
RIP_REGION_TEXT
RIP_END_TEXT
There must be at least one RIP_REGION_TEXT command in between the
header and the footer. There may be as many as needed.
These commands ignore the current font "direction"; all text is
always displayed horizontally in the current font type, style and > v2.A3
size. > v2.A3
NOTE: The "res" parameter is two bytes wide and is RESERVED for
future use and should be set to "00".
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 181
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.2.2 þ RIP_BUTTON ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Define a Mouse Button
Level: 1
Command: U
Arguments: x0:XY y0:XY x1:XY y1:XY hotkey:2 flags:1 res:1 > v2.A4
text
Format: !|1U <x0> <y0> <x1> <y1> <hotkey> <flags>
<res> <text> > v2.A4
Example: !|1U010100003200iconfile<>Label<>HostCmd^m > v2.A4
Uses Draw Color: NO
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO
Uses Font Style: YES
Uses Viewport: YES > v1.54
Uses Port: YES (only for "non-mouse" type buttons) > v2.A3
Uses Base Math: Current setting > v2.A2
This command physically creates a new Button using a previously > v2.A1
defined RIP_BUTTON_STYLE in the current button style. You may have > v2.A4
at most 128 different Mouse Buttons (you may have any number of > v2.A1
non-Mouse Buttons). The <slot> parameter determines which button > v2.A1
style slot is used to determine how this button appears. > v2.A1
The <x0> and <y0> parameters for this command designate the
upper-left corner of the Button. This (X,Y) location may not be the
actual "absolute" corner position of the Button, as it may be
adjusted via the Special Effects functions that are part of the
RIP_BUTTON_STYLE command (see above).
The <x1> and <y1> parameters are only used for Plain Buttons when you
have not specified a specific Height and Width in the
RIP_BUTTON_STYLE command. These parameters are used in Dynamically
Sized Buttons. If the Height and Width in the RIP_BUTTON_STYLE are
non-zero, then these two parameters are set to zero.
The (x0,y0) and (x1,y1) parameters will be modified by the following
values for the different special effects:
Effect Type X0 Modifier Y0 Modifier X1 Modifier Y1 Modifier
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
Bevel -bevel size -bevel size +bevel size +bevel size
Recess -2 -2 +2 +2
Sunken 0 0 0 0
Chisel 0 0 0 0
[BEGIN REWORD]
<<< Discuss resolution independence & scaling of the above >>>
[END REWORD]
The <hotkey> parameter is only used with Mouse Buttons. It is the
ASCII code for the keystroke that will activate this Button. It is
represented as a two-digit MegaNum. If this character exists in the
text label, and the Underline flag or hilight hotkey flag is enabled > v1.54
in the RIP_BUTTON_STYLE, then the character will be underlined in the
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 182
label. Control codes are allowable, and a value of 255 (decimal)
corresponds to "any" key.
The <flags> parameter provides several different functions for each
button. The possible "combinatorial" flags for this parameter are
listed in the following table. Note that these values may be
combined together (by adding their values) to arrive at the final
flag parameter's value.
Value Description
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
1 Draw button as already selected
2 Button is "default" when <ENTER> is pressed
Using a flag of 1 means that the Button is already "selected". By
selected, we mean that it is already clicked and should be initially
drawn as clicked. This is typically used for Radio Buttons and/or
Check Boxes. This only affects the image. The Host Command WILL NOT
be automatically sent to the host when a selected Button is drawn. If
this parameter is set to 0, then the Button will be drawn in normal,
unselected mode.
The <text> parameter for this command is somewhat different than
those found in previously described RIPscrip commands. All other
RIPscrip commands only have one text parameter. This command
requires anywhere from 0-3 text parameters. The way RIPscrip
accomplishes this is by separating each block in the <text> parameter
with the delimiter "<>". This text parameter delimiter is not needed
before the first text block, but is necessary between the 1st and 2nd
blocks, and the 2nd and 3rd blocks. Here is an example of a typical
text parameter for this command:
ICONFILE.BMP<>TEXT LABEL<>HOST COMMAND > v2.A1
The actual syntax of this text parameter is as follows:
[icon-file][[<>text-label][<>host-command]]
The block described as ICONFILE.BMP is actually the Icon Filename > v2.A1
that will be used for the Button if it is an Icon Button. If it is
not an Icon Button, then this block will read "<>" all by itself (a
"null" block).
Note that we actually specified a file extension of ".BMP" for our > v2.A1
icon filename. You shouldn't explicitly specify a filename extension > v2.A1
like this if it is the default extension of the filename. The reason > v2.A1
for this is that some platforms don't use file extensions and their > v2.A1
use is not really appropriate. When in doubt, don't specify a file > v2.A1
extension. > v2.A1
The .BMP file extension does not need to be included as part of the > v2.A1
filename. If omitted, it will automatically be appended to the
filename. If an extension is provided, it will be used verbatim.
The "TEXT LABEL" block is actually the text that will be used to
descriptively label the Button. You may also specify a "null" block
for no label (i.e., "<>").
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 183
The final block of the <text> parameter is the Host Command. This
block contains any text that should be sent to the Host after this
Button is clicked. This may contain any Control Characters,
Pick-List definitions, Text Variables or Template Definitions. This
block might be "segmented" into multiple Host Command segments. See
the section entitled HOST COMMANDS in this Manual for additional
information on these Host Command features.
When this command is stored in-memory, it is converted to global > v1.54
screen coordinates (for internal storage only). This makes it so > v1.54
that if you have mouse button regions defined in multiple different > v1.54
viewports, that each field will be properly inverted at the right > v1.54
location regardless of the currently defined viewport. > v1.54
NOTE: All Mouse Fields are scanned in "last in, first out" order. > v1.54
This means that the last-most received Mouse Button will be > v1.54
the first one scanned for a mouse click. > v1.54
Not all of the blocks in the <text> parameter need to be specified.
Here are examples of the valid combinations of text blocks:
Parameter Example Description of the Text Parameter
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
icon<>label<>host_cmd Specify all three blocks
<>label<>host_cmd 2 blocks specified; no icon
icon<>label<> 2 blocks specified; no host command
icon<>label 2 blocks specified; no host command
<><>host_cmd 1 block specified; no icon or label
<>label<> 1 block specified; no icon or host command
<>label 1 block specified; no icon or host command
icon<><> 1 block specified; no label or host command
icon<> 1 block specified; no label or host command
icon 1 block specified; no label or host command
<><><> A blank text parameter; all blocks omitted
<><> A blank text parameter; all blocks omitted
<> A blank text parameter; all blocks omitted
Under RIPscrip 1.54 and earlier versions, button icon filenames ended > v2.A3
with .ICN for normal icons, and .HIC for "Hot IcoN". Under 2.0, > v2.A3
these file extensions are different. For normal button icons, the > v2.A3
extension .BMP is used for a standard bitmap, and .BMH is used for > v2.A3
a "hot bitmap". > v2.A3
When a button is displayed that uses an icon/bitmap, special care > v2.A3
must be taken when dealing with hot bitmaps. If the flag is present > v2.A3
in the button style indicating to use hot icons, then when the button > v2.A3
is displayed as selected then the hot bitmap (.BMH) file's image is > v2.A3
used to display the button. If that file doesn't exist, then the > v2.A3
normal bitmap button is displayed in an inverted state. If neither > v2.A3
of these files are present, then the RIP_BUTTON command is ignored. > v2.A3
If the host command string of the button cannot be parsed properly, > v2.A3
then the button is completely ignored. > v2.A3
NOTE: The <res> parameter is reserved for future use by TeleGrafix
Communications, Inc.. It should be set to 0 for compatibility
with future releases.
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 184
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.2.3 þ RIP_BUTTON_STYLE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Button style definition
Level: 1
Command: B
Arguments: wid:XY hgt:XY orient:2 flags:4 size:2 > v2.A2
dfore:2 dback:2 bright:2 dark:2 surface:2
grp_no:2 flags2:2 uline_col:2 corner_col:2
other_port:1 res:5 > v2.A4
Format: !|1B <wid> <hgt> <orient> <flags>
<bevsize> <dfore> <dback> <bright> <dark>
<surface> <grp_no> <flags2> <uline_col>
<corner_col> <other_port> <res> > v2.A4
Example: !|1B0A0A010274030F080F080700010E07010A00
Uses Draw Color: NO
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO
Uses Font Style: NO
Uses Viewport: NO > v1.54
Uses Port: NO > v2.A3
Uses Base Math: Current setting > v2.A2
This RIPscrip command is probably one of the most complex in the
entire protocol. It defines how subsequent RIP_BUTTON commands will
be interpreted. The purpose of this command is to define what a
Button is and how they operate. Buttons can have many different
configurations, flags, and styles. With the diversity of modes that
the Button can take on, complexity is a necessary evil.
There are 36 separate button style slots that can be defined > v2.A4
simultaneously. This command allows you to alter the current button > v2.A4
style slot. This button style slot is used by the RIP_BUTTON command > v2.A4
to define buttons of particular types. Button style slots can be > v2.A4
used to avoid retransmitting button styles over and over again. > v2.A4
This command does not actually do anything visibly on the screen.
Simply put, this creates an internal definition for the Button mode
which will be used with RIP_BUTTON commands after the definition is
created.
Every Button can have an optional text label. It can appear in
several different locations compared to the Button itself. This is
specified in the <orient> parameter. The actual text of the label is
not specified with this command, it is specified when you actually
create a Button (see RIP_BUTTON below). The value that <orient> can
be is as follows:
Value Description of Orientation
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
00 Display label above button
01 Display label to the left of button
02 Display label in the center of the button
03 Display label to the right of button
04 Display label beneath the button
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 185
There are three basic "types" of Buttons. There are Icon buttons, > v1.54
Clipboard buttons and Plain buttons. Each of these differ in the > v1.54
way that they create the button's image. A description of each type > v1.54
is as follows: > v1.54
ICON BUTTON (flag 128) - An Icon Button means that the > v1.54
actual image of the button will be created by loading a > v1.54
bitmap icon image from the disk and load it at the given > v1.54
locatino. Any special effects (see below) can be applied > v1.54
to the Icon to further enhance the image. The filename > v1.54
for the Icon is supplied with the RIP_BUTTON command, as > v1.54
is the Icon's upper left X/Y coordinate. Icon Buttons > v1.54
are always stamped in COPY mode. > v1.54
CLIPBOARD BUTTON (flag 1) - A clipboard button uses the > v2.A3
clipboard port contents for the base image of > v2.A3
the button. If no <other_port> is defined (ie, port #0), > v2.A3
then the specific port that is used for the source image is > v2.A3
determined by the clipboard pointer. If the clipboard pointer > v2.A3
isn't defined, then the RIP_BUTTON commandsd that follow are > v2.A3
ignored. If the <other_port> is from 1-35, then this > v2.A3
specifies a previously defined port. This port will be the > v2.A3
source of the bitmap image of the button. The entire contents > v2.A3
of the port's viewport will be the image used for any > v2.A3
subsequent RIP_BUTTON commands. If the given port doesn't > v2.A3
exist, then it the RIP_BUTTON command(s) are ignored. Any > v2.A3
special effects can be applied to this image to further > v2.A3
enhance the overall button's image. > v2.A3
PLAIN BUTTON (flag 256) - A plain button is exactly that, > v1.54
plain. No special graphics are used to create the button. > v1.54
The entire button region is simply filled-in with a solid > v1.54
colored rectangle using the <surface> color. Any > v1.54
special effects can be further applied to enhance the > v1.54
button's appearance. > v1.54
The <hgt> and <wid> parameters represent the fixed height and width
of the Button (applies only to Plain Buttons). If both values are
greater than zero, then this will represent the actual size of the
Button (its dimensions are not specified by the RIP_BUTTON command).
If both of these are set to zero, then the actual RIP_BUTTON command
will specify the size of the particular Button (dynamic sizing).
The <bevsize> parameter is only used if the BEVEL FLAG (flag 512) is > v1.54
specified. When active, this parameter will determine how many
pixels thick the bevel should be. This may be any value greater or
equal to zero.
There are a large number of flag values that can be combined to
achieve a great many effects. There are two flag parameters for the
RIP_BUTTON_STYLE command, <flags> and <flags2>. They are detailed in
the two tables that follow in this Section. You may combine any of
the flags in the first table together simply by adding the "Value" of
each one together and representing that number as a MegaNum.
The <dfore> and <dback> parameters are used with the text label. The
<dfore> parameter is the foreground color for the text. It is always
used to determine the color of the text label. The <dback> color is
the color of the dropshadow (if any). This parameter is only used
when you have specified the "Dropshadow" flag in the <flags>
parameter (see below).
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 186
NOTE: There are seven (7) color parameters in this command. > v2.A0
These parameters are ALWAYS used in Color Map mode. > v2.A0
Direct RGB Color Mode cannot be used for these > v2.A0
parameters. With Color Map mode, you have up to 256 > v2.A0
separate color combinations possible for each color, > v2.A0
providing you with a great deal of flexibility. The > v2.A0
color parameters always use the Base Math set by the > v2.A0
global Base Math setting. > v2.A0
The <bright>, <dark> and <surface> parameters are used with Plain
Buttons and with the Special Effects styles (see <flags> below).
These colors represent the highlighted color, the shadowed color, and
the regular surface color that is used in Special Effects. Typical
color combinations for these colors might be White, Dark-Gray and
Light-Gray respectively for a "chiseled steel" appearance. Each of
these values can contain a two-digit value representing any valid
color code that may be used in the RIP_COLOR command.
In addition to the special effects colors, are two additional colors
that can be used, <uline_color> which is used for the color of the
underline (in the text label), and <corner_color> which is used to
display the colors of corners for things like the Bevel, Recess, etc.
The <grp_no> parameter determines which Button Group subsequent
RIP_BUTTON commands will be associated with. Button Groups are used
to maintain groups of Buttons for things like Radio Buttons and/or
Checkbox Buttons. See the section on the BUTTON COMMAND for more
information on these modes, and what Button Groups can offer. This
value can range anywhere from 0-Z (i.e., 0-35). You should not mix
Checkbox and Radio buttons in the same group. -- unpredictable things
may happen if you do.
Some <flags> are mutually exclusive. For example, you can only have
one of the "Plain", "Icon", or "Clipboard" flags chosen at once. To
better assist you in determining which values can be combined with
each other, the right-most five columns in the next two tables
explain if the specific flag can be used under a specific condition.
For example, you cannot choose the "Hot Icon" flag if you are dealing
with a Clipboard Button. Another example is that you cannot
underline the hotkey character in the label if it is not a Mouse
Button.
The following table contains the possible flag values for the <flags>
parameter. Each of these values may be combined to achieve a
"composite" group of flags. See the preceding paragraphs for a more
detailed explanation of this method.
Value Description of Flags Field #1 Icn Clp Pln Mse NoMse
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
1 Button is a "Clipboard Button" N Y N Y Y
2 Button is "Invertable" Y Y Y Y N
4 Reset screen after button click Y Y Y Y N
8 Display Chisel special effect Y Y Y Y Y
16 Display Recessed special effect Y Y Y Y Y
32 Dropshadow the label (if any) Y Y Y Y Y
64 Auto-stamp image into Clipboard slot Y Y Y Y Y > v2.A2
128 Button is an "Icon Button" Y N N Y Y
256 Button is a "Plain Button" N N Y Y Y
512 Display Bevel special effect Y Y Y Y Y
1024 Button is a Mouse Button Y Y Y Y N
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 187
2048 Underline hot-key in label Y Y Y Y N
4096 Make Icon Button use Hot Icons Y N N Y N
8192 Adj. vertical centering of label Y Y Y Y Y
16384 Button belongs to a Radio Group Y Y Y Y N
32768 Display Sunken special effect Y Y Y Y Y
The Icon Button, Clipboard button and Plain flags have already been > v1.54
discussed. Following, will be more discussion of the various flags > v1.54
used in the preceding table: > v1.54
BUTTON IS INVERTABLE (flag 2) - This means that the button > v1.54
will be inverted when clicked. This flag is only useful > v1.54
when combined with the "Button is a Mouse Button - flag > v1.54
1024) flag. Even if the button has special effects, those > v1.54
will be inverted as well as they are considered part of > v1.54
the button - all except for the Recessed effect. The > v1.54
recessed effect is NEVER considered part of the actual > v1.54
button image, and will never be part of the mouse field, > v1.54
button's image or anything - it is just extra graphics. > v1.54
RESET SCREEN AFTER BUTTON CLICK (flag 4) - This flag is > v1.54
used when the button is considered a Mouse Button (flag > v1.54
1024). What this means is that when the user clicks on > v1.54
the button, the screen will be reset exactly the same > v1.54
as a RIP_RESET_WINDOWS command will do. The reset is > v1.54
performed before the host command is processed (if any). > v1.54
DISPLAY CHISEL SPECIAL EFFECT (flag 8) - This displays > v1.54
a special effect on-top of the button image that gives > v1.54
the visual impression of an indented gutter just to the > v1.54
inside of the button's border. The amount of indentation > v1.54
varies depending on the size of the button. See below > v1.54
for a table of indentation values for the Chisel effect. > v1.54
DISPLAY RECESSED SPECIAL EFFECT (flag 16) - This places > v1.54
a recessed one-pixel bevel around the exterior of the > v1.54
button. It is never considered part of the button's > v1.54
image. Its purpose is to give the button a more 3D look > v1.54
by making it appear that the button is "poking through" > v1.54
a hole in a dialog box. This effect is accomplished by > v1.54
placing a black outline (one pixel wide) around the > v1.54
exterior of the button's image (including bevel, etc), > v1.54
then placing a one-pixel wide inverted bevel around the > v1.54
black outline. > v1.54
DROPSHADOW THE LABEL IF ANY (flag 32) - This flag will > v1.54
instruct RIPscrip to place a dropshadowed version of the > v1.54
text label one pixel to the right and one pixel lower > v1.54
than the original label. This is accomplished by drawing > v1.54
the label first in the <dback> color, then drawing the > v1.54
label offset up-left in the <dfore>. > v1.54
AUTO-STAMP IMAGE INTO CLIPBOARD SLOT (flag 64) - This option > v2.A2
is also known as "Auto-Clip". What this means is right > v1.54
after the first button's image is rendered (including any > v1.54
special effects), it is automatically copied into another > v2.A3
port specified by the <other_port> parameter. If that port > v2.A3
is defined as port #0, then this mode is treated like a > v2.A3
RIP_GET_IMAGE command, copying the image onto some clipboard > v2.A3
port, by determining the clipboard pointer and establishing > v2.A3
an offscreen bitmap port located at the first unused port > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 188
number. If the <other_port> parameter is set to a value from > v2.A3
1-35, then a specific port number is used; that port is > v2.A3
deleted (if it's in use) then re-defined. If the > v2.A3
<other_port> parameter specifies the same port as the > v2.A3
currently active drawing port, or if the clipboard pointer > v2.A3
points to the current drawing port, then auto-clip mode is > v2.A3
ignored. The Recessed special effect is not considered > v2.A3
part of the button image for this flag and is not made > v1.54
part of the clipboard image. After the image is copied > v1.54
into a clipboard port, the label is drawn (this is so that > v2.A3
the label is not placed into a clipboard port), then a > v2.A3
number of flags in the current Button Style definition > v1.54
are altered. Specifically, the Icon and Plain flags are > v1.54
disabled, and Clipboard button enabled (thus making any > v1.54
subsequent buttons use the resultant Clipboard button > v1.54
image for their button's representation). In addition, > v1.54
the chisel, bevel, auto-clip and sunken flags are > v1.54
disabled. The final result is a Clipboard button with > v1.54
no special effects other than the Recessed effect (if > v1.54
any). This is most often used with Icon Buttons where > v1.54
every subsequent button uses the same Icon over and over > v1.54
again - the net result of this is less "disk usage" > v2.A3
whenever a button is created; in addition, buttons will > v1.54
draw faster too. If this option is used, then the > v2.A0
parameter <other_port> is used to determine which > v2.A3
clipboard port to use for the stored image. > v2.A3
BUTTON IS AN ICON BUTTON (flag 128) - See previous > v1.54
discussions on button types above. > v1.54
BUTTON IS A PLAIN BUTTON (flag 256) - See previous > v1.54
discussions on button types above. > v1.54
DISPLAY BEVEL SPECIAL EFFECT (flag 512) - When this flag > v1.54
is active, a bevel will be drawn <size> pixels thick on > v1.54
the outside of the base image of the button. This makes > v1.54
the button that many pixels wider and taller in each > v1.54
direction. See the RIP_BUTTON for a more detailed > v1.54
description of the affects of the button's final size. > v1.54
BUTTON IS A MOUSE BUTTON (flag 1024) - When this flag is > v1.54
enabled, the button becomes a clickable mouse region. > v1.54
When this option is in use, the Invert flag and several > v1.54
others are available (see the preceding chart). When > v1.54
a button is a non-mouse button, then it is only used to > v1.54
draw a dialog box or an elaborate "static graphic" image > v1.54
of something that "looks" like a button. > v1.54
UNDERLINE HOT-KEYS IN LABEL (flag 2048) - When this > v1.54
flag is active, the first occurence of the hot-key > v1.54
character in the button's label will be underlined using > v1.54
the <uline_col> color. Special care must be taken when > v1.54
underlining the character, taking into consideration if > v1.54
the character has a segment that goes below the "baseline" > v1.54
of the font. Consult the following section to determine > v1.54
what ASCII characters have these "descenders". Characters > v1.54
with descenders have the underline drawn slightly lower > v1.54
than for characters without them. > v1.54
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 189
MAKE ICON BUTTON USE HOT ICONS (flag 4096) - A Hot Icon > v1.54
is a button that has an alternative image when the button > v1.54
is "depressed". Normally, when a button is an Icon > v1.54
button, some form of Icon File is used to create the image > v1.54
of the button (eg, EMAIL.BMP). When the Hot Icon flag is > v2.A1
in use, whenever that button is depressed, rather than > v1.54
using the normal Icon File for the button's image, a > v1.54
different Icon File is used for the button's image. The > v1.54
filename would be the same filename as the original Icon, > v1.54
but with an extension of .BMH instead of .BMP. When Hot > v2.A2
Icon is in use, the alternative Icon is stamped in COPY > v1.54
mode. If the file does not exist, then the original > v1.54
Icon's image is used, but pasted in NOT mode for the > v1.54
duration of the depression. > v1.54
ADJ. VERTICAL CENTERING OF LABEL (flag 8192) - Some Labels > v1.54
may appear non-centered vertically when drawn using some > v1.54
fonts that are rather large. With this in mind, you have > v1.54
the option to adjust the vertical centering. What this > v1.54
does is take into consideration the height of any > v1.54
descenders of the label and calculate those into the > v1.54
overall height of the label before centering. If this > v1.54
flag is not used, then the descenders are not taken into > v1.54
consideration when the vertical centering is calculated. > v1.54
See the Font Metric tables below for more detailed > v1.54
information on font sizes and their associated metrics. > v1.54
This command has no effect if the Label orientation is > v1.54
LEFT or RIGHT of the button. It only applies to an > v1.54
orientation of TOP, BOTTOM or CENTER. > v1.54
BUTTON BELONGS TO A RADIO GROUP (flag 16384) - When this > v1.54
flag is used, then any buttons defined in this button > v1.54
<group_no> are considered to be radio buttons where only > v1.54
one of the buttons can be clicked (selected) at any > v1.54
particular time. If a button is not a radio button or > v1.54
a checkbox button, then the "selected" flag of the > v1.54
RIP_BUTTON command is ignored. When a Radio Button is > v1.54
clicked, any other radio button in that button group that > v1.54
is selected is automatically de-selected and the current > v1.54
one selected. Any host command is processed at the time > v1.54
of the button click. If a Radio Button is drawn initally > v1.54
as selected, then that host command is processed at the > v1.54
time of its initial drawing. See the section near the > v1.54
end of this document discussing TEMPLATES for a more > v1.54
complete description of Radio Buttons and how they > v1.54
interact with their Button Group and with each other. > v1.54
DISPLAY SUNKEN SPECIAL EFFECT (flag 32768) - When this > v1.54
option is enabled, a one-pixel inverted bevel is drawn > v1.54
exactly one pixel to the inside of the base image of the > v1.54
button. This and the chisel effect are the only two > v1.54
special effects which physically "overwrite" portions of > v1.54
the base button image. > v1.54
This array defines which characters have descenders (portions of
their font that go below the baseline). This information is used in
the vertical centering of button text labels.
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 190
char low_char[256] =
{
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,
1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,
0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0
};
NOTE: The low_char[] table is only truly useful under ENG > v2.A3
configurations for the text window. Other languages may > v2.A3
have descenders for other characters. > v2.A3
struct METRIC
{
unsigned int top; // Scan lines from TOP OF CELL to char top > v2.A2
unsigned int bow; // Scan lines from TOC to crest of char > v2.A2
unsigned int base; // Scan lines from TOC to baseline > v2.A2
unsigned int drop; // Scan lines from TOC to lowermost pixel > v2.A2
};
The METRIC structure can be described visually as follows:
0 ÄÄÉÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍ» Notice that the topmost scanline
º ³ º of a font cell is not necessarily
TOPÄÄ×ÄÛÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄĶ the top of the character. The
º Û ³ º "top" field of the structure
º Û ³ º contains the vertical offset
º Û ³ º from the top of the cell for all
BOWÄÄ×ÄÛÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄĶ fonts in that set.
º Û ÛÛÛ ³ ÛÛÛ Û º
º ÛÛ Û ³ Û ÛÛ º
º Û Û ³ Û Û º
º Û Û ³ Û Û º
º Û Û ³ Û Û º
º Û Û ³ Û ÛÛ º
BASEÄÄ×ÄÛÄÄÄÄÄÛÄÄÅÄÄÄÛÛÛÄÛÄĶ
º ³ Û º
º ³ Û º
º ³ Û º
º ³ Û Û º
DROPÄÄ×ÄÄÄÄÄÄÄÄÄÄÅÄÄÄÛÛÛÄÄÄĶ
º ³ º
END ÄÄÈÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍŒ
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 191
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º Default Font (Font 0) º º Triplex Font (Font 1) º
ÇÄÄÄÄÄÄÒÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÄÂÄÄÄÄÄĶ ÇÄÄÄÄÄÄÒÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÄÂÄÄÄÄÄĶ
º Size º Top ³ Bow ³ Base ³ Drop º º Size º Top ³ Bow ³ Base ³ Drop º
ÌÍÍÍÍÍÍÎÍÍÍÍÍØÍÍÍÍÍØÍÍÍÍÍÍØÍÍÍÍÍ͹ ÌÍÍÍÍÍÍÎÍÍÍÍÍØÍÍÍÍÍØÍÍÍÍÍÍØÍÍÍÍÍ͹
º 1 º 0 ³ 2 ³ 6 ³ 7 º º 1 º 6 ³ 10 ³ 18 ³ 22 º
º 2 º 0 ³ 4 ³ 13 ³ 15 º º 2 º 6 ³ 11 ³ 20 ³ 24 º
º 3 º 0 ³ 6 ³ 20 ³ 23 º º 3 º 8 ³ 13 ³ 23 ³ 28 º
º 4 º 0 ³ 8 ³ 27 ³ 31 º º 4 º 10 ³ 17 ³ 31 ³ 38 º
º 5 º 0 ³ 10 ³ 34 ³ 39 º º 5 º 13 ³ 23 ³ 41 ³ 50 º
º 6 º 0 ³ 12 ³ 41 ³ 47 º º 6 º 16 ³ 28 ³ 51 ³ 62 º
º 7 º 0 ³ 14 ³ 48 ³ 55 º º 7 º 20 ³ 34 ³ 62 ³ 76 º
º 8 º 0 ³ 16 ³ 55 ³ 63 º º 8 º 25 ³ 42 ³ 77 ³ 94 º
º 9 º 0 ³ 18 ³ 62 ³ 71 º º 9 º 30 ³ 51 ³ 93 ³ 114 º
º 10 º 0 ³ 20 ³ 69 ³ 79 º º 10 º 40 ³ 68 ³ 124 ³ 152 º
ÈÍÍÍÍÍÍÊÍÍÍÍÍÏÍÍÍÍÍÏÍÍÍÍÍÍÏÍÍÍÍÍÍŒ ÈÍÍÍÍÍÍÊÍÍÍÍÍÏÍÍÍÍÍÏÍÍÍÍÍÍÏÍÍÍÍÍÍŒ
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º Small Font (Font 2) º º Sans Serif Font (Font 3) º
ÇÄÄÄÄÄÄÒÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÄÂÄÄÄÄÄĶ ÇÄÄÄÄÄÄÒÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÄÂÄÄÄÄÄĶ
º Size º Top ³ Bow ³ Base ³ Drop º º Size º Top ³ Bow ³ Base ³ Drop º
ÌÍÍÍÍÍÍÎÍÍÍÍÍØÍÍÍÍÍØÍÍÍÍÍÍØÍÍÍÍÍ͹ ÌÍÍÍÍÍÍÎÍÍÍÍÍØÍÍÍÍÍØÍÍÍÍÍÍØÍÍÍÍÍ͹
º 1 º 2 ³ 3 ³ 5 ³ 6 º º 1 º 7 ³ 11 ³ 19 ³ 23 º
º 2 º 2 ³ 4 ³ 6 ³ 7 º º 2 º 7 ³ 12 ³ 21 ³ 25 º
º 3 º 2 ³ 3 ³ 6 ³ 7 º º 3 º 9 ³ 14 ³ 24 ³ 29 º
º 4 º 3 ³ 5 ³ 9 ³ 11 º º 4 º 11 ³ 18 ³ 32 ³ 39 º
º 5 º 4 ³ 7 ³ 12 ³ 14 º º 5 º 14 ³ 24 ³ 42 ³ 51 º
º 6 º 5 ³ 9 ³ 15 ³ 18 º º 6 º 18 ³ 30 ³ 53 ³ 64 º
º 7 º 6 ³ 10 ³ 18 ³ 22 º º 7 º 22 ³ 36 ³ 64 ³ 78 º
º 8 º 7 ³ 12 ³ 22 ³ 27 º º 8 º 28 ³ 45 ³ 80 ³ 97 º
º 9 º 9 ³ 15 ³ 27 ³ 33 º º 9 º 33 ³ 54 ³ 96 ³ 117 º
º 10 º 12 ³ 20 ³ 36 ³ 44 º º 10 º 44 ³ 72 ³ 128 ³ 156 º
ÈÍÍÍÍÍÍÊÍÍÍÍÍÏÍÍÍÍÍÏÍÍÍÍÍÍÏÍÍÍÍÍÍŒ ÈÍÍÍÍÍÍÊÍÍÍÍÍÏÍÍÍÍÍÏÍÍÍÍÍÍÏÍÍÍÍÍÍŒ
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º Gothic Font (Font 4) º º Script Font (Font 5) º
ÇÄÄÄÄÄÄÒÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÄÂÄÄÄÄÄĶ ÇÄÄÄÄÄÄÒÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÄÂÄÄÄÄÄĶ
º Size º Top ³ Bow ³ Base ³ Drop º º Size º Top ³ Bow ³ Base ³ Drop º
ÌÍÍÍÍÍÍÎÍÍÍÍÍØÍÍÍÍÍØÍÍÍÍÍÍØÍÍÍÍÍ͹ ÌÍÍÍÍÍÍÎÍÍÍÍÍØÍÍÍÍÍØÍÍÍÍÍÍØÍÍÍÍÍ͹
º 1 º 7 ³ 11 ³ 19 ³ 23 º º 1 º 10 ³ 17 ³ 22 ³ 29 º
º 2 º 7 ³ 12 ³ 21 ³ 25 º º 2 º 10 ³ 18 ³ 24 ³ 32 º
º 3 º 9 ³ 14 ³ 24 ³ 29 º º 3 º 12 ³ 21 ³ 27 ³ 36 º
º 4 º 11 ³ 18 ³ 32 ³ 39 º º 4 º 16 ³ 28 ³ 37 ³ 49 º
º 5 º 14 ³ 24 ³ 42 ³ 51 º º 5 º 21 ³ 37 ³ 49 ³ 65 º
º 6 º 18 ³ 30 ³ 53 ³ 64 º º 6 º 26 ³ 46 ³ 61 ³ 81 º
º 7 º 22 ³ 36 ³ 64 ³ 78 º º 7 º 32 ³ 56 ³ 74 ³ 98 º
º 8 º 28 ³ 45 ³ 80 ³ 97 º º 8 º 40 ³ 70 ³ 92 ³ 122 º
º 9 º 33 ³ 54 ³ 96 ³ 117 º º 9 º 48 ³ 84 ³ 111 ³ 147 º
º 10 º 44 ³ 72 ³ 128 ³ 156 º º 10 º 64 ³ 112 ³ 148 ³ 196 º
ÈÍÍÍÍÍÍÊÍÍÍÍÍÏÍÍÍÍÍÏÍÍÍÍÍÍÏÍÍÍÍÍÍŒ ÈÍÍÍÍÍÍÊÍÍÍÍÍÏÍÍÍÍÍÏÍÍÍÍÍÍÏÍÍÍÍÍÍŒ
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 192
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º Simplex Font (Font 6) º º Triplex Script Font (Font 7) º
ÇÄÄÄÄÄÄÒÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÄÂÄÄÄÄÄĶ ÇÄÄÄÄÄÄÒÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÄÂÄÄÄÄÄĶ
º Size º Top ³ Bow ³ Base ³ Drop º º Size º Top ³ Bow ³ Base ³ Drop º
ÌÍÍÍÍÍÍÎÍÍÍÍÍØÍÍÍÍÍØÍÍÍÍÍÍØÍÍÍÍÍ͹ ÌÍÍÍÍÍÍÎÍÍÍÍÍØÍÍÍÍÍØÍÍÍÍÍÍØÍÍÍÍÍ͹
º 1 º 8 ³ 13 ³ 21 ³ 25 º º 1 º 6 ³ 10 ³ 18 ³ 22 º
º 2 º 9 ³ 14 ³ 23 ³ 27 º º 2 º 6 ³ 11 ³ 20 ³ 24 º
º 3 º 10 ³ 16 ³ 26 ³ 31 º º 3 º 8 ³ 13 ³ 23 ³ 28 º
º 4 º 13 ³ 21 ³ 35 ³ 42 º º 4 º 10 ³ 17 ³ 31 ³ 38 º
º 5 º 17 ³ 28 ³ 46 ³ 55 º º 5 º 13 ³ 23 ³ 41 ³ 50 º
º 6 º 22 ³ 35 ³ 58 ³ 69 º º 6 º 16 ³ 28 ³ 51 ³ 62 º
º 7 º 26 ³ 42 ³ 70 ³ 84 º º 7 º 20 ³ 34 ³ 62 ³ 76 º
º 8 º 32 ³ 52 ³ 87 ³ 104 º º 8 º 25 ³ 42 ³ 77 ³ 94 º
º 9 º 39 ³ 63 ³ 105 ³ 126 º º 9 º 30 ³ 51 ³ 93 ³ 114 º
º 10 º 52 ³ 84 ³ 140 ³ 168 º º 10 º 40 ³ 68 ³ 124 ³ 152 º
ÈÍÍÍÍÍÍÊÍÍÍÍÍÏÍÍÍÍÍÏÍÍÍÍÍÍÏÍÍÍÍÍÍŒ ÈÍÍÍÍÍÍÊÍÍÍÍÍÏÍÍÍÍÍÏÍÍÍÍÍÍÏÍÍÍÍÍÍŒ
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º Complex Font (Font 8) º º European Font (Font 9) º
ÇÄÄÄÄÄÄÒÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÄÂÄÄÄÄÄĶ ÇÄÄÄÄÄÄÒÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÄÂÄÄÄÄÄĶ
º Size º Top ³ Bow ³ Base ³ Drop º º Size º Top ³ Bow ³ Base ³ Drop º
ÌÍÍÍÍÍÍÎÍÍÍÍÍØÍÍÍÍÍØÍÍÍÍÍÍØÍÍÍÍÍ͹ ÌÍÍÍÍÍÍÎÍÍÍÍÍØÍÍÍÍÍØÍÍÍÍÍÍØÍÍÍÍÍ͹
º 1 º 9 ³ 13 ³ 21 ³ 25 º º 1 º 8 ³ 15 ³ 33 ³ 39 º
º 2 º 9 ³ 14 ³ 23 ³ 27 º º 2 º 8 ³ 16 ³ 36 ³ 42 º
º 3 º 11 ³ 16 ³ 26 ³ 31 º º 3 º 10 ³ 19 ³ 41 ³ 48 º
º 4 º 14 ³ 21 ³ 35 ³ 42 º º 4 º 13 ³ 25 ³ 55 ³ 65 º
º 5 º 18 ³ 28 ³ 46 ³ 55 º º 5 º 16 ³ 33 ³ 73 ³ 86 º
º 6 º 23 ³ 35 ³ 58 ³ 69 º º 6 º 21 ³ 41 ³ 91 ³ 107 º
º 7 º 28 ³ 42 ³ 70 ³ 84 º º 7 º 26 ³ 50 ³ 110 ³ 130 º
º 8 º 35 ³ 52 ³ 87 ³ 104 º º 8 º 32 ³ 62 ³ 137 ³ 162 º
º 9 º 42 ³ 63 ³ 105 ³ 126 º º 9 º 39 ³ 75 ³ 165 ³ 195 º
º 10 º 56 ³ 84 ³ 140 ³ 168 º º 10 º 52 ³ 100 ³ 220 ³ 260 º
ÈÍÍÍÍÍÍÊÍÍÍÍÍÏÍÍÍÍÍÏÍÍÍÍÍÍÏÍÍÍÍÍÍŒ ÈÍÍÍÍÍÍÊÍÍÍÍÍÏÍÍÍÍÍÏÍÍÍÍÍÍÏÍÍÍÍÍÍŒ
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º Bold Font (Font 10) º
ÇÄÄÄÄÄÄÒÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÄÂÄÄÄÄÄĶ
º Size º Top ³ Bow ³ Base ³ Drop º
ÌÍÍÍÍÍÍÎÍÍÍÍÍØÍÍÍÍÍØÍÍÍÍÍÍØÍÍÍÍÍ͹
º 1 º 12 ³ 18 ³ 36 ³ 40 º
º 2 º 14 ³ 20 ³ 40 ³ 44 º
º 3 º 15 ³ 23 ³ 45 ³ 50 º
º 4 º 20 ³ 30 ³ 60 ³ 67 º
º 5 º 27 ³ 40 ³ 80 ³ 89 º
º 6 º 34 ³ 50 ³ 100 ³ 111 º
º 7 º 40 ³ 60 ³ 120 ³ 134 º
º 8 º 50 ³ 75 ³ 150 ³ 167 º
º 9 º 60 ³ 90 ³ 180 ³ 201 º
º 10 º 80 ³ 120 ³ 240 ³ 268 º
ÈÍÍÍÍÍÍÊÍÍÍÍÍÏÍÍÍÍÍÏÍÍÍÍÍÍÏÍÍÍÍÍÍŒ
NOTE: The above metric tables are based on 640x350 resolutions. For > v2.A3
information on font scaling at other resolutions for the > v2.A3
"system fonts" defined via the RIP_FONT_STYLE command, see > v2.A3
the preceding section for the RIP_FONT_STYLE command. This > v2.A3
section defines the magnification factors for each font and > v2.A3
how they relate to other resolutions. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 193
The Chisel effect draws a dropshadowed line around the inside of the
button. How far from the borders of the button are determined by
this table:
Height of Button X inset Y inset
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
0 - 11 1 1
12 - 24 3 2
25 - 39 4 3
40 - 74 6 5
75 - 149 7 5
150 - 199 8 6
200 - 249 10 7
250 - 299 11 8
300 - 13 9
[BEGIN REWORD]
<<< Think about resolution independence of chisel indent. >>>
<<< Talk about bevel sizes too, along with recesses. >>>
[END REWORD]
This table describes the possible flag settings for the <flags2>
parameter:
Val Description of Flags Field #2 Icon Clip Plain Mouse No-Mouse
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
1 Button is in a check box group Y Y Y Y N
2 Highlight hotkey character Y Y Y Y N
4 Explode (zoom out when clicked) Y Y Y Y N
8 Left Justify Label (top/ctr/btm) Y Y Y Y Y
16 Right Justify Label (top/ctr/btm) Y Y Y Y Y
32 Don't fill-in button interior N N Y Y Y > v2.A0
64 Fill-in interior in fill pattern N N Y Y Y > v2.A0
Following is a more complete description of the flags described in > v1.54
the <flags2> parameter: > v1.54
BUTTON IS IN A CHECK BOX GROUP (flag 1) - When this flag is > v1.54
selected, then the button <group_no> is considered a Check- > v1.54
box group. When in this mode, the Radio Group flag is not > v1.54
accessible - A Button Group can be a Radio Button, a Check- > v1.54
box button or neither, but not more than one at the same > v1.54
time. A Check-box button group is a group of buttons where > v1.54
each button in the group can be either ON or OFF in any > v1.54
combination. In this way, more than one button in the > v1.54
group can be clicked at the same time. See the TEMPLATES > v1.54
section later on in this document for a complete discussion > v1.54
of how the Host Commands are processed for Check-Box buttons. > v1.54
If a check-box button is drawn as "pre-selected", then the > v1.54
Host Command is processed immediately upon inital drawing of > v1.54
the button (when it is received). > v1.54
HIGHLIGHT HOTKEY CHARACTER (flag 2) - When this flag is > v1.54
active, then the first occurence of the hotkey character > v1.54
in the label will be hilighted using the <uline_col> color. > v1.54
This gives the user a visual impression of what keystroke > v1.54
they need to type in order to activate the button without > v1.54
the mouse. > v1.54
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 194
EXPLODE (ZOOM OUT WHEN CLICKED) (flag 4) - This optional > v1.54
flag is designed to "zoom out" from the button when the > v1.54
user clicks on it. What is generally done is a dotted > v1.54
rectangle is drawn initially around the button and it is > v1.54
repeatedly redrawn over itself in XOR mode, constantly > v1.54
getting larger and larger until it hits the full size of > v1.54
the screen. This gives the visual impression that the > v1.54
button is zooming out to another screen. Each time another > v1.54
frame of the zooming rectangle is drawn, the previous > v1.54
rectangle on the inside of the new one is erased by XOR > v1.54
drawing the same rectangle over itself again. This option > v1.54
does not need to be supported in order to be considered > v1.54
a RIPscrip terminal, although it would be nice. In > v1.54
other words, this is not a "make or break" feature. > v1.54
LEFT JUSTIFY LABEL (TOP/CTR/BTM) (flag 8) - If this option > v1.54
is enabled, then any TOP, CENTER or BOTTOM label orientations > v1.54
will be left justified to the left edge of the button. The > v1.54
exact indentation of the label from the interior of the > v1.54
button's base image depends on whether the chisel effect > v1.54
is active. If chisel is OFF, then the indentation is 10 > v1.54
pixel. If chisel is ON, then the indentation is 20 pixels. > v1.54
This option can be combined with the Adjust Vertical Centering > v1.54
flag only if the label orientation is CENTER. > v1.54
RIGHT JUSTIFY LABEL (TOP/CTR/BTM) (flag 16) - If this option > v1.54
is enabled, then any TOP, CENTER or BOTTOM label orientations > v1.54
will be right justified to the right edge of the button. The > v1.54
exact indentation of the label from the interior of the > v1.54
button's base image depends on whether the chisel effect > v1.54
is active. If chisel is OFF, then the indentation is 10 > v1.54
pixel. If chisel is ON, then the indentation is 20 pixels. > v1.54
This option can be combined with the Adjust Vertical Centering > v1.54
flag only if the label orientation is CENTER. > v1.54
DON'T FILL-IN BUTTON INTERIOR - If this option is enabled and > v2.A0
the button is a Plain Button, then the interior of the Button > v2.A0
will not be filled in with the surface color. By default, > v2.A0
any plain button will have its interior filled in with the > v2.A0
surface color. Use this option if you don't want the button > v2.A0
face to be drawn. > v2.A0
FILL-IN INTERIOR IN FILL PATTERN - If this option is enabled > v2.A0
in conjunction with a plain button, then the interior of the > v2.A0
button that would normally be filled in with the surface > v2.A0
color will instead, use the current Fill Color and Fill > v2.A0
Pattern to fill in the interior. This allows for patterned > v2.A0
button faces. > v2.A0
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 195
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.2.4 þ RIP_COPY_BLIT ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Copy a screen area to a new location (bit blit) > v2.A1
Level: 1 > v2.A1
Command: g > v2.A1
Arguments: x0:2 y0:2 x1:2 y1:2 dx0:2 dy0:2 mode:1 res:1 > v2.A1
Format: !|1g <x0> <y0> <x1> <y1> <dx0> <dy0> <mode> <res> > v2.A1
Example: !|1g080G140M112230 > v2.A1
Uses Draw Color: YES > v2.A1
Uses Back Color: YES > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: YES > v2.A2
Uses Write Mode: NO > v2.A1
Uses Font Style: NO > v2.A1
Uses Viewport: NO > v2.A1
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
This command is similar to the RIP_SCROLL command but is more generic > v2.A1
in nature - it can move a rectangle of graphical information on the > v2.A1
screen from one position to another - not just up or down. It does > v2.A1
this with high-speed bit-blit operations. The rectangle contained in > v2.A1
(x0,y0) to (x1,y1) is copied so that its upper-left corner is now at > v2.A1
the location (dx0,dy0). > v2.A1
Some, part, or none of the original source image might be covered up > v2.A1
by the moved screen data. The parts of the original image which are > v2.A1
still on the screen (unobscured) can be cleared to some color or > v2.A1
state if you wish by using the <mode> parameter (like RIP_SCROLL > v2.A1
does). The possible settings for <mode> are: > v2.A1
Mode Description > v2.A1
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A1
0 Do nothing - leave the old graphics on the screen > v2.A1
1 Fill the old graphical area with the current drawing > v2.A1
color (solid fill in COPY mode). > v2.A1
2 Fill the old graphical area with the current background > v2.A1
drawing color (solid fill in COPY mode). > v2.A1
3 Fill the area with the current fill color (solid fill in > v2.A1
COPY mode). Fill pattern/styles are not used for this. > v2.A1
4 Fill the old graphical area with the current fill > v2.A1
style/pattern in the current fill color. > v2.A1
5 Erase the affected area entirely to black. > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 196
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.2.5 þ RIP_DEFINE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Define a text variable
Level: 1
Command: D
Arguments: flags:3 res:2 text
Format: !|1D <flags> <res> <text>
Example: !|1D00700text_var,60:?question?default data
Uses Draw Color: NO
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO
Uses Font Style: NO
Uses Viewport: NO > v1.54
Uses Port: NO > v2.A3
Uses Base Math: Current setting > v2.A2
This command is used to create a text variable on the Client system
(i.e., the Terminal system). A text variable is more fully covered
in the HOST COMMANDS section. Simply put, a text variable is a piece
of information assigned to a 1-12 character identifier that can
either be saved to a local database file (static variables), or to
memory (dynamic variables). Variable Identifiers can be 1-12
characters in length. You may use any alphanumeric character and
underscores (_) in the identifier. An underscore cannot be the first
character, nor can the first character of an identifier be a number.
The <flags> parameter of this command combines three separate values
into one MegaNum flag that determines how the variable definition
will operate. Here are the possible flag values:
Value Description of Flag
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
001 Save Variable to database
002 Cannot specify a blank response
004 Non-interactive query
When a variable is flagged as "Save to Database", it becomes a part
of the Client system's actual configuration. The value is saved
indefinitely until either changed, or manually erased. You may
choose not to allow the user to enter a blank response. This
basically requires them to enter some piece of information for the
variable.
The last flag determines whether the definition is interactive or not.
An interactive definition will attempt to define the variable. If it
does exist, it pops the value up on the screen asking the user to
confirm if the value is correct. If it does not exist, a similar
pop-up box will appear asking the user to enter some data for the
given variable.
In a non-interactive situation, the Client system will check to see
if the variable exists. If it does, then nothing happens (unless a
default response is specified in this command, whereby the Client's
variable is updated with the new information). If the value is not
defined, then this definition becomes interactive by default, since
the user actually has to enter something anyway.
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 197
The <text> parameter for this command is also segmented in nature,
much like the RIP_BUTTON command is. An example of a segmented
<text> parameter for the RIP_DEFINE command might be as follows:
FULL_NAME,30:?What is your full name?John Doe
The actual syntax of the Variable Define text parameter is as
follows:
variable-identifier[,field-width]:[?question-text?][default-value]
There are several different segments in this parameter as you can
see. The first section is the variable- identifier. Immediately
after it is an optional field-width. If the field width is omitted,
it will default to a value of 60. You should limit the values of
this width from 1-60.
Immediately following the identifier field-width parameter is a colon
(:). The colon indicates that the variable identifier field is
completed and that the remainder of the text parameter is to contain
the question and/or the default response (if any). If no question or
default response is provided, the text parameter would read
"TEXT_VAR,width:" with no additional data.
The question-text is specified by a question mark (?) followed by the
actual text of the question, followed by a trailing question mark.
The basic format of the question segment is as follows:
?this is a question?
The remainder of the text parameter consists of a default-value for
the variable's contents. It may be omitted if you wish, to make it
so that the user must enter his/her own value instead of some "canned
response".
NOTE: The <res> parameter is reserved for future use by TeleGrafix
Communications, Inc.. It should be set to 00 for
compatibility with future releases.
THIS COMMAND IS NOW OBSOLETE. USE THE SPECIALLY ENHANCED > v2.A1
TEXT VARIABLE SYSTEM WITHIN QUERIES OR HOST COMMANDS TO > v2.A1
PRODUCE THE SAME RESULTS AS THIS COMMAND AND MUCH MORE! > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 198
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.2.6 þ RIP_END_TEXT ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: End a rectangular text region
Level: 1
Command: E
Arguments: <none>
Format: !|1E
Example: !|1E
Uses Draw Color: NO
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO
Uses Font Style: NO
Uses Viewport: YES > v1.54
Uses Port: YES > v2.A3
Uses Base Math: N/A > v2.A2
This command indicates the end of a formatted text block. Only one
of these "end" commands is necessary for each block.
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 199
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.2.7 þ RIP_FILE_QUERY ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Query existing information on a particular file
Level: 1
Command: F
Arguments: mode:2 res:4 filename...
Format: !|1F <mode> <res> <filename>
Example: !|1F010000testfile.icn
Uses Draw Color: NO
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO
Uses Font Style: NO
Uses Viewport: NO > v1.54
Uses Port: NO > v2.A3
Uses Base Math: Current setting > v2.A2
This command queries the existence of a particular file, regardless
of type. It is intended for host systems to determine if a
particular Icon or RIP file exists on the terminal;s hard disk.
There are a variety of ways you can query for filenames. The <mode>
parameter determines the command's response. This command instructs
the terminal to send a response to the host immediately upon
execution.
The following table is a listing of the possible values for <mode>:
Mode Description
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
00 Simply query the existence of the file. If it exists, a "1" is
returned. Otherwise a "0" is returned to the Host (without a
carriage return).
01 Same as 0, except a carriage return is added after the response.
02 Queries the existence of a file. If it does not exist, a "0" is
returned to the Host followed by a carriage return. If it does
exist, the returned text is a "1." followed by the file size (in
decimal). The return sequence is terminated by a carriage
return. An example of the returned text could be "1.20345".
03 Queries extended return information. If the file does not
exist, a "0" is returned followed by a carriage return. If it
does exist, the text returned to the Host is in the Format:
1.size.date.time <cr>. An example of a return statement could
be "1.20345.01/02/93.03:04:30<cr>"
04 Queries extended return information. If the file does not
exist, a "0" is returned followed by a carriage return. If it
does exist, the text returned to the Host is in the Format:
1.filename.size.date.time <cr>. An example of a return statement
could be "1.MYFILE.RIP.20345.01/02/93.03:04:30 <cr>". Note that
the file extension adds another period into the return text.
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 200
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.2.8 þ RIP_GET_IMAGE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Copy rectangular image to the clipboard port > v2.A3
Level: 1
Command: C
Arguments: x0:XY y0:XY x1:XY y1:XY res:1 > v2.A3
Format: !|1C <x0> <y0> <x1> <y1> <res> > v2.A3
Example: !|1C001122330
Uses Draw Color: NO
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO
Uses Font Style: NO
Uses Viewport: YES > v1.54
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
This command instructs the terminal program to copy a rectangular > v2.A3
region defined by (x0,y0) to (x1,y1) in the currently active > v2.A3
drawing port to the first offscreen port found after port #0 (the > v2.A3
screen port). If no offscreen port is actually found, then the > v2.A3
first empty port slot is used; the slot is defined as an offscreen > v2.A3
bitmap port and is initialized to the dimensions of the source > v2.A3
rectangle used in this command. If an offscreen bitmap port is > v2.A3
found, then it is deleted and re-initialized based on the dimensions > v2.A3
of this command. Once the offscreen bitmap port is initialized, the > v2.A3
contents of the source rectangle are copied to the port, occupying > v2.A3
the entire contents of the port. If the port number that is found > v2.A3
corresponds to the source port, then this command does nothing. > v2.A3
In older versions of RIPscrip (v1.54 and earlier), there was only > v2.A3
the screen and one offscreen bitmap port (the clipboard). Under 2.0, > v2.A3
you may have multiple offscreen bitmap ports (or clipboards). There > v2.A3
are three commands from RIPscrip 1.54 that pertain directly to the > v2.A3
concept of a clipboard (RIP_GET_IMAGE, RIP_PUT_IMAGE and > v2.A3
RIP_WRITE_ICON). To facilitate the integration of these commands in > v2.A3
the architecture of RIPscrip 2.0, a clipboard pointer is used. The > v2.A3
clipboard pointer is created with the RIP_GET_IMAGE command is used. > v2.A3
When this command is executed, the software will scan from port #1 > v2.A3
to port #35 (port #0 is skipped because it's the screen). It > v2.A3
searches for the first open (unused) port. Once found, the > v2.A3
clipboard pointer is set to point to this port. This allows the > v2.A3
RIP_PUT_IMAGE and RIP_WRITE_ICON command to know which port number > v2.A3
is associated with the clipboard. > v2.A3
When a RIP_RESET_WINDOWS command is executed, the contents of the > v2.A3
port table are cleared and the clipboard pointer is cleared (ie, > v2.A3
no clipboard exists after the operation is complete). > v2.A3
If the offscreen port cannot be defined for whatever reason, then > v2.A3
this command is not processed. The only thing that will be > v2.A3
accomplished in this case is that the clipboard pointer will be > v2.A3
cleared and no clipboard data will exist. > v2.A3
See the RIP_DEFINE_PORT command for more details about offscreen > v2.A3
ports and the size limitations of them. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 201
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.2.9 þ RIP_IMAGE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Display a scalable photo type image > v2.A0
Level: 1 > v2.A1
Command: p > v2.A1
Arguments: res:4 filename > v2.A0
Format: !|1p <res> <filename> > v2.A1
Example: !|1p0000filename.jpg > v2.A1
Uses Draw Color: NO > v2.A0
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: YES > v2.A3
Uses Font Style: NO > v2.A0
Uses Viewport: YES > v2.A0
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
This command will physically take a JPEG image file that is > v2.A1
located on the remote terminal's hard disk (like Icon files) and > v2.A0
display it in the image area set by a RIP_IMAGE_STYLE command. > v2.A0
See the RIP_IMAGE_STYLE command for more details on the options > v2.A0
available to set for image viewing and manipulation. > v2.A0
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 202
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.2.10 þ RIP_IMAGE_STYLE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Alter subsequent displayed image settings > v2.A0
Level: 1 > v2.A1
Command: i > v2.A0
Arguments: x0:XY y0:XY x1:XY y1:XY flags:4 res:12 > v2.A2
Format: !|1i <x0> <y0> <x1> <y1> <flags> <res> > v2.A1
Example: !|1i00008G5B0002000000000000 > v2.A1
Uses Draw Color: NO > v2.A0
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO > v2.A0
Uses Font Style: NO > v2.A0
Uses Viewport: YES > v2.A0
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
This command alters the settings for subsequently received (or > v2.A0
displayed) image files. RIPscrip supports the display of JPEG (Joint > v2.A0
Photographic Experts Group) files. These files can be transmitted to > v2.A1
the remote terminal and viewed. The <x0>, <y0>, <x1> and <y1> > v2.A1
parameters determine the size of the image area in the current > v2.A1
viewport. > v2.A1
If the <x0>, <y0>, <x1> and <y1> parameters are all set to zero (0), > v2.A0
then Image Viewing is disabled. Any explicitly viewed images, or any > v2.A0
images received with RIP_ENTER_BLOCK_MODE will be ignored (however > v2.A0
they will be deleted if flag 4 or 8 are active - see below). > v2.A0
If the image view area is larger than the current viewport size, then > v2.A0
the image area size will be adjusted according to the viewport's > v2.A0
current size to fit. > v2.A3
The image will be scaled to fit inside the specified display region. > v2.A1
If any of these coordinates extend beyond the dimensions of the > v2.A1
viewport, they will be adjusted to fit. > v2.A1
There is a <flags> parameter which alters some of the aspects of the > v2.A0
image being displayed. These flags can be OR'd together to create a > v2.A0
combination of various flag values. The possible flags are: > v2.A0
Value Description > v2.A0
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A0
1 Maintain image aspect ratio - This will keep the image > v2.A0
maintained in size no matter what the size of the display > v2.A0
region is. If the region isn't perfectly proportioned > v2.A0
in relation to the actual bitmap, then areas of the > v2.A0
display region above and below the image will be blacked > v2.A0
out (a margin), or possibly left and right depending on > v2.A1
proportions of the bitmap. This will yield a visually > v2.A1
accurate representation of the image. > v2.A1
2 Delete image definition when complete. This is only > v2.A1
useful for images received via RIP_ENTER_BLOCK_MODE or via > v2.A1
a UU-Encoded RIPscrip data block for text-only transfer. > v2.A1
When the image is rendered on the screen, it's definition > v2.A1
and/or local disk file is deleted automatically upon > v2.A1
completion of the drawing process. > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 203
4 Do not clear the image area to the current background > v2.A3
color before viewing the image. > v2.A3
8 Commit the color palette of the image (if any) to the > v2.A4
actual video hardware/color lookup table. This is typically > v2.A4
only of use when using the image style with GIF files. This > v2.A4
flag is ignored with JPEGs. When active, any color palette > v2.A4
in the image file to be displayed is used to alter the > v2.A4
current video color system to make the image show up as > v2.A4
close to the original image as possible. > v2.A4
If no RIP_IMAGE_STYLE command is processed before a JPEG image is to > v2.A3
be displayed, then the image area is defined to be the full size of > v2.A3
the viewport in whatever port is currently active. When a > v2.A3
RIP_RESET_WINDOWS or a RIP_HEADER command is received (ie, the > v2.A3
environment is reset), then the image area is also reset to the > v2.A3
maximum size of the current viewport. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 204
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.2.11 þ RIP_KILL_ENCLOSED_MOUSE_FIELDS ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Destroys any Mouse Fields inside a region > v2.A0
Level: 1 > v2.A0
Command: k > v2.A0
Arguments: x0:XY y0:XY x1:XY y1:XY flags:4 > v2.A2
Format: !|1k <x0> <y0> <x1> <y1> <flags> > v2.A3
Example: !|1k00003G2H > v2.A0
Uses Draw Color: NO > v2.A0
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: YES (see below) > v2.A2
Uses Write Mode: NO > v2.A0
Uses Font Style: NO > v2.A0
Uses Viewport: NO > v2.A0
Uses Port: NO > v2.A3
Uses Base Math: Current setting > v2.A2
This command will destroy any Mouse Fields or Mouse Active Buttons > v2.A0
that are contained inside the given rectangle or that intersect the > v2.A0
rectangle. The exact operation of this function is dependent on the > v2.A0
setting of the <flags> parameter. The <flags> parameter can combine > v2.A0
any of the following flags to determine the exact mode of operation: > v2.A0
FLAGS DESCRIPTION > v2.A0
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ > v2.A0
Region Specific Flags > v2.A0
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A0
1 Kill only fields completely contained (non-intersecting) > v2.A4
2 Kill only fields that intersect bounding rectangle > v2.A4
4 Kill fields entirely outside bounding rectangle > v2.A4
> If 1, 2 and 4 are not present, then NO fields > v2.A4
> are deleted. One of these flags must be supplied > v2.A4
> for any mouse fields to be deleted. > v2.A0
What Types of Fields not to Destroy > v2.A4
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A0
8 Don't destroy simple Mouse Fields > v2.A4
16 Don't destroy active Mouse Button fields > v2.A4
> If 8 and 16 are not present, then all types > v2.A4
> of mouse fields are destroyed. > v2.A0
What to do With the Affected Region(s) > v2.A0
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A0
32 Clear the affected field(s) to black (color 0) > v2.A0
64 Fill the affected field(s) with current fill color > v2.A0
and fill pattern (64 overides 32 in the case that > v2.A4
both of 32 and 64 are present). > v2.A4
128 Perform the 32/64 operations on the whole bounding > v2.A0
rectangle (based on Region Specific Flags). > v2.A0
> If 128 is omitted but 32 or 64 are used, > v2.A4
> then the mouse field's affected are > v2.A4
> cleared with the appropriate method. > v2.A0
> If 128 is present as well, then instead > v2.A0
> of clearing the individual mouse fields > v2.A0
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 205
> with the given method, the entire region > v2.A0
> specified by the Region Specific Flags > v2.A0
> is affected (ie, the entire interior > v2.A4
> of the bounding rectangle is cleared, > v2.A0
> etc). If 32, 64 and 128 are omitted, then > v2.A4
> the affected region/fields are left on > v2.A0
> the screen visually, but their mouse > v2.A0
> field definitions are destroyed internally. > v2.A0
> If 128 is used, but 32 and 64 are omitted then > v2.A4
> nothing is done visually either. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 206
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.2.12 þ RIP_KILL_MOUSE_FIELDS ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Destroys all previously defined hot mouse regions
Level: 1
Command: K
Arguments: <none>
Format: !|1K
Example: !|1K
Uses Draw Color: NO
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO
Uses Font Style: NO
Uses Viewport: NO > v1.54
Uses Port: NO > v2.A3
Uses Base Math: N/A > v2.A2
This command will "forget" all Mouse Regions. Use it at the beginning
of each Scene, so that one scene's Mouse Regions don't get used in
another.
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 207
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.2.13 þ RIP_LOAD_BITMAP ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Loads and displays a disk-based bitmap to screen > v2.A1
Level: 1 > v2.A1
Command: b > v2.A1
Arguments: x0:XY y0:XY x1:XY y1:XY duplicate_port:1 mode:1 > v2.A3
flags:2 trans_color:2 res:4 filename > v2.A4
Format: !|1b <x0> <y0> <x1> <y1> <duplicate_port> <mode> > v2.A4
<flags> <trans_color> <res> <filename> > v2.A4
Example: !|1b001122330100000000button > v2.A4
Uses Draw Color: NO > v2.A1
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO > v2.A1
Uses Font Style: NO > v2.A1
Uses Viewport: YES > v2.A1
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
This command is nearly identical in nature to the RIP_LOAD_ICON > v2.A1
command but it is more flexible in that it supports arbitrary scaling > v2.A3
of the bitmap to the destination screen and it supports dithering > v2.A1
methods. It can be made to exactly match the RIP_LOAD_ICON command. > v2.A1
This command instructs the terminal to read a bitmap from disk and > v2.A3
display it at the given upper-left (x0,y0) location. If the (x1,y1) > v2.A1
values are non-zero, then it specifies the lower-right corner on the > v2.A1
screen for the bitmap's display region. If the bitmap differs in > v2.A3
size than the destination rectangle, then it is scaled (stretched) to > v2.A3
fit into the proper region. If the values of X1 and Y1 are zero, > v2.A3
then the bitmap is shown verbatim in whatever resolution of the > v2.A1
disk based file (this is more like the RIP_LOAD_ICON command above). > v2.A1
The .BMP file extension does not need to be included as part of the > v2.A1
filename. If omitted, it will automatically be appended to the > v2.A1
filename. If an extension is provided, it will be used verbatim. > v2.A1
If the width or height of the Icon would make it go off the right or > v2.A1
bottom edge of the viewport, the bitmap will be clipped. The <mode> > v2.A1
parameter defines the modes in which the Icon will be displayed on > v2.A1
the screen. The modes are identical to the RIP_PUT_IMAGE and the > v2.A3
RIP_LOAD_ICON commands, and are as follows: > v2.A3
Mode Description Logical > v2.A1
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A1
0 Paste the image onto the port normally (COPY) > v2.A3
1 Exclusive-OR image with one already on the port (XOR) > v2.A3
2 Logically OR image with one already on the port (OR) > v2.A3
3 Logically AND image with one already on the port (AND) > v2.A3
4 Paste the inverse of the image onto the port (NOT) > v2.A3
The <flags> parameter contains important bit-field values that can be
OR'd together to produce a number of desired operations. The
possible flag values are:
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 208
Value Description > v2.A4
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A4
1 Load the image onto the port and make a copy to another > v2.A4
port. This is used to make a carbon copy of the image once > v2.A4
it is placed onto the active drawing port. This means that > v2.A4
after any color palette manipulation, dithering and viewport > v2.A4
clipping, the final image is copied to some other drawing > v2.A4
port as a type of backup copy. This is often used to make > v2.A4
high-speed copies of the same image without having to > v2.A4
continually access the disk in order to load the image over > v2.A4
and over again. If this flag is specified, then the > v2.A4
<duplicate_port> parameter determines which port number will > v2.A4
receive the loaded image. If you specify a value of 0 for > v2.A4
the duplicate port number, then it will act like the > v2.A4
RIP_LOAD_ICON command's clipboard mode - it loads the image > v2.A4
onto the clipboard port specified by the clipboard pointer, > v2.A4
or if the pointer hasn't been used yet, then it places the > v2.A4
image on a newly created offscreen bitmap port located in > v2.A4
the first unused port number. The offscreen port will be > v2.A4
redefined with the new bitmap's dimensions. If the > v2.A4
<duplicate_port> parameter specifies a value from 1-35, then > v2.A4
it indicates a specific port number. That port, if it > v2.A4
doesn't exist, will be defined as an offscreen bitmap port > v2.A4
with the exact same dimensions as the final bitmap. If it > v2.A4
does exist, then the port is deleted (even if it's a > v2.A4
screen-port) and redefined as an offscreen bitmap port with > v2.A4
the new bitmap's dimensions. After the duplicate port is > v2.A4
defined, the image is copied to it. If the current drawing > v2.A4
port happens to be the same port used for the duplicate > v2.A4
port, then this flag is ignored. If this flag is omitted, > v2.A4
then no duplicate copy is made of the image and the > v2.A4
<duplicate_port> parameter of this command is ignored. > v2.A4
2 This flag indicates to take the color palette in the bitmap > v2.A4
file and activate it in the current color lookup table. > v2.A4
This means that the color palette in the bitmap is copied > v2.A4
into the video device's color palette (and into RIPscrip's). > v2.A4
This means that if any graphics are already on the screen > v2.A4
when this happens, they might change in color as soon as > v2.A4
the bitmap is loaded (this is due to the fact that the > v2.A4
color palette is changed). If the number of colors in the > v2.A4
bitmap exceeds the number of colors in the active display > v2.A4
device, then the actual color palette in use is used for the > v2.A4
bitmap instead of the internal bitmap palette. If the > v2.A4
number of colors in the bitmap is equal or less than the > v2.A4
number of colors for the active video mode then the image > v2.A4
will be displayed exactly as it was intended. If this is > v2.A4
the case, then no dithering is necessary on the image so > v2.A4
the dither flag (see below) parameter is ignored. If the > v2.A4
terminal is running in a mode that doesn't allow for a color > v2.A4
palette in the video hardware, then dithering is ignored and > v2.A4
the color palette inside the bitmap file is ignored - this > v2.A4
is because the system is already running in a 32K, 64K or > v2.A4
24-bit color mode and there are more than plenty colors to > v2.A4
represent the bitmap perfectly. > v2.A4
If this flag is omitted, then the bitmap will use the > v2.A4
current screen's color palette. Typically this will be the > v2.A4
default color palette for use with RIPscrip but it might be > v2.A4
different. This means that any pixel of the bitmap that is > v2.A4
drawn to the screen is shown in whatever actual color is the > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 209
absolute closest to the color palette number corresponding > v2.A4
to that pixel in the bitmap (dithering may still apply - > v2.A4
see below). > v2.A4
If the bitmap has no color palette (eg, 24-bit bitmaps), > v2.A4
then this flag is ignored. > v2.A4
4 This flag enables auto-dithering mode. This is an > v2.A4
intelligent way of determining if dithering should be > v2.A4
performed or not. If there are more colors in the bitmap > v2.A4
than in the video device or if the bitmap's color palette > v2.A4
is not used to set the video device, then dithering is used > v2.A4
to get the image as close to the original color scheme as > v2.A4
possible. If the bitmap's palette is committed to the video > v2.A4
device then no dithering is necessary because the color > v2.A4
palette in use has all (or more) of the necessary colors to > v2.A4
display the image. 24-bit images will always enable > v2.A4
dithering if this mode is used unless the terminal is > v2.A4
running in 24-bit mode. Dithering slows down image drawing > v2.A4
so it should only be used for images that really need it. > v2.A4
If this flag is omitted, then no dither is performed at all. > v2.A4
If the number of colors in the bitmap is higher than the > v2.A4
number of colors in the display device then this will yield > v2.A4
a lower quality image. But if there are more colors in the > v2.A4
display device than the bitmap then the quality of the image > v2.A4
will be close to the actual bitmap (or exact). > v2.A4
8 Place the bitmap image onto the screen with one of its > v2.A4
colors "transparent". This means that the color index > v2.A4
specified in the <trans_color> parameter will be treated as > v2.A4
a transparent color. This color will "show through" to > v2.A4
whatever graphics were behind the bitmap. This applies to > v2.A4
all forms of bitmaps (monochrome through 24-bit). With > v2.A4
bitmaps that have no palette, then only colors in the 24-bit > v2.A4
range that "map" to this particular transparent color will > v2.A4
actually appear as transparent. When used in combination > v2.A4
with dithering (when dithering is performed), transparent > v2.A4
regions could be "grainy" in appearance due to the dithering > v2.A4
process. > v2.A4
If the bitmap is placed onto a duplicate port, then it is done in a > v2.A3
specific order. The image is shown on the current drawing port (with > v2.A4
possible transparency) then the resulting image (after color palette > v2.A4
translation and dithering are performed) is placed onto the duplicate > v2.A3
port. This is done so that the image in the duplicate port will > v2.A3
already have its processing done on it so that subsequent duplicate > v2.A3
operations will not require any color translation or dithering (a > v2.A3
speed consideration). If transparency mode is used, then the image > v2.A4
duplicated includes any graphics "behind" the image that show through > v2.A4
in the transparent locations. > v2.A4
The <filename> parameter must not contain any sub-directory or path > v2.A1
information and must specify a valid bitmap file name. If the bitmap > v2.A3
cannot be located or an error occurs on the disk, then a box should > v2.A1
be displayed on screen indicating that the given bitmap could not be > v2.A3
loaded. This visual prompt indicates that something is amiss to the > v2.A3
end-user. The size of the box will be as big as the destination > v2.A3
bitmap image on screen. If the X1 and Y1 are zero, then some > v2.A3
suitable box should be drawn. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 210
NOTE: The 4-byte <res> parameter is RESERVED FOR THE FUTURE > v2.A4
and should be set to "0000". > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 211
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.2.14 þ RIP_LOAD_ICON ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Loads and displays a disk-based icon to current port > v2.A3
Level: 1
Command: I
Arguments: x:XY y:XY mode:2 clipboard:1 scale:1 res:1 filename > v2.A2
Format: !|1I <x> <y> <mode> <clipboard> <scale> <res> > v2.A3
<filename> > v2.A3
Example: !|1I001101010button > v2.A2
Uses Draw Color: NO
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO
Uses Font Style: NO
Uses Viewport: YES > v1.54
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
This command instructs the terminal to read an icon from disk and
display it at the given upper-left (x,y) location in the current
drawing port. If the width or height of the Icon would make it go > v2.A3
off the right or left edge of the port's viewport, it will be > v2.A3
truncated to fit inside the viewport. > v2.A3
The <mode> parameter defines the modes in which the Icon will be
displayed on the current drawing port. The modes are identical to > v2.A3
the RIP_PUT_IMAGE command, and are as follows:
The .BMP file extension does not need to be included as part of the > v2.A1
filename. If omitted, it will automatically be appended to the
filename. If an extension is provided, it will be used verbatim.
Mode Description Logical
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
00 Paste the image on-screen normally (COPY) > v2.A3
01 Exclusive-OR image with the one already on screen (XOR) > v2.A3
02 Logically OR image with the one already on screen (OR) > v2.A3
03 Logically AND image with the one already on screen (AND) > v2.A3
04 Paste the inverse of the image on the screen (NOT) > v2.A3
The <clipboard> parameter can be one of two values: > v2.A2
Value Description > v2.A0
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A0
0 Load the image onto the port verbatim > v2.A3
1 Load the image onto the port and put it onto clipboard port > v2.A3
If the <clipboard> parameter specifies to put the icon's image onto > v2.A3
a clipboard port, the order of operation is the following: > v2.A3
1. The image is loaded onto the current drawing port, > v2.A3
truncated to the viewport if necessary. > v2.A3
2. A RIP_GET_IMAGE command is performed transparently > v2.A3
to copy the resultant image in the current drawing > v2.A3
port onto the clipboard port (it will be defined if > v2.A3
necessary, otherwise it will be re-defined). If > v2.A3
the clipboard port is the same port as the current > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 212
drawing port, then this phase is omitted. The > v2.A3
rectangle copied to the clipboard port is based on > v2.A3
the resultant, possibly truncated image. > v2.A3
The <scale> parameter indicates whether the icon should be scaled to > v2.A2
the device coordinates when it is loaded. A `1' indicates that it > v2.A2
should be scaled, and a `0' indicates that it not should be scaled. > v2.A2
This is important when dealing with older RIPscrip 1.54 icons. Icons > v2.A3
that are loaded with RIPscrip 1.54 need to be resolution independent. > v2.A3
This is performed when this command has a 1 in the scale parameter's > v2.A3
position. All scaling is performed in this command as if the icon > v2.A3
were created in a 640x350 environment. So, if an icon is loaded that > v2.A3
is 35 pixels tall, and it is displayed in a 640x480 environment, it > v2.A3
will be stretched vertically to make it 48 pixels tall. This makes > v2.A3
sure that icons loaded in this mode are displayed at the correct size > v2.A3
so that they are resolution independent. > v2.A3
NOTE: By default this value must be set to `1' (scaled)! > v2.A2
The <filename> parameter must not contain any sub-directory or path
information and must specify a valid Icon file name. If the Icon
cannot be located or an error occurs on the disk, then a box should
be displayed on screen indicating that the given Icon File could not
be loaded. If this happens, then no clipboard operations are > v2.A3
performed - except that the clipboard is cleared and the clipboard > v2.A3
pointer is cleared as well. This visual prompt indicates that > v2.A3
something is amiss to the end-user.
NOTE: The <res> parameter is reserved for future use by > v2.A2
TeleGrafix Communications, Inc.. It should be set to 0 > v2.A2
for compatibility with future releases. > v2.A2
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 213
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.2.15 þ RIP_MOUSE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Defines a rectangular hot mouse field
Level: 1
Command: M
Arguments: num:2 x0:XY y0:XY x1:XY y1:XY clk:1 clr:1 res:5 text > v2.A2
Format: !|1M <num> <x0><y0><x1><y1> <clk><clr><res><text>
Example: !|1M00001122331100000host command^M
Uses Draw Color: NO
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO
Uses Font Style: NO
Uses Viewport: YES > v1.54
Uses Port: NO (screen ports only) > v2.A3
Uses Base Math: Current setting > v2.A2
This command ties together three things:
þ A region on the screen
þ A mouse-click event
þ A string of text to be transmitted by the terminal.
This command defines a rectangular region on the screen that functions
as a "hot" mouse area. If the user clicks the [left] mouse button
while pointing inside the region, then the terminal must transmit the
<text> string to the Host. The (x0,y0) parameter MUST be the upper-
left corner, and (x1,y1) MUST be the lower-right corner of the region.
The <num> parameter used to be used in the older RIPscrip v1.0 > v1.54
specification but is now obsolete. For upwards compatibility, it > v1.54
should be set to "00". > v1.54
The <clk> parameter, if 1, indicates that the region should be visibly
inverted while the mouse button is down. This offers visual feedback.
If <clk> is 0, the region will not be inverted while clicked.
The <clr> parameter, if 1, will physically zoom the text window to
full screen size and clear the screen. This is useful if the <text>
parameter instructs the host to enter an area of the System that
doesn't support RIPscrip graphics.
The <text> parameter is a Host command that gets sent when the field
is clicked. You may use a caret (^) or a backquote (`) to represent > v2.A3
control characters, (e.g., ^M for carriage return, `G, ^C, etc.). > v2.A3
Mouse fields may use Data text variables, active text variables, pick > v2.A3
lists, control characters and local file playback directives. At > v2.A3
no time are templates permitted in simple mouse fields. See the > v2.A3
section on host commands for more details about these types of > v2.A3
features of RIPscrip. > v2.A3
Mouse fields are always created relative to port #0 (the screen > v2.A3
port). Under no circumstances are mouse fields allowed in offscreen > v2.A3
drawing ports - you can't have a clickable mouse area in a region > v2.A3
that cannot be clicked (ie, off the screen). If the current drawing > v2.A3
port is an offscreen port, or even a port other than port #0, then > v2.A3
the mouse field is defined relative to screen port #0 for the > v2.A3
purposes of defining its position. The same applies to mouse-based > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 214
buttons (see the RIP_BUTTON command). > v2.A3
Mouse fields that extend partially outside of a viewport are > v2.A3
truncated to fit inside the viewport. > v2.A3
When this command is stored in-memory, it is converted to global > v1.54
screen coordinates (for internal storage only). This makes it so > v1.54
that if you have mouse regions defined in multiple different > v1.54
viewports, that each field will be properly inverted at the right > v1.54
location regardless of the currently defined viewport. > v1.54
NOTE: All Mouse Fields are scanned in "last in, first out" order. > v1.54
This means that the last-most received Mouse Field will be > v1.54
the first one scanned for a mouse click. You are limited to > v1.54
a maximum of 128 Mouse Regions or Mouse Buttons (128 total). > v1.54
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 215
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.2.16 þ RIP_PLAY_AUDIO ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Play a local digitized audio file on the terminal > v2.A3
Level: 1 > v2.A3
Command: w > v2.A3
Arguments: res:4 filename > v2.A3
Format: !|1w <res> <filename> > v2.A3
Example: !|1w0000filename.wav > v2.A3
Uses Draw Color: NO > v2.A3
Uses Back Color: NO > v2.A3
Uses Line Style: NO > v2.A3
Uses Fill Style: NO > v2.A3
Uses Write Mode: NO > v2.A3
Uses Font Style: NO > v2.A3
Uses Viewport: NO > v2.A3
Uses Port: NO > v2.A3
Uses Base Math: NO > v2.A3
This command will physically start a local .WAV file to play back on > v2.A3
the user's remote terminal. The audio file must already exist in the > v2.A3
user's hard disk in the same location as their bitmapped icons. If > v2.A3
the file doesn't exist, then this command does nothing. If you > v2.A3
specify the <filename> parameter as $OFF$ then you will in effect be > v2.A3
shutting off any currnetly running sound file. If a sound is already > v2.A3
playing when this command is received, the older file that was > v2.A3
playing will be terminated in place for the new file. You may use > v2.A3
RIP_ENTER_BLOCK_MODE to transfer audio files to the user's computer > v2.A3
for subsequent playback. > v2.A3
NOTE: The <res> parameter is for future expansion. For > v2.A3
compatibility with future relases of RIPscrip, it > v2.A3
should be set to "0000". > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 216
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.2.17 þ RIP_PUT_IMAGE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Pastes the clipboard port's contents to another port > v2.A3
Level: 1
Command: P
Arguments: x:XY y:XY mode:2 res:1 > v2.A3
Format: !|1P <x> <y> <mode> <res> > v2.A3
Example: !|1P0011010
Uses Draw Color: NO
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO
Uses Font Style: NO
Uses Viewport: YES > v1.54
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
This command takes the contents of the port identified by the > v2.A3
clipboard pointer (see the RIP_GET_IMAGE command above) and copies > v2.A3
it to a position (x,y) in the currently active drawing port. If the > v2.A3
two ports refer to the same port number, then this command is > v2.A3
ignored. If the clipboard pointer is clear (ie, no clipboard port > v2.A3
is in use), then this command is also ignored. > v2.A3
The area in the active drawing port that is overwritten with the > v2.A3
graphics data is determined by the dimensions of the clipboard port > v2.A3
previously established with a RIP_GET_IMAGE function. > v2.A3
The position on the active drawing port that is to receive the > v2.A3
image is specified by the (x,y) parameters. These define the upper > v2.A3
left corner that will be the rectangle to receive the image data. > v2.A3
If any part of the image would go off the edge of the viewport (or > v2.A3
the screen) then it is truncated appropriately. > v2.A3
The image that is retrieved from the clipboard port does so based on > v2.A3
the port's viewport (the entire contents of the viewport are copied > v2.A3
to the active drawing port). If the clipboard port is only used with > v2.A3
the RIP_GET_IMAGE command, then the viewport will be the full size of > v2.A3
the port. If however, some port related commands are used on this > v2.A3
clipboard port, then it is possible to alter the viewport inside this > v2.A3
port. This gives you the ability to paste sub-areas of the port's > v2.A3
actual image onto the destination drawing port. > v2.A3
The <mode> parameter defines "how" the image will be pasted on the
active drawing port: > v2.A3
Mode Description Logical
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
00 Paste the image on-screen normally (COPY) > v2.A3
01 Exclusive-OR image with the one already in the port (XOR) > v2.A3
02 Logically OR image with the one already in the port (OR) > v2.A3
03 Logically AND image with the one already in the port (AND) > v2.A3
04 Paste the inverse of the image in the port (NOT) > v2.A3
NOTE: The 1-byte <res> parameter is RESERVED FOR FUTURE USE
and should be set to zero.
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 217
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.2.18 þ RIP_QUERY ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Query the contents of a text variable
Level: 1
Command: ä
Arguments: mode:1 window_num:1 res:2 query_text > v2.A0
Format: !|1<escape> <mode> <window_num> <res> <query_text>
Example: !|1<escape>2Q00this is a query $COMMAND$^m
Uses Draw Color: NO
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO
Uses Font Style: NO
Uses Viewport: NO > v1.54
Uses Port: NO > v2.A3
Uses Base Math: Current setting > v2.A2
NOTE: ä is used to indicate the Escape character (ASCII 27 or ESC).
The Query Text Variable RIPscrip command instructs the terminal to
immediately respond with some piece of information, whether
statically stored (i.e., in a database), stored internally in RAM
(dynamic information), or pre-defined Text Variables.
This command is unique in RIPscrip in the fact that the command
character that is used is NOT a printable character. We use the
escape character (ASCII 27) to introduce this command as a measure of
security. Since the query command can query the terminal for some
critical (potentially private) information, you would not want a user
to be able to query another user's terminal for something like his
address information, or something that he wouldn't want to otherwise
divulge to unauthorized people. Since most hosts do not allow the
user to enter an escape character, this character is ideal for this
purpose. Using escape allows only the Host (under most
circumstances) to be in control of any queries.
NOTE: This command is very flexible in that you can specify
control characters, pick-list definitions and Text Variables. > v2.A1
See the section entitled HOST COMMANDS for a more detailed
explanation of these features.
Whether the information is transmitted instantly or not is dependent
on the <mode> parameter. The <mode> parameter determines when data
queries are processed. The possible settings for the <mode>
parameter are as follows:
Mode Description
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
0 Process the query command NOW (upon receipt)
1 Process when mouse clicked in the current Graphics > v2.A0
Viewport > v2.A0
2 Process when mouse clicked in the current Text Window (any > v2.A0
text variables that return X or Y mouse coordinates return > v2.A0
TEXT coordinates, not graphics coordinates in this mode. > v2.A0
These coordinates are two-digit values instead of the > v2.A0
graphical values that are four digits). > v2.A0
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 218
3 Process when mouse clicked in the Graphics Viewport > v2.A0
specified in the <window_num> parameter. If that viewport > v2.A0
doesn't exist (hasn't been defined yet), then this query > v2.A0
command is ignored. > v2.A0
4 Process when mouse clicked in the Text Window specified > v2.A0
in the <window_num> parameter. Any text variables that > v2.A0
return X or Y mouse coordinates return TEXT coordinates > v2.A0
based on that window's MicroANSI text font sizes, not > v2.A0
graphics coordinates in this mode. These coordinates are > v2.A0
two-digit values instead of the graphical values that are > v2.A0
four digits). > v2.A0
Note that modes 1-4 do not return the results of the Query instantly. > v2.A0
They query commands are processed when the user clicks the mouse
either in the text window, or in the graphics window respectively.
Which text window or graphics viewport is based both on the value of > v2.A0
<mode> parameter and on the <window_num> parameter. If the <mode> is > v2.A0
either a 1 or 2, then the current window/viewports are the areas that > v2.A0
are acted upon. Modes 3 and 4 will take the window number from the > v2.A0
<window_num> parameter as the text window/viewport to act upon. If > v2.A0
the associated window or viewport are not defined, then the query > v2.A0
command is ignored. These "queries after mouse clicks" are only > v2.A0
acted upon if the user is clicking on something other than a Button
or a Mouse Field. To disable these two special "deferred" query
modes, issue the same command with the query string of $OFF$. This
will disable this mode. Providing a <text> parameter of anything
other than $OFF$ will produce a revised query command (active).
If more than one query command can be acted uon (ie, multiple > v2.A4
viewport queries and/or text window queries are found that the mouse > v2.A4
was clicked inside of), then processing of queries happens in a very > v2.A4
specific order. Note that all affected queries are processed - none > v2.A4
are skipped. The order in which queries are acted upon are as > v2.A4
follows: > v2.A4
1) The port/viewport table is scanned from 0-35. If a query > v2.A4
is found for a port that isn't deactivated, and the mouse > v2.A4
was clicked inside that region (for screen ports only), then > v2.A4
the query is processed and the next port/viewport is checked. > v2.A4
2) The text window table is scanned from 0-35. If a query > v2.A4
is found for a text window that isn't deactivated, and the > v2.A4
mouse was clicked inside that window's display area, then > v2.A4
the query is processed and the next text window is checked. > v2.A4
3) If a "current viewport" query, otherwise known as a floating > v2.A4
viewport query, is found and the mouse was clicked inside the > v2.A4
current viewport, then the floating viewport query is > v2.A4
processed. > v2.A4
4) If a "current text window" query, otherwise known as a > v2.A4
floating text window query, is found and the mouse was > v2.A4
clicked inside the text window's display area, then the > v2.A4
floating text window query is processed. > v2.A4
When the user clicks the mouse down, then all queries are checked. > v2.A4
The point where the mouse was originally clicked is the one that is > v2.A4
checked for with the queries. After all queries are processed, then > v2.A4
the mouse click is ignored until the user releases the mouse button. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 219
Basically put, a Query command will be immediately acted upon by the
Terminal program when received if the <mode> is 0. The Query > v2.A0
command's <text> parameter can contain any number of Host Command
"segments", which can instruct the terminal "how to" send data to the
host, and more specifically, what data to send to the host.
Some examples of query statements might be any of the following:
^m Send a carriage return to the BBS now!
My name is $FULL_NAME$^m Send text "My name is <insert-name-
here>" followed by a carriage return
to the BBS. The <insert-name-here>
will be replaced with whatever the
variable $FULL_NAME$ contains.
See the section entitled HOST COMMANDS for a detailed explanation of
Host Commands, and what you can do with the Query command.
NOTE: The <res> parameter is reserved for future use by TeleGrafix
Communications, Inc.. It should be set to 000 for
compatibility with future releases.
It should be mentioned that text window queries are performed > v2.A1
before any viewport queries when resident queries are > v2.A1
concerned. > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 220
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.2.19 þ RIP_READ_SCENE ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Playback local .RIP file
Level: 1
Command: R
Arguments: res:8 filename...
Format: !|1R <res> <filename>
Example: !|1R00000000testfile.rip
Uses Draw Color: YES
Uses Back Color: YES > v2.A1
Uses Line Style: YES > v2.A2
Uses Fill Style: YES > v2.A2
Uses Write Mode: YES
Uses Font Style: YES
Uses Viewport: NO > v1.54
Uses Port: YES (dependent on the contents of the source file) > v2.A3
Uses Base Math: Current setting > v2.A2
This command instructs the remote terminal to playback a local .RIP
file. The current execution of RIPscrip commands will be temporarily
suspended and the contents of the designated RIP file will begin
executing. Regardless of whether or not the current RIPscrip code
coming across the modem is in the middle of a line or not, the RIP
playback file will be assumed to start at the beginning of a line.
Therefore, if a RIP_READ_SCENE command is located in a .RIP file, it
must be the very last command on the line, followed by a carriage
return instead of a command delimiter (|). This ensures that the
loaded .RIP file will begin executing properly with the correct
delimiters found in the correct places.
The RIP playback file can alter colors, fonts, or whatever. Once the
playback of the file is complete, the remaining RIPscrip code that
was temporarily suspended will be resume execution. Any changes that
appeared in the loaded playback file will remain in effect when the
resumed code is processed. In other words, if you change a color or
a font in the playback file and leave them changed, they will remain
in effect during the resumed execution.
NOTE: The <res> parameter is reserved for future development by
TeleGrafix. It should be set to "00000000" for compatibility
with future releases.
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 221
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.2.20 þ RIP_REGION_TEXT ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Display a line of text in rectangular text region
Level: 1
Command: t
Arguments: justify:1 and text-string
Format: !|1t <justify> <text-string>
Example: !|1t1This is a text line to be justified
Uses Draw Color: YES
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: YES
Uses Font Style: YES
Uses Viewport: YES > v1.54
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
A number of these commands may come sandwiched between the
RIP_BEGIN_TEXT and RIP_END_TEXT commands. The <text-string> should > v2.A3
already word-wrapped in such a way that it will fit inside the
rectangular region based on the current font, font size, and drawing
color.
There are four possible settings for the <justify> parameter: > v2.A3
Justify Description
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
0 Left justify this line
1 Right/left "full" justify this line
If a text line falls off the bottom of the region, it is discarded --
the rectangular Text Region does not scroll.
This command is intended to import some sort of text file document > v1.54
directly into a RIPscrip scene and format it nicely to fit inside a > v1.54
simple rectangular area. If the <justify> parameter is set to a > v1.54
value of "1" for a given RIP_REGION_TEXT line, then that line will be > v1.54
justified to both the left and right margins (the RIP_BEGIN_TEXT > v1.54
boundaries). This is so that the displayed text aligns on both sides > v1.54
with the invisible boundaries. This "justification" is done by > v1.54
splitting each RIP_REGION_TEXT line up into chunks of word-groups, > v1.54
broken up at their "white-space" locations. Each spacer is then > v1.54
padded by however many pixels are necessary to keep each spacer > v1.54
of approximately equal size. Only enough spare pixels are added to > v2.A3
make sure that the right-edge of the text region aligns with the > v1.54
right border of the boundary. The result is a nicely formatted text > v1.54
block. > v1.54
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 222
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
³ 3.4.2.21 þ RIP_SCROLL (this command was formerly RIP_COPY_REGION)
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
Function: Copy (scroll) screen region up/down > v2.A1
Level: 1
Command: G
Arguments: x0:XY y0:XY x1:XY y1:XY mode:1 res:1 dest_line:2 > v2.A2
Format: !|1G <x0> <y0> <x1> <y1> <mode> <res> <dest_line> > v2.A1
Example: !|1G080G140M0005
Uses Draw Color: NO
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO
Uses Font Style: NO
Uses Viewport: NO > v1.54
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A2
This command physically "copies" a rectangular region of the graphics
screen up or down. The <dest_line> parameter is the Y position that
is the destination scan line to receive the region. The Destination
of the copy can overlap the original region, but cannot be on the
same line. You cannot move the image area left or right at all. This
command is designated for vertical scrolling of graphical data either
up or down.
This is one of the only graphical output commands that DOES NOT > v1.54
adhere to the RIP_VIEWPORT command. In other words, you can scroll > v1.54
graphical data outside the current graphical viewport (even over the > v1.54
text window!). However, it does adhere to the boundaries of the > v2.A3
current drawing port. > v2.A3
The <mode> parameter instructs the terminal what to do with the > v2.A1
part of the source rectangle that isn't covered up by the scrolled > v2.A1
data. You may specify several things to happen as defined by the > v2.A1
mode values below: > v2.A1
Mode Description > v2.A1
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A1
0 Do nothing - leave the old graphics on the screen > v2.A1
1 Fill the old graphical area with the current drawing > v2.A1
color (solid fill in COPY mode). > v2.A1
2 Fill the old graphical area with the current background > v2.A1
drawing color (solid fill in COPY mode). > v2.A1
3 Fill the area with the current fill color (solid fill in > v2.A1
COPY mode). Fill pattern/styles are not used for this. > v2.A1
4 Fill the old graphical area with the current fill > v2.A1
style/pattern in the current fill color. > v2.A1
5 Erase the affected area entirely to black. > v2.A1
6 Fill the affected area with the color of a pixel from > v2.A1
one of the corners of the affected rectangle. If the > v2.A1
image area was scrolled up, then the color is taken > v2.A1
from the lower-right most pixel from the old graphical > v2.A1
rectangle (left exposed). If the data is scrolled > v2.A1
down, then the rectangle is filled in with the color > v2.A1
of the pixel in the upper-left most pixel. This is > v2.A1
mode is used so that if the area is a multi-colored > v2.A1
graphic, that a suitable fill color is used. > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 223
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.2.22 þ RIP_SET_MOUSE_CURSOR ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Sets the mouse cursor (pointer) to various shapes > v2.A1
Level: 1 > v2.A1
Command: c > v2.A1
Arguments: cursor_style:2 res:4 > v2.A1
Format: !|1c <cursor_style> <res> > v2.A1
Example: !|1c030000 > v2.A1
Uses Draw Color: NO > v2.A1
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO > v2.A1
Uses Font Style: NO > v2.A1
Uses Viewport: NO > v2.A1
Uses Port: NO > v2.A3
Uses Base Math: Current setting > v2.A2
This command allows you to alter the current mouse cursor shape that > v2.A1
is shown on the screen. This feature lets you change the cursor to > v2.A1
another shape to give the user of the terminal an idea that something > v2.A1
is going on. For example, changing the cursor to the shape of an > v2.A1
hourglass or a watch could give the idea that they should wait for a > v2.A1
moment because something is going on. > v2.A1
The <cursor_style> parameter is an ID number that specifies which > v2.A1
cursor style should be activated. The possible values for this > v2.A1
parameter are: > v2.A1
Style Description > v2.A4
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A4
00 Standard "left-leaning" arrow cursor (default) > v2.A4
01 Wrist watch cursor > v2.A4
02 Cross-hair cursor > v2.A4
03 I-bar cursor (for text editing) > v2.A4
04 Pointing finger cursor > v2.A4
05 Hand held up cursor > v2.A4
06 Hourglass cursor > v2.A4
When a RIP_RESET_WINDOWS or a RIP_HEADER command is executed, the > v2.A1
mouse cursor is automatically reset to the default, standard pointer > v2.A1
cursor. > v2.A1
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 224
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.2.23 þ RIP_WRITE_ICON ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Write contents of the clipboard port to disk > v2.A2
Level: 1
Command: W
Arguments: res:1 filename > v2.A3
Format: !|1W <res> <filename> > v2.A3
Example: !|1W0filename.icn
Uses Draw Color: NO
Uses Back Color: NO > v2.A1
Uses Line Style: NO > v2.A2
Uses Fill Style: NO > v2.A2
Uses Write Mode: NO
Uses Font Style: NO
Uses Viewport: NO > v1.54
Uses Port: NO > v2.A3
Uses Base Math: Current setting > v2.A2
This command takes the contents of the clipboard port and writes it > v2.A3
to disk as a BMP type bitmap file. The image written to disk is the > v2.A3
image contained inside the viewport of the clipboard port (see the > v2.A3
RIP_PUT_IMAGE command for more details about viewports and the > v2.A3
clipboard port). If the clipboard pointer indicates that there is > v2.A3
no clipboard in use, then this command does nothing. > v2.A3
Once the file is written to disk, you may subsequently use the > v2.A3
RIP_LOAD_ICON or RIP_LOAD_BITMAP commands to load the icon back onto > v2.A3
a drawing port. > v2.A3
Path or sub-directory information is not allowed in the filename > v2.A3
portion of the command. If an Icon by the same name already exists > v2.A3
on disk, it is overwritten. > v2.A3
NOTE: The <res> parameter is reserved for future use by TeleGrafix. > v2.A3
For future compatibility, it should be set to "0". > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 225
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º 3.4.3 þ LEVEL-2 RIPscrip COMMANDS º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
Level-2 commands are "context" related commands. They are used when > v2.A4
switching from one data table to another, or are actually commands > v2.A4
for manipulating actual data tables, or their entries. > v2.A4
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 226
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.3.1 þ RIP_DEFINE_PORT ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Define a drawing port > v2.A3
Level: 2 > v2.A3
Command: P > v2.A3
Arguments: port-num:1 x0:XY y0:XY x1:XY y1:XY > v2.A3
flags:4 res:4 > v2.A3
Format: !|2P <port-num> <x0> <y0> <x1> <y1> <flags> <res> > v2.A3
Example: !|2P300002F2F00010000 > v2.A3
Uses Draw Color: NO > v2.A3
Uses Back Color: NO > v2.A3
Uses Line Style: NO > v2.A3
Uses Fill Style: NO > v2.A3
Uses Write Mode: NO > v2.A3
Uses Font Style: NO > v2.A3
Uses Viewport: YES > v2.A3
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A3
This command physically defines a new graphical drawing port. The > v2.A3
port can be either onscreen (a video port) or an offscreen bitmap > v2.A3
port (a Clipboard Port). When defined, the newly created port > v2.A3
becomes the current graphical drawing port (if the <flags> say to - > v2.A3
see below). > v2.A3
If the <port-num> that you are trying to define is already defined, > v2.A3
and the port isn't protected, it is redefined (ie, deleted then > v2.A3
re-created using the new parameters). If the port is defined and > v2.A3
protected, then the port definition operation will fail and the port > v2.A3
will be switched back to the screen port (#0) as previously > v2.A3
described. > v2.A3
The <port-num> parameter determines which entry in the master Port > v2.A3
Table you wish to define. When working with ports, you need to be > v2.A3
concerned about the port number you're working with - that's the > v2.A3
location of the port, and that's how you access it when you need to > v2.A3
switch ports - by port number. You are allows up to 36 separate > v2.A3
grpahical ports (0-35 in decimal). Port #0 cannot be re-defined > v2.A3
because it is always defined as the Screen Port. You can however, > v2.A3
alter the viewport for Port #0 to make a sub-area on the screen to > v2.A3
draw in (and clip). The viewport for Port #0 may also be deactivated > v2.A4
as can the viewport on any other graphical Port. > v2.A4
To create a port, you need to specify the upper-left coordinate > v2.A3
corner of the port and the lower-right coordinate of the rectangle > v2.A3
bounding the port. The configuration of coordinates is different > v2.A3
depending on the type of graphical port as declared by the <flags> > v2.A3
parameter (see below). For Video Ports (onscreen ports), the <x0> > v2.A3
and <y0> parameters define the upper-left corner of the port on the > v2.A3
video screen, and the <x1> and <y1> values define the lower-right > v2.A3
corner of the port. Together, they define the pixel width and height > v2.A3
of the port (this adheres to global world coordinate systems). For > v2.A3
Clipboard Ports (offscreen bitmap ports), you cannot have an > v2.A3
upper-left corner - so the <x0> and <y0> parameters must be set to > v2.A3
zero. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 227
Once defined, the viewport for the given port is defined as the size > v2.A3
of the port itself (you may change it with a RIP_VIEWPORT command > v2.A3
later if you wish). This makes it so that the entire port may be > v2.A3
drawn into. If you need to define a sub-area of the port as a > v2.A3
clipping boundary, modify the viewport for that graphical port. > v2.A3
The <flags> parameter for this command allows you to make some > v2.A3
important distinctions to the port. The possible port flags are OR'd > v2.A3
together to create one final number where each bit represents some > v2.A3
flag value. The possible flag values and what they mean are > v2.A3
described as follows: > v2.A3
Value Description > v2.A3
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ > v2.A3
1 Port is an offscreen (Clipboard) port. When this > v2.A3
flag is specified, the <x0> and <y0> parameter are > v2.A3
assumed to be zero (even if they aren't set to 0, > v2.A3
they are treated as if they were). When a port > v2.A3
is declared as a Clipboard Port, all graphical > v2.A3
operations are performed to an offscreen bitmap > v2.A3
port and do not appear on the screen (without you > v2.A3
specifically using a port copy operation). If this > v2.A3
flag is omitted, then the port is treated as a > v2.A3
Video Port and any graphics drawn to the port will > v2.A3
show up on the screen immediately (providing the > v2.A3
viewport for this port isn't deactivated). > v2.A4
2 Port is made the active drawing port immediately > v2.A3
upon completion of this command. This has the > v2.A3
net effect of creating the port and immediately > v2.A3
switching to it. Without this flag, you would have > v2.A3
to use a RIP_SWITCH_PORT command to draw directly > v2.A3
into this port. > v2.A3
4 Deactivate this port's viewport immediately upon > v2.A4
creation. This has the net effect of creating the > v2.A3
port and setting the viewport to a deactivated status. > v2.A4
8 The newly defined port is immediately protected. > v2.A3
This means that the port cannot be deleted without > v2.A3
explicitly unprotecting the port. > v2.A3
NOTE: The <res> parameter is reserved for future use and should > v2.A3
be set to "0000" for future compatibility with later > v2.A3
RIPscrip revisions. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 228
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.3.2 þ RIP_DELETE_PORT ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Deletes a specific port definition > v2.A3
Level: 2 > v2.A3
Command: p > v2.A3
Arguments: port_num:1 dest_port:1 res:2 > v2.A3
Format: !|2s <port_num> <dest_port> <res> > v2.A3
Example: !|2s500000 > v2.A3
Uses Draw Color: NO > v2.A3
Uses Back Color: NO > v2.A3
Uses Line Style: NO > v2.A3
Uses Fill Style: NO > v2.A3
Uses Write Mode: NO > v2.A3
Uses Font Style: NO > v2.A3
Uses Viewport: NO > v2.A3
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A3
This command physically deletes one or more graphical ports. The > v2.A3
exact port depends on the <port_num> parameter. If the port number > v2.A3
specified is between 1-35, then the given port is deleted (providing > v2.A3
of course that it is unprotected). If you attempt to deleted a > v2.A3
protected port, then this command will fail. If you attempt to > v2.A3
delete port #0 (the screen port), then you will be activating a > v2.A3
special case of this command - all unprotected ports from 1-35 are > v2.A3
automatically deleted. This is a good garbage collection command > v2.A3
mode when you want to start with a new slate of ports without the > v2.A3
overhead of sending many delete port commands. > v2.A3
The <dest_port> parameter defines the port number that will be > v2.A3
switched to after the delete operation is finished. Typically, this > v2.A3
will be set to port #0 (switch to screen port), but it need not be. > v2.A3
If the destination port is undefined, then it will automatically > v2.A3
switch to port #0. If you instruct this command to delete all ports, > v2.A3
then the destination port may or may not be set to the screen port - > v2.A3
it all depends on whether or not the destination port both exists, > v2.A3
and is protected - remember, a protected port cannot be deleted with > v2.A3
this command without first being unprotected. So, if you delete all > v2.A3
ports and switch to another port that isn't port #0, and that port is > v2.A3
protected, then that protected port is selected as the new active > v2.A3
port. If however, that port doesn't exist (ie, it did exist at the > v2.A3
beginning of this command, but wasn't protected), then the screen > v2.A3
port #0 will be selected. > v2.A3
NOTE: The <res> parameter is reserved for future use and should > v2.A3
be set to "00" for future compatibility with later > v2.A3
RIPscrip revisions. > v2.A3
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Page 229
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ 3.4.3.3 þ RIP_PORT_COPY ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Function: Copies graphics data from one port to another > v2.A3
Level: 2 > v2.A3
Command: C > v2.A3
Arguments: source_port:1 sx0:XY sy0:XY sx1:XY sy1:XY > v2.A3
dest-port:1 dx0:XY dy0:XY dx1:XY dy1:XY > v2.A3
write-mode:1 res:5 > v2.A3
Format: !|2C <source_port> <sx0> <sy0> <sx1> <sy1> > v2.A3
<dest_port> <dx0> <dy0> <dx1> <dy1> <write_mode> > v2.A3
<res> > v2.A3
Example: !|2C300002020500002020100000 > v2.A3
Uses Draw Color: NO > v2.A3
Uses Back Color: NO > v2.A3
Uses Line Style: NO > v2.A3
Uses Fill Style: NO > v2.A3
Uses Write Mode: NO > v2.A3
Uses Font Style: NO > v2.A3
Uses Viewport: YES > v2.A3
Uses Port: YES > v2.A3
Uses Base Math: Current setting > v2.A3
This command copies graphics data from one port to another (or > v2.A3
possibly even the same port). The area copied is a rectangular area > v2.A3
based on the (sx0,sy0)..(sx1,sy1) parameters in the <source_port> and > v2.A3
the (dx0,dy0)..(dx1,dy1) parameters in the <dest_port>. The > v2.A3
<source_port> and <dest_port> parameters specify which port numbers > v2.A3
are to be used for the source and destination respectively. They may > v2.A3
be set to the same port number which signifies that a bit-blit > v2.A3
operation is to occur from one location of the current port to > v2.A3
another. Both the source and destination ports are specified as port > v2.A3
numbers from 0-35. If either port doesn't exist (or is deactivated) > v2.A4
then this command will do nothing. > v2.A3
The source port parameters (sx0,sy0)..(sx1,sy1) define the upper-left > v2.A3
and lower-right corners of the rectangle in the source port that is > v2.A3
to be the source image data. If all four parameters are set to zero, > v2.A3
then the entire source port's viewport is used as the image. These > v2.A3
parameters determine the portion of the source port that is to be > v2.A3
used to copy to the destination port. The image data is taken from > v2.A3
within the port's currently defined viewport. If the (sx1,sy1) > v2.A3
parameters takes the image out of the bounds of the source port's > v2.A3
viewport, then the values are adjusted to make it fit inside the > v2.A3
viewport. > v2.A3
The destination port parameters (dx0,dy0)..(dx1,dy1) define the > v2.A3
destination rectangle in the destination port that will receive the > v2.A3
graphical data. The (dx0,dy0) parameters define the upper-left > v2.A3
corner of the destination location of the bitmap data. If the > v2.A3
(dx1,dy1) parameters are set to zero, then the image is copied from > v2.A3
the source port verbatim - with the exact same pixel dimensions as > v2.A3
the source image rectangle. If these two values are not set to zero, >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment