Showing changes from revision #5 to #6:
Added | Removed | Changed
Warning: The current and/or previous revision contained markup errors which prevented proper diff analysis. A guess at markup correction has been made but the diff may not be a truly accurate reflection of the real changes.
A DrawFile consists of a File Header block, followed by zero or more Object blocks.
Offset | Length | Contents |
---|---|---|
0 | 4 | “Draw” |
4 | 4 | Major version, 201 at present |
8 | 4 | Minor version |
12 | 12 | Name of producing program, padded with spaces |
24 | 4 | X low bounding box |
28 | 4 | Y low bounding box |
32 | 4 | X high bounding box |
36 | 4 | Y high bounding box |
Offset | Length | Contents |
---|---|---|
0 | 4 | Object Type Identifier: |
0 Font table | ||
1 Text object | ||
2 Path object | ||
3 (unimplemented Rectangle object) | ||
4 (unimplemented Rectangle object) | ||
5 Sprite object | ||
6 Group object | ||
7 Tagged object | ||
8 Not used | ||
9 Text area object | ||
10 Text column object | ||
11 Options object | ||
12 Transformed text object | ||
13 Transformed sprite object | ||
14 Not used | ||
15 Not used | ||
16 JPEG object | ||
17 Grid options object | ||
4 | 4 | Word aligned size, including header |
8 | 16 | Bounding box (not all types have this) |
n | n | Object specific data, if any |
This object has no bounding box. It should only appear once, and before any text objects.
It consists of:
Offset | Length | Contents |
---|---|---|
24 | 4 | Text colour |
28 | 4 | Background hint |
32 | 4 | Text style |
36 | 4 | X-size (in 1/640’s of a point) |
40 | 4 | Y-size (ie draw units) |
44 | 4 | X coord of start of baseline |
48 | 4 | Y coord of it |
52 | 4 | Zero terminated string padding |
Offset | Length | Contents |
---|---|---|
24 | 4 | Fill colour (-1 for none) |
28 | 4 | Outline col (-1 for none) |
32 | 4 | Outline width |
36 | 4 | Path style |
40 | n | Optional dash pattern |
n | Path components (consists of a Tag Identifier) |
Offset | Length | Value | Meaning |
---|---|---|---|
+0 | 4 | Tag ID: | |
0 | End of Path | ||
2 | Move, one point | ||
5 | Close sub-path | ||
6 | Bezier, three points | ||
8 | Line, one point | ||
+4 | n | 0 – 3 | sets of (x,y) dependant on tag |
This is followed by a sprite, which is scaled to fill bounding box.
Offset | Length | Contents |
---|---|---|
0 | 12 | Group object name (padded with spaces) |
and then a sequence of objects. These will all lie within the bounding box of this.
Offset | Length | Contents |
---|---|---|
0 | 4 | Tagged identifier |
and then followed by an object and optional word-aligned data.
First, 1 or more text columns and then:
Offset | Length | Contents |
---|---|---|
0 | 4 | Zero to mark end of columns |
4 | 4 | Reserved |
8 | 4 | Reserved |
12 | 4 | Initial foreground colour |
16 | 4 | Initial background hint |
20 | n | Zero terminated body of text |
padding |
No data other than the standard 6 word header – the bounding box in the header gives the location of the column. Text column objects can only occur in Text area objects.
This object has space for a bounding box, but the 4 words should be set to zero.
Offset | Length | Contents |
---|---|---|
0 | 4 | Paper size |
4 | 4 | Paper limits |
8 | 8 | Grid spacing (floating point) |
16 | 4 | Grid division |
20 | 4 | Grid type |
24 | 4 | Grid auto-adjust |
28 | 4 | Grid visible |
32 | 4 | Grid units |
36 | 4 | Zoom multiplier (1 – 8) |
40 | 4 | Zoom divider (1 – 8) |
44 | 4 | Zoom locking |
48 | 4 | Toolbox Presence |
52 | 4 | Initial entry mode |
56 | 4 | Undo buffer (size in bytes) |
Value | Meaning |
---|---|
&100 | A0 |
&200 | A1 |
&300 | A2 |
&400 | A3 |
&500 | A4 |
&600 | A5 |
&700 | A6 |
&800 | A7 |
Bit | Meaning when set |
---|---|
0 | Show limits |
1 – 3 | Reserved |
4 | Landscape (otherwise Portrait) |
5 – 7 | Reserved |
8 | Default to printer limits |
9 – 31 | Reserved |
Value | Meaning |
---|---|
0 | Rectangular grid |
<> 0 | Isometric grid |
Value | Meaning |
---|---|
0 | Auto-adjust is disabled |
<> 0 | Auto-adjust is enabled |
Value | Meaning |
---|---|
0 | Grid is not visible |
<> 0 | Grid is visible |
Value | Meaning |
---|---|
0 | Grid units is inches |
<> 0 | Grid units is cm |
Value | Meaning |
---|---|
0 | Zoom locking is set to none |
<> 0 | Zoom locking is set to powers of 2 |
Value | Meaning |
---|---|
0 | Toolbox is absent |
<> 0 | Toolbox is present |
Bit | Meaning when set |
---|---|
0 | Line |
1 | Closed line |
2 | Curve |
3 | Closed curve |
4 | Rectangle |
5 | Ellipse |
6 | Text line |
7 | Select |
Offset | Length | Contents |
---|---|---|
24 | 24 | Transformation matrix |
48 | 4 | Font flags |
52 | 4 | Text colour |
56 | 4 | Background hint |
60 | 4 | Text style |
64 | 4 | X-size (in 1/640’s of a point) |
68 | 4 | Y-size (ie draw units) |
72 | 4 | X coord of start of baseline |
76 | 4 | Y coord of it |
80 | 4 | Zero terminated string padding |
padding |
Bit | Meaning when set |
---|---|
0 | Kern text |
1 | Right to left |
Offset | Length | Contents |
---|---|---|
24 | 24 | Transformation matrix |
48 | - | Format of sprite |
This is scaled to fill the bounding box.
Offset | Length | Contents |
---|---|---|
24 | 4 | Height (draw units) |
28 | 4 | Width |
32 | 4 | x DPI (90 for a normal square pixel mode) |
36 | 4 | Y DPI |
40 | 24 | Transformation matrix |
64 | 4 | Length of JPEG data |
68 | n | Embedded JPEG (strictly JFIF) file |
.. | 0 – 3 | Padding to next word |
Currently it seems that the 6 word transformation matrix is used only to scale the JPEG image and translate it from (0,0),(height,width) to the required position on the page. It is not known whether this object can contain JPEG data in any format other than a JFIF file.
First (lowest) byte is fontnumber, and refers to font in font table.
The rest of word is reserved, and should be zero.
Bit | Value | Meaning |
---|---|---|
0 – 1 | Join style: | |
0 | Mitred | |
1 | Round | |
2 | Bevelled | |
2 – 3 | Start cap: | |
0 | Butt | |
1 | Round | |
2 | Square | |
3 | Triangle | |
4 – 5 | End cap | |
6 | Winding rule: | |
0 | Non-zero | |
1 | Even-odd | |
7 | Dash pattern | |
0 | None | |
1 | Present | |
16 – 23 | Triangle cap width | |
24 – 31 | Triangle cap length |
_<^ Sequence | Meaning |
---|---|
\!<version>/ | Version must be 1 |
\A |
Alignment: L, R, C, D |
\B<R> <G> <B>/ | Set background hint |
\C<R> <G> <B>/ | Set foreground colour |
\D<number>/ | Number of columns |
\F<digit><name> <size> [<width>]/ | Declare a font |
\<digit> | Select a font |
\L<value>/ | Leading |
\M<left> <right>/ | Sets margins |
\P<value>/ | Paragraph leading |
\U<pos> <thickness>/ | Turn on underline |
\V[-]<digit> | Vertical move |
\- | Soft hyphen |
\<newline> | Force line break |
\\ | “\” |
\; |
Comment |