Skip to main content

Picture Subroutines and Related Topics; Simple Subpicture Calls

At the second Network Graphics Group meeting, it was decided that two sorts of picture subroutines were desirable, the primary distinction between them being relative difficulty of implementation. At the meeting, the simpler variety was called a subpicture, and the more complex was called a subroutine. This author believes that these terms do not embody enough semantics to facilitate keeping the two straight and so proposes to standardize on "simple subroutine" and "full subpicture" instead.

The only parameter which can be passed to a simple subpicture is the "current beam position". In other words, if such a subpicture is called more than once in a picture, the only difference in appearance between the various calls is a translation due to the beam position at the time of the call. Full subpictures, on the other hand, take parameters which can cause scaling, rotation, reflection, or anything else we come up with.

It is planned that a subpicture definition need be transmitted only once (per network connection) and would not be deleted by a "new picture" operation. Thus a changing picture could be subdivided into several parts on a basis of static versus changing information; only definitions of parts which change need be transmitted to redraw the picture.

Traditionally, picture subroutines which depend only on the initial beam position have been restricted to relative data mode drawing operations. In view of the fact that subpictures will probably be used to save static picture information, it is desirable to allow absolute data mode operations in simple subpictures.

The next question naturally arises -- what does absolute data mean in a full subpicture which takes both position and scale parameters? Is absolute data really absolute in this case? This author believes that the answer is as follows: the full subpicture is really a picture in its own right, so it has its own logical coordinate system, and its absolute data is really within this coordinate system. Thus "shifting and scaling" a full subpicture really means "scale the subpicture in its own coordinate system and shift the result as a whole".

In summary, then, a major difference between simple and full subpictures is that a full subpicture has its own logical coordinate system and a simple subpicture uses the logical coordinate system of whoever calls it. This distinction is the reason why full subpictures are harder to implement than simple subpictures.

Another point discussed at the meeting was a special data mode whereby a subpicture can display data at absolute positions on the screen, i.e., absolutely in the main (picture) program. To achieve this, the meeting proposed special data modes for the three operations: move beam invisibly, draw line, and display dot. The intent of these data modes was to bypass all rotation, scaling, and clipping functions associated with the current level of subpicture nesting until this mode was cleared in a certain way. This same effect can be achieved more directly and implemented more efficiently by two commands: one to save and one to re-establish the logical coordinate system for the current subpicture. (Additionally, of course, the "save" operation would establish the initial, highest level, logical coordinate system.)

Simple Subpicture Calls​

Besides the <identifier> of the subpicture to be called, a simple subpicture call may specify two optional parameters; the first is an <identifier> which is the "name" (in a sense described below) of this particular subpicture call and the second is an absolute position on the calling page to be invisibly moved to, prior to calling the subpicture. When (eventually) the viewer is allowed to interact by "picking" information displayed before him, if the information is part of a subpicture, then the "name" of the subpicture call will be part of the "graphic input" reported to the serving host. If the information picked by the viewer is within several levels of subpicture calls, the names of each of the calls will be reported in a manner which indicates their nesting. (Note that just the name of the subpicture by itself is not sufficient, since one subpicture may be displayed in several positions and the application may wish to distinguish between individual calls.) If the identifier is not specified it defaults to the null string. If the position (for the invisible move) is not specified, the current beam position is used.

Which of these two parameters are present is encoded by two bits in a code byte which precedes the parameters. If both parameters are present then they are always in the same order; this order and the bits of the code byte assigned to the two parameters are specified in the detailed description of the Simple Instance command (and in the BNF in Appendix 1). Preceding even the code byte, and immediately following the name of the subpicture which is being called upon, is a count of the data in the remainder of the instance command. Thus is included so that it is not necessary to decode the code byte to determine the total length of any one Simple Instance operation.