home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / d / dubmodule / Drawfiles / DFformat < prev   
Encoding:
Text File  |  1996-03-27  |  25.0 KB  |  584 lines

  1. Drawfile format
  2. ===============
  3.  
  4. File structure
  5. --------------
  6. A drawfile usually consists of a 40 byte header followed by a font table
  7. object (only required if text objects are present in the file) followed by
  8. an options object, and then one or more objects to be displayed. In
  9. principle, the font table need only be located before any text objects and
  10. the options object could be located anywhere. However, !Draw (V0.99) will
  11. crash if the sequence header-options object-font table object is used (other
  12. permutations have not been investigated). Therefore it seems wise to use the
  13. same structure as !Draw, i.e. header followed by the font table (if
  14. required) followed by the options object.
  15.  
  16. A drawfile consisting only of the header with or without the font table
  17. and/or options object is valid (but a bit pointless).
  18.  
  19. Displayable objects (text, path, sprite and text area objects) are rendered
  20. in the order in which they appear in the drawfile.
  21.  
  22. There is no end-of-file marker, nor is there anything in the drawfile to
  23. indicate its size. The file size is denoted only by the file size attribute,
  24. which must be set correctly. Programs which render or otherwise process
  25. drawfiles use this attribute to tell when to stop rendering (or processing).
  26.  
  27.  
  28. Bounding boxes
  29. --------------
  30. Most objects have a bounding box, which defines a rectangular area which
  31. (should) exactly enclose the object. The main purpose of these bounding
  32. boxes is to determine which objects need to be rendered by comparing them
  33. with the wimp redraw rectangle for the window in which the drawfile is
  34. displayed. If an object bounding box is incorrect, the object may be
  35. rendered unnecessarily (which slows the process down) or may not be rendered
  36. when required (so parts of the image may appear to be missing).
  37.  
  38. Some applications which export drawfiles simply write zero for the bounding
  39. box coordinates. This is valid, since !Draw will calculate the correct
  40. bounding box coordinates when a file is loaded. However, other applications
  41. may not render the file correctly for the reason described above.
  42.  
  43. !Draw will report an error and refuse to load the file if any bounding box
  44. is inverted (i.e. xmin > xmax or ymin > ymax).
  45.  
  46.  
  47. Units
  48. -----
  49. One draw unit is 1/640th of a point (1 point = 1/72nd of an inch).
  50. Therefore, 
  51.  
  52.     1 inch = 46080       draw units
  53.     1 cm   = 18141.73228 draw units
  54.  
  55. On screen, 1 os unit = 256 draw units (at a zoom factor of 1.0).
  56.  
  57.  
  58. Note
  59. ----
  60. In the descriptions below, the offset values give the distance in bytes from
  61. the start of the object to each component and the size of the components is
  62. in bytes.
  63.  
  64.  
  65.  
  66. Drawfile header
  67. ===============
  68. A drawfile must start with a 40 byte header with the format described below.
  69.  
  70. Offset  Size  Description
  71. ------  ----  -----------------------------------------------------------
  72.   +0      4   file identification word (= &77617244 = 'Draw').
  73.   +4      4   major file format version number (currently 201 decimal).
  74.   +8      4   minor version number (usually 0).
  75.  +12     12   source identification string (usually name of program which
  76.                   generated the drawfile, max 12 chars, padded with spaces
  77.                   if less).
  78.  +24      4   image bounding box xmin (inclusive).
  79.  +28      4     "       "     "  ymin (inclusive).
  80.  +32      4     "       "     "  xmax (exclusive).
  81.  +36      4     "       "     "  ymax (exclusive).
  82.  
  83. If the major version number is greater than 201 it indicates a significant
  84. difference in the file format; rendering (or otherwise processing) the
  85. drawfile is not recommended unless the software used recognizes this new
  86. format.
  87.  
  88. The image bounding box defines a rectangular area which exactly encloses all
  89. the displayable objects in the file. An application which renders drawfiles
  90. may compare the image bounding box with the redraw rectangle to determine if
  91. any objects need to be displayed. Therefore if the bounding box is incorrect
  92. the file may not render correctly.
  93.  
  94.  
  95.  
  96. Font table object (object type number 0)
  97. ========================================
  98. Text objects (including transformed text objects) indicate which outline
  99. font to use by a number; the font table object provides a font name for each
  100. number. For text objects using the system font, this number is zero and
  101. there is no entry in the font table. For outline fonts used only in text
  102. area objects, there is no need for these fonts to be listed in the font
  103. table since each text area object contains its own equivalent of the font
  104. table; the drawfile will be rendered correctly (unless perhaps a list of all
  105. fonts used is required e.g. before printing on a PostScript printer). !Draw
  106. does include fonts used only in text area objects in the font table.
  107.  
  108. There should be only one font table object in the drawfile, and as noted
  109. in the introductory section it should be located immediately afer the
  110. drawfile header.
  111.  
  112. The font number is a single byte quantity in the range 1-255, with numbering
  113. usually starting at 1. Numbering does not have to be consecutive. Font names
  114. are case-insensitive.
  115.  
  116. Duplication in the font table should be avoided. If (e.g.) fonts 3 and 5 are
  117. defined as Trinity.Medium, !Draw will render a text object with font number
  118. 3 correctly, but one with font number 5 will be rendered using the system
  119. font.
  120.  
  121. If a text object uses an unknown font, !Draw will render it using the system
  122. font. The DrawFile module renders it using the System.Fixed font scaled to
  123. fit the object bounding box. The DrawUtilsA module provides facilities to
  124. list any unknown fonts in the drawfile and replace them with other fonts. In
  125. a text area object, if an unknown font is used at the start of the text then
  126. nothing is displayed, otherwise the unknown font selection is ignored and
  127. rendering continues with the previously selected font.
  128.  
  129. The format of the font table is as follows (note that there is no bounding
  130. box for this object):
  131.  
  132. Offset  Size  Description
  133. ------  ----  -----------------------------------------------------------
  134.   +0      4   object type identifier (= 0).
  135.   +4      4   total size of this object (bytes).
  136.   +8      1   single byte number (non-zero) for first font.
  137.          m+1  name of first font (m chars) terminated by a null char.
  138.           1   single byte number (non-zero) for second font.
  139.          n+1  name of second font (n chars) terminated by a null char.
  140.  
  141.               ...further font number/name pairs as required...
  142.  
  143.          0—3  additional null chars as padding to a word boundary (i.e. so
  144.                   total size of the object is a multiple of 4 bytes).
  145.  
  146.  
  147.  
  148. Options Object (object type number 11)
  149. ======================================
  150.  
  151. Offset  Size  Description
  152. ------  ----  -----------------------------------------------------------
  153.   +0      4   object type identifier (= 11).
  154.   +4      4   total size of this object (= 88 bytes).
  155.   +8      4   bounding box xmin (must be zero).
  156.  +12      4   bounding box ymin (     "      ).
  157.  +16      4   bounding box xmax (     "      ).
  158.  +20      4   bounding box ymax (     "      ).
  159.  +24      4   (paper size + 1) * 256, e.g. A4 paper = &500.
  160.  +28      4   paper limits options:
  161.                 bit     0 when set, paper limits shown
  162.                 bits  1-3 reserved (must be zero)
  163.                 bit     4 when set, paper landscape orientation
  164.                 bits  5-7 reserved (must be zero)
  165.                 bit     8 when set, printer limits are default
  166.                 bits 9-31 reserved (must be zero).
  167.  +32      8   grid spacing (double precision value, inches or cm
  168.                             depending on units selection at +60).
  169.  +40      4   number of grid divisions.
  170.  +44      4   grid type (0 = rectangular, non-zero = isometric).
  171.  +48      4   grid auto-adjust (0 = off, non-zero = on).
  172.  +52      4   grid shown (0 = no, non-zero = yes).
  173.  +56      4   grid lock (0 = off, non-zero = on).
  174.  +60      4   grid units (0 = inches, non-zero = cm).
  175.  +64      4   zoom multiplier (allowable values 1-8).
  176.  +68      4   zoom divisor (allowable values 1-8).
  177.  +72      4   zoom lock (0 = off, non-zero = locked to powers of 2).
  178.  +76      4   toolbox shown(0 = no, non-zero = yes).
  179.  +80      4   toolbox icon selected on file load (one only should be set)
  180.                 bit 0 = line
  181.                 bit 1 = closed line
  182.                 bit 2 = curve
  183.                 bit 3 = closed curve
  184.                 bit 4 = rectangle
  185.                 bit 5 = circle/ellipse
  186.                 bit 6 = text
  187.                 bit 7 = select mode.
  188.  +84      4   undo buffer size in bytes.
  189.  
  190. There should be only one options object in the drawfile (subsequent ones
  191. will be ignored), and as noted in the introductory section it should be
  192. located immediately after the font table (if present) or after the drawfile
  193. header.
  194.  
  195. The options object is itself optional. Most of the entries are editor-
  196. specific (e.g. grid type and spacing); the only ones relevant to rendering
  197. the file are the page size and orientation entries (at +24 and bit 4 of
  198. +28). When the file is loaded into !Draw, the window size is set to match
  199. the specified paper size and orientation (e.g. A4 = 1488 x 2104 os units).
  200. In the absence of an options object, the object bounding boxes (including
  201. the image bounding box) are used to determine the smallest paper 'A' size
  202. which will accomodate the image and the window size is set accordingly.
  203.  
  204.  
  205.  
  206. Text Object (object type number 1)
  207. ==================================
  208.  
  209. Offset  Size  Description
  210. ------  ----  -----------------------------------------------------------
  211.   +0      4   object type identifier (= 1).
  212.   +4      4   total size of this object (bytes).
  213.   +8      4   bounding box xmin (inclusive).
  214.  +12      4   bounding box ymin (inclusive).
  215.  +16      4   bounding box xmax (exclusive).
  216.  +20      4   bounding box ymax (exclusive).
  217.  +24      4   text colour (as &BBGGRR00).
  218.  +28      4   text background colour hint (as &BBGGRR00).
  219.  +32      4   text style (i.e. font number).
  220.  +36      4   horizontal (x) font size (in 1/640th point).
  221.  +40      4   vertical (y) font size (in 1/640th point).
  222.  +44      4   x-coordinate } of start of text
  223.  +48      4   y-coordinate } base line.
  224.  +52     n+1  the text string (n characters) terminated by a null char.
  225.          0—3  additional null chars as padding to a word boundary (i.e. so
  226.                   total size of the object is a multiple of 4 bytes).
  227.  
  228. The text style word at +32 gives the font number as described in the section
  229. on the font table object. Only bits 0-7 are used and bits 8-31 must be
  230. clear; for the system font, this number is zero.
  231.  
  232. The minimum font size is 1 point.
  233.  
  234. The background colour hint is used to set up a palette for anti-aliasing.
  235. There is no 'rub-out' box and the text is simply overlaid on whatever forms
  236. the background - specifying the background colour correctly will improve
  237. the appearance of the text on screen and possibly on the printed copy.
  238.  
  239. The text base line is an imaginary underline; descenders such as 'g' and 'y'
  240. go below this line.
  241.  
  242. The text string must contain only printable characters (ascii 32-126 and
  243. 128-255 inclusive). !Draw does not allow the escape sequences for colour
  244. selection, underlining etc which the font manager recognizes.
  245.  
  246.  
  247.  
  248. Path Object (object type number 2)
  249. ==================================
  250.  
  251. Offset  Size  Description
  252. ------  ----  -----------------------------------------------------------
  253.   +0      4   object type identifier (= 2).
  254.   +4      4   total size of this object (bytes).
  255.   +8      4   bounding box xmin (inclusive).
  256.  +12      4   bounding box ymin (inclusive).
  257.  +16      4   bounding box xmax (exclusive).
  258.  +20      4   bounding box ymax (exclusive).
  259.  +24      4   fill colour (as &BBGGRR00, use -1 for none).
  260.  +28      4   line colour (as &BBGGRR00, use -1 for none).
  261.  +32      4   line width (in draw units).
  262.  +36      4   path style description.
  263.  +40      n   dash pattern definition (optional).
  264.               sequence of path components, starting with a move (component
  265.                   = 2) and ending with an end-path (component = 0).
  266.  
  267. A line width of zero means 'draw the thinnest possible line'.
  268.  
  269. Path style description
  270. ----------------------
  271. The path style description is a 32-bit field as follows:
  272.  
  273.   Bit(s)  Description
  274.   ------  -----------------------------
  275.     0-1   join style (0 = mitred, 1 = round, 2 = bevelled, 3 = unused).
  276.     2-3   end cap style (0 = butt, 1 = round, 2 = projecting square,
  277.                          3 = triangular).
  278.     4-5   start cap style (as for end cap).
  279.      6    winding rule (0 = non-zero, 1 = even-odd).
  280.      7    dash pattern (0 = none, 1 = present).
  281.     8-15  reserved (must be zero).
  282.    16-23  triangular cap width (in 1/16ths of the line width,
  283.               possible values 1-255).
  284.    24-31  triangular cap length (in 1/16ths of the line width,
  285.               possible values 1-255).
  286.  
  287.  
  288. Dash pattern
  289. ------------
  290. If a dash pattern definition is present it has the following format (as an
  291. example, this is the definition for the fourth pattern - long/short dash -
  292. provided by !Draw). Each entry is one word (= 4 bytes), offsets are from the
  293. start of the pattern definition.
  294.  
  295.   Offset    Value   Description
  296.   ------    -----   ---------------------------------------------
  297.      +0  =      0   initial gap length (draw units, must be >= 0)
  298.      +4  =      4   number of entries following (multiple of 2)
  299.      +8  =  &2400   dash length }
  300.     +12  =   &900   gap  length } draw units,
  301.     +16  =   &900   dash length } should be > 0
  302.     +20  =   &900   gap  length }
  303.  
  304.  
  305. Path components and structure
  306. -----------------------------
  307. The possible path components and their use is as follows. Each entry is one
  308. word (= 4 bytes), so (e.g.) a [move x,y] component uses 12 bytes.
  309.  
  310.   Component Additional data      Description
  311.   --------- -------------------  ----------------------------------------
  312.       0                          (end of path)
  313.       2     x y                  (move to x,y)
  314.       5                          (close subpath)
  315.       6     cx1 cy1 cx2 cy2 x y  (bezier curve segment to x,y with control
  316.                                   points at cx1,cy1 and cx2,cy2)
  317.       8     x y                  (draw straight line to x,y)
  318.  
  319. A path consists of one or more subpaths. Each subpath must start with a move
  320. (2), which must be followed by at least one straight line (8) or curve (6)
  321. component. Optionally, the last component of a subpath can be a close-path
  322. (5). A move (2) to start a new subpath automatically terminates the
  323. preceeding subpath. The last (and only the last) subpath must be followed by
  324. an end-path (0).
  325.  
  326. When creating a closed subpath, there should be a final line or curve
  327. segment going back to the start point followed by a close-path component.
  328. The main effect of a close-path is to ensure that the correct join style is
  329. applied where the beginning and end of the subpath meet, but see the
  330. accompanying files 'Bezier1' through 'Bezier4' for a further discussion of
  331. path closure and an explanation of how bezier curves are created.
  332.  
  333.  
  334.  
  335. Sprite Object (object type number 5)
  336. ====================================
  337.  
  338. Offset  Size  Description
  339. ------  ----  -----------------------------------------------------------
  340.   +0      4   object type identifier (= 5).
  341.   +4      4   total size of this object (bytes).
  342.   +8      4   bounding box xmin (inclusive).
  343.  +12      4   bounding box ymin (inclusive).
  344.  +16      4   bounding box xmax (exclusive).
  345.  +20      4   bounding box ymax (exclusive).
  346.  +24          a single sprite (without the sprite area control block).
  347.  
  348. The standard 24 byte object header is followed by the sprite. When the
  349. drawfile is rendered, the sprite is scaled to exactly fit the bounding box.
  350.  
  351. For full details of the sprite format, see the Programmers Reference Manual.
  352. In brief, the format is:
  353.     •sprite control block
  354.     •palette (optional)
  355.     •sprite image
  356.     •sprite mask (optional).
  357.  
  358. with the format of the sprite control block being:
  359.  
  360.    Bytes  Description
  361.    -----  ----------------------------------------------------------
  362.     0-3   total size of the sprite (bytes)
  363.     4-15  sprite name (max 12 chars, padded with null chars)
  364.    16-19  width in words-1
  365.    20-23  height in scan lines-1
  366.    24-27  first bit used
  367.    28-31  last bit used
  368.    32-35  offset¹ to sprite image (if > 44 then palette data present)
  369.    36-39  offset¹ to mask (if none then offset to image)
  370.    40-43  mode sprite was defined in
  371.  
  372. (¹offsets are in bytes from the start of the sprite control block).
  373.  
  374.  
  375.  
  376. Group Object (object type number 6)
  377. ===================================
  378.  
  379. Offset  Size  Description
  380. ------  ----  -----------------------------------------------------------
  381.   +0      4   object type identifier (= 6).
  382.   +4      4   total size of this object (bytes).
  383.   +8      4   bounding box xmin (inclusive).
  384.  +12      4   bounding box ymin (inclusive).
  385.  +16      4   bounding box xmax (exclusive).
  386.  +20      4   bounding box ymax (exclusive).
  387.  +24     12   group object name (max 12 chars, padded with spaces).
  388.  
  389. This is followed by a sequence of other objects (one or more). Grouping
  390. allows a number of objects to be handled (e.g. moved, scaled, rotated, etc)
  391. as a single unit. Group objects can be nested.
  392.  
  393. The group object name is ignored by !Draw, but might be relevant to certain
  394. editors.
  395.  
  396. There is no end-of-group marker; the number of objects following the group
  397. header which are included in the group is determined solely by the size of
  398. the group object (i.e. the total size is 36 bytes for the header plus the
  399. sum of the sizes of all objects in the group).
  400.  
  401. The bounding box should be that which exactly encloses all objects in the
  402. group.
  403.  
  404.  
  405.  
  406. Tagged Object (object type number 7)
  407. ====================================
  408.  
  409. Offset  Size  Description
  410. ------  ----  -----------------------------------------------------------
  411.   +0      4   object type identifier (= 7).
  412.   +4      4   total size of this object (= 28+n+x bytes).
  413.   +8      4   bounding box xmin (inclusive).
  414.  +12      4   bounding box ymin (inclusive).
  415.  +16      4   bounding box xmax (exclusive).
  416.  +20      4   bounding box ymax (exclusive).
  417.  +24      4   secondary type identifier.
  418.  +28      n   a single 'enclosed' object of size n bytes.
  419.  +28+n    x   optional additional data (multiple of 4 bytes).
  420.  
  421. Tagged objects allow a standard object (text object, path object, etc) to be
  422. packaged along with additional data which would be relevant to a specific
  423. editor (or other software). This additional data comprises the secondary
  424. type identifier and the extra data at the end of the object (if present).
  425. !Draw ignores these data and simply renders the enclosed object.
  426.  
  427. The enclosed object can be a group object (containing one or more objects),
  428. or a tagged object (i.e. they can be nested), or one of the standard objects
  429. used by !Draw.
  430.  
  431. Tagged objects cannot be edited in !Draw. They cannot be moved, scaled or
  432. rotated and the attributes of the enclosed object (font name & size, path
  433. style, colours, etc) cannot be altered.
  434.  
  435. Note: when the enclosed object is a text object, !Draw (V0.99) sometimes
  436. gets confused over which font to use.
  437.  
  438.  
  439.  
  440. Text Area Object (object type number 9)
  441. =======================================
  442. A text area object allows a block of text to be formatted across one or more
  443. rectangular areas according to escape sequences embedded in the text. These
  444. escape sequences begin with a back-slash ('\') character and most end with
  445. either a slash character or a newline (ascii 10). See the section on !Draw
  446. in the User Guide/Applications Guide or the section on file formats in the
  447. Programmers Reference Manual for a full description of these escape
  448. sequences and other details of using these objects.
  449.  
  450. Offset  Size  Description
  451. ------  ----  -----------------------------------------------------------
  452.   +0      4   object type identifier (= 9).
  453.   +4      4   total size of this object (bytes).
  454.   +8      4   bounding box xmin (inclusive).
  455.  +12      4   bounding box ymin (inclusive).
  456.  +16      4   bounding box xmax (exclusive).
  457.  +20      4   bounding box ymax (exclusive).
  458.  
  459.  +24   n*24   one or more text column objects (each 24 bytes - see below)
  460.  
  461.           4   zero word to mark the end of text column objects.
  462.           4   reserved (must be zero).
  463.           4   reserved (must be zero).
  464.           4   initial text colour (as &BBGGRR00).
  465.           4   initial text background colour hint (as &BBGGRR00).
  466.           ?   the text, terminated by a newline (ascii 10) followed by
  467.                   a null char.
  468.          0—3  additional null chars as padding to a word boundary (i.e. so
  469.                   total size of the object is a multiple of 4 bytes).
  470.  
  471. A text column object consists only of a 24 byte object header and defines
  472. one of the rectangular areas over which the text will be formatted, i.e.
  473.  
  474. Offset  Size  Description
  475. ------  ----  -----------------------------------------------------------
  476.   +0      4   object type identifier (= 10 for a text column object).
  477.   +4      4   total size of this object (= 24 bytes).
  478.   +8      4   bounding box xmin (inclusive).
  479.  +12      4   bounding box ymin (inclusive).
  480.  +16      4   bounding box xmax (exclusive).
  481.  +20      4   bounding box ymax (exclusive).
  482.  
  483.  
  484. The bounding box for the text area object should be that which exactly
  485. encloses all of the text columns.
  486.  
  487. The text should consist only of printable characters (ascii 32-126 and
  488. 128-255 inclusive) and newlines (ascii 10) except for the null char
  489. terminator.
  490.  
  491. Large text areas can be very slow to render. Where possible, break the text
  492. down into smaller blocks (e.g. use a separate text area object for each
  493. paragraph). This also makes it easier to predict in advance how the text
  494. will be formatted. For example, two or more (=n) consecutive newlines
  495. usually gives a vertical gap equal to (n-1) times the paragraph spacing plus
  496. one linespace, but this varies depending on certain combinations of escape
  497. sequences preceeding the newlines. Also, if the text is prepared using an
  498. editor such as !Edit, it is a good idea to check for trailing spaces or
  499. lines consisting only of spaces (these are easily seen if the text is
  500. selected so that the foreground and background colours are inverted). Such
  501. superfluous white space can affect formatting of the text area object in
  502. ways which appear rather unpredictable.
  503.  
  504.  
  505.  
  506. Transformed Text Object (object type number 12)
  507. ===============================================
  508.  
  509. Offset  Size  Description
  510. ------  ----  -----------------------------------------------------------
  511.   +0      4   object type identifier (= 12).
  512.   +4      4   total size of this object (bytes).
  513.   +8      4   bounding box xmin (inclusive).
  514.  +12      4   bounding box ymin (inclusive).
  515.  +16      4   bounding box xmax (exclusive).
  516.  +20      4   bounding box ymax (exclusive).
  517.  +24     24   transformation matrix.
  518.  +48      4   font flags.
  519.  +52      4   text colour (as &BBGGRR00).
  520.  +56      4   text background colour hint (as &BBGGRR00).
  521.  +60      4   text style (i.e. font number).
  522.  +64      4   horizontal (x) font size (in 1/640th point).
  523.  +68      4   vertical (y) font size (in 1/640th point).
  524.  +72      4   x-coordinate } of start of text
  525.  +76      4   y-coordinate } base line.
  526.  +80     n+1  the text string (n characters) terminated by a null char.
  527.          0—3  additional null chars as padding to a word boundary (i.e. so
  528.                   total size of the object is a multiple of 4 bytes).
  529.  
  530. The transformation matrix is a 24 byte block with the general format
  531. (entries are signed 32-bit integers):
  532.  
  533.    +0    65536 * xscale *  cos(angle)
  534.    +4    65536 * xscale *  sin(angle)
  535.    +8    65536 * yscale * -sin(angle)
  536.   +12    65536 * yscale *  cos(angle)
  537.   +16    xshift (in draw units)
  538.   +20    yshift (     "       )
  539.  
  540. where xscale and yscale are the horizontal and vertical scale factors, angle
  541. determines rotation (positive rotation is anti-clockwise), and xshift and
  542. yshift move the object horizontally and vertically respectively.
  543.  
  544. In effect, scaling is applied first and has no effect on the location of the
  545. start of the text baseline (x0,y0 - defined by the coordinates at +72 and
  546. +76). The scale factors and the font size entries at +64 and +68 determine
  547. the final size of the text. Then the text is rotated about x0,y0 by the
  548. specified angle. The last two entries in the transformation matrix (usually
  549. zero) are added to the coordinates at +72 and +76.
  550.  
  551. The font flags at +48 are:
  552.   bit   0  : if set, text should be kerned
  553.   bit   1  : if set, text written from right to left
  554.   bits 2-31: reserved (must be zero).
  555.  
  556. See the description of the text object format above for an explanation of
  557. the other components of this object.
  558.  
  559.  
  560.  
  561. Transformed Sprite Object (object type number 13)
  562. =================================================
  563.  
  564. Offset  Size  Description
  565. ------  ----  -----------------------------------------------------------
  566.   +0      4   object type identifier (= 13).
  567.   +4      4   total size of this object (bytes).
  568.   +8      4   bounding box xmin (inclusive).
  569.  +12      4   bounding box ymin (inclusive).
  570.  +16      4   bounding box xmax (exclusive).
  571.  +20      4   bounding box ymax (exclusive).
  572.  +24     24   transformation matrix.
  573.  +48          a single sprite (without the sprite area control block).
  574.  
  575. The 24 byte object header is followed by the transformation matrix (see
  576. transformed text object format) and then the sprite as described previously
  577. for sprite objects. The coordinates of the (pre-transformation) bottom-left
  578. corner of the sprite - which are unaffected by scaling and/or rotation - are
  579. given by the last two entries in the transformation matrix. The size of the
  580. sprite when rendered depends on the size of the sprite itself and the scale
  581. factors in the matrix.
  582.  
  583.  
  584.