Skip to main content

Full Subpicture Calls

We are now in position to consider what may be specified as part of a full subpicture call, in addition to the name of the subpicture being called, which is, of course, required. The data described below will all be optional: a single code byte will precede all these data; the presence or absence of one of the parameters will be indicated by a bit in the code byte being one or zero. The parameters will always appear in the same order, if they are present. This order is given below in the detailed description of the Full Instance command (and in the BNF in Appendix 1). Additionally, preceding even the code byte, will be a <count> of the following bytes, including the code byte to determine the total length of any particular Full Instance operation.

One parameter is an <identifier> which can be used to distinguish this particular call to this subpicture from all other calls to the subpicture. This parameter was already described under Simple Subpicture Calls.

On parameter which may be specified is a translation: this will be specified by giving the absolute coordinates of the center (on the calling page) of the image of the subpicture; this will default to the beam position current at the time of the call.

A rotation may be specified by giving a 16-bit fraction in the range 0 to .1111111111111111 (binary) inclusive; this fraction will represent what part of a full circle (2pi) the rotation is. The default value of angle of rotation will be zero.

(Actually, the rotation representation scheme works identically if one thinks of it as a two's complement fraction from -1/2 to just less than +1/2. That is, the same bit configurations encode the same rotation, due to the periodic nature of sine and cosine. For example, binary zero always represents 0 pi 010000...0 denotes pi/2 in both schemes; 100...00 denotes 1/2 in one scheme and -1/2 in the other, which correspond to rotations of +pi and -pi respectively, i.e. identical rotations.)

Also specifiable as apart of a full subpicture call is a rectangular portion of the called picture to be imaged on the calling picture (see previous section for a discussion of clipping). This rectangle is specified by its center and one half its total size in x and y. That is, the rectangle will consist of all points whose x coordinate differs from that of the center by no more than the specified x-size and whose y coordinate satisfies a similar condition. The default for these values will place the center at the origin and give both the x half width and the y half width the value of +1/2. Thus the default includes the whole of the logical coordinate system of the called page (and also some points one of whose coordinates are +1/2, which, strictly speaking, lie "outside" of the coordinate system; how this inconsistency is resolved is left unspecified).

Finally, one must specify the scaling to be applied in determining the image; this can be done in many ways. One way is to specify a uniform magnification to be applied to the subpicture. So that magnifications in a wide range can be achieved, it is the author's opinion that some form of scientific notation (i.e., floating point) will have to be employed. If there is already a network standard floating point notation (which I am not aware of) it should be employed. Failing that, it is suggested that this notation consist of an 8-bit (two's complement) exponent followed by a 16-bit (two's complement) fractional part.

Another form of scaling is to specify separate magnifications in x and in y, to be applied to the subpicture before any rotation is performed. Yet a third way is to specify a rectangular area in the calling picture's coordinate system to be filled with the image of the subpicture. Since the center of the image is already specified (by the translation), this image information consists only of half-edge size data. If none of the three methods of scaling are chosen (and an affine transformation (see below) is not given explicitly), then a uniform magnification of unity (i.e., no scaling) is used. Note that the three forms of scaling tend to contradict each other and only one of them should be used in any one call. What happens if self-contradictory information is given in these fields is left unspecified.

Appendix 2 presents the mathematics involved in transforming the subpicture's coordinate system into the calling picture's coordinate system. It is shown there that all the individual operations (scaling, rotating, and translating) can be represented as a single affine transformation (which consists of 6 values). It might be nice to permit the serving program to specify this transformation directly. Accordingly, one possible parameter of a full subpicture call will consist of six floating point numbers (of the form described under magnification, above) to be interpreted as an affine transformation. Indeed, if the affine transformation has the following form:

/_ |x  |y_/ = /_ x y_/ * / L11 L12  / + /_ T1 T2_/
/_ L21 L22 _/

then the values shall (arbitrarily) be sent in the following (columnar) order: L11, L21, L12, L22, T1, T2. This affine transformation should be invertible that is, L11*L22 - L21*L12 should not be zero.