Define Drawing Bounds
Purpose
The Define Drawing Bounds function specifies a rectangle in logical coordinates that all of the .dwf file's geometric primitives will fit inside of tightly.
Syntax
Opcode format | Opcode | Operand Format | Comments |
Extended ASCII | (Bounds | <ws><IX1>,<IY1><ws><IX2>,<IY2>[<ws>]) | Defines bounding rectangle for the drawing |
X1,Y1 The logical coordinates of the lower-left corner of the drawing's bounding box
X2,Y2 The logical coordinates of the upper-right corner of the drawing's bounding box
Details
Some DWF reading applications may need to "know" where in the logical coordinate space the geometric primitives will be located. This can be used, for example, to aid in the selection of an initial view of the file.
Notes
In many cases, a DWF writing application may not know in advance what the bounds of the drawing will be until after all the geometric primitives have been written. One solution is to initially write a blank bounds opcode with an operand of extra white space used as padding, output the drawing, and then perform a seek-file operation and edit the bounds operand. For example, initially, the following can be written to the file before the bounds have been computed:
(Bounds )
Following the output of the drawing's geometry, the application can seek backward and overwrite the file to produce a result:
(Bounds 10,20 90500,110400 )
A .dwf file should contain a maximum of one occurrence of the bounds opcode, which by convention should be nested inside a Define Drawing Information Block opcode.
Default
By default the drawing bounds include the entire logical coordinate space, which a .dwf file reader may recompute once the file has been fully parsed.
Implementation in WHIP! Versions
Toolkit Function |
TBD |
Partial |
Full |
Revised in |
Define Drawing Bounds | - | - | - | - |
See Also