Define Initial View
Purpose
The Define Initial View function indicates to the WHIP! data reading
application what portion of the logical coordinate space should initially
be viewed.
Syntax
Opcode
format |
Opcode |
Operand
Format |
Comments |
Extended ASCII |
(View |
[<ws><IX1>,<IY1><ws><IX2>,<IY2>]['<TName>'][<ws>]) |
Indicates an
area of the logical coordinate space to view |
X1,Y1 The logical coordinates of the lower-left corner of the
area to be viewed
X2,Y2 The logical coordinates of the upper-right corner of the
area to be viewed
Name A quoted view name as defined by Define
Named View.
Details
The Define Initial View opcode tells the WHIP! data reading application
what area of the drawing’s logical coordinate space should initially be
viewed. This can be used when you want the user’s initial view of a drawing
to be a small subset of the entire logical coordinate drawing area.
This opcode can also be used when a WHIP! data drawing does not fully fill
the logical coordinate space. Although the WHIP! data reading application may
compute the extent of all graphic primitives in the scene and automatically
set the view to tightly fit the scene, this requires that the entire scene
be transmitted and parsed before rendering may begin with the correct view.
Indicating an initial view near the start of the WHIP! data allows
a WHIP! data reading application to render the scene while it is being transmitted
and parsed.
Note that the view may be specified either as two logical points, or
as a quoted ASCII view name as found in the active named view list (see
Define
Named View).
Notes
WHIP! data reading applications may receive multiple conflicting view instructions,
and therefore should select a view based on the following precedence:
-
If this WHIP! data was loaded by the execution of a URL, and the
URL indicated a view, use it,
-
else if the WHIP! data contains a view
opcode, execute it,
-
else if the WHIP! data contained a Define
Drawing Bounds or Inked Area
opcode, use the drawing extents as the view,
-
else if all of the WHIP! data has been transmitted and parsed, compute
the extents of all geometric primitives in the scene and use that as the
view,
-
else set the view to the entire logical coordinate space.
WHIP! data reading applications may receive view information from the execution
of URLs. The specification of this behavior is to be determined (TBD).
It is possible that WHIP! data will have multiple view opcodes
which can be used to animate the drawing while the file is being parsed.
However, only the first view opcode, normally found in the Define
Drawing Information Block block, is the official "initial" view.
Default
By default the initial view is the full 31-bit logical coordinate space.