01/16/84 graphic_macros_, gmc_ This module provides a user of the graphic system with the ability to easily create common graphic objects which are not directly representable as primitive graphic elements. All entities created are two-dimensional figures, at the position and in the orientation specified by the user. Each entrypoint returns a graphic node value which consists of an array of vectors. This info file contains most of the documentation on graphic_macros_ ultimately planned for the Graphics Reference Manual, and is quite long. A short section on programming hints is followed by a description of each entrypoint. Programming hints: Declarations for all the user-callable entry points in graphic_macros_ are contained in the PL/I include file "gmc_entry_dcls.incl.pl1". Users may include this file (using the PL/I "%include" facility) in their source programs to save typing and syntax errors. Each of the figures produced originates at the current graphic position. The current graphic position is left at the termination point of the figure. For the simple closed curves (polygons, circles, ellipses, boxes) this will be the same as the point of origin. For the other figures (arcs, partial ellipses) it will not. Entry points in graphic_macros_: (list is generated by the help command) :Entry: box: 01/16/84 graphic_macros_$box Function: creates a rectangular box. Syntax: declare graphic_macros_$box entry (float bin, float bin, fixed bin (35)) returns (fixed bin (18)); node = graphic_macros_$box (x_side, y_side, code); Arguments: node is the returned graphic node. (Output) x_side is the X dimension of the box desired. (Input) y_side is the Y dimension of the box desired. (Input) code is a standard system error code. (Output) Notes: The first two vectors of the box created are a horizontal line of length (x_side) and a vertical line of length (y_side). Therefore, for example, if x_side and y_side are both negative, the box will be drawn to the left and down from the current graphic position. :Entry: circle: 01/16/84 graphic_macros_$circle Function: creates a circle. The rim of the circle originates at the current graphic position. The radius and orientation of the circle is determined by the given distances to the desired centerpoint of the circle. Syntax: declare graphic_macros_$circle entry (float bin, float bin, fixed bin (35)) returns (fixed bin (18)); node = graphic_macros_$circle (x_dist, y_dist, code); Arguments: node is the returned graphic node. (Output) x_dist is the X dimension of the relative distance from the current graphic position to the desired center of the circle. (Input) y_dist is the Y dimension of the relative distance from the current graphic position to the desired center of the circle. (Input) code is a standard system error code. (Output) :Entry: arc: 01/16/84 graphic_macros_$arc Function: creates an arc, using the same criteria used by the circle entrypoint. Usage declare graphic_macros_$arc entry (float bin, float bin, float bin, fixed bin (35)) returns (fixed bin (18)); node = graphic_macros_$arc (x_dist, y_dist, fraction, code); Arguments: node is the returned graphic node. (Output) x_dist is the X dimension of the relative distance from the current graphic position to the desired center of the circle. (Input) y_dist is the Y dimension of the relative distance from the current graphic position to the desired center of the circle. (Input) fraction represents the fraction of a complete circle desired. If fraction = 1e0, a complete circle will be drawn. (Input) code is a standard system error code. (Output) Notes: Arcs are drawn counterclockwise, in the direction of increasing angle. If a clockwise arc is desired, a negative value for fraction may be used. :Entry: polygon: 01/16/84 graphic_macros_$polygon Function: creates N-sided polygons. Syntax: declare graphic_macros_$polygon entry (float bin, float bin, fixed bin, fixed bin (35)) returns (fixed bin (18)); node = graphic_macros_$polygon (x_dist, y_dist, n_sides, code); Arguments: node is the returned graphic node. (Output) x_dist is the X dimension of the relative distance from the current graphic position to the desired center of the circle. (Input) y_dist is the Y dimension of the relative distance from the current graphic position to the desired center of the circle. (Input) n_sides is the number of sides desired. (Input) code is a standard system error code. (Output) Notes: One vertex of the polygon will locate itself at the current graphic position. :Entry: ellipse: 01/16/84 graphic_macros_$ellipse Function: creates an ellipse, given the location of its epicenter, and information about its eccentricity. Syntax: declare graphic_macros_$ellipse entry (float bin, float bin, float bin, fixed bin, float bin, fixed bin (35)) returns (fixed bin (18)); node = graphic_macros_$ellipse (x_dist, y_dist, eccentricity, eccentricity_angle, fraction, code); Arguments: node is the returned graphic node. (Output) x_dist is the X dimension of the distance from the current graphic position to the epicenter (geographical center) of the desired ellipse. (Input) y_dist is the Y dimension of the distance from the current graphic position to the epicenter (geographical center) of the desired ellipse. (Input) eccentricity is the desired ratio of major axis to minor axis. (Input) eccentricity_angle is the desired angle between the normal X-axis and the major axis of the ellipse. (Input) fraction represents the fraction of the ellipse desired. If fraction = 1e0, an entire ellipse is drawn. (Input) code is a standard system error code. (Output) Notes: Like arcs, fractional ellipses are drawn counterclockwise. If a clockwise portion of an ellipse is desired, a negative value for fraction may be used. Fractional ellipses are computed on the basis of angle subtended by the elliptical portion, not by circumferential meas- urement. Therefore, depending on the location of the current graphic position and the angle of eccentricity, fractions such as 0.25e0 and 0.75e0 may not produce the intuitive result. Note that the definition of eccentricity presented does not bear any relation with the mathematical property also called eccentricity by which ellipses are sometimes described. :Entry: ellipse_by_foci: 01/16/84 graphic_macros_$ellipse_by_foci Function: creates an ellipse given the locations of its two foci with respect to the current graphic position. Syntax: declare graphic_macros_$ellipse_by_foci entry (float bin, float bin, float bin, float bin, float bin, fixed bin (35)) returns (fixed bin (18)); node = graphic_macros_$ellipse_by_foci (x_dist1, y_dist1, x_dist2, y_dist2, fraction, code); Arguments: node is the returned graphic node. (Output) x_dist1 is the X dimension of the distance between the current graphic position and the first focus of the desired ellipse. (Input) y_dist1 is the Y dimension of the distance between the current graphic position and the first focus of the desired ellipse. (Input) x_dist2 is the X dimension of the distance between the current graphic position and the second focus of the desired ellipse. (Input) y_dist2 is the Y dimension of the distance between the current graphic position and the second focus of the desired ellipse. (Input) fraction represents the fraction of a complete ellipse desired. If fraction = 1e0, a complete ellipse is drawn. (Input) code is a standard system error code. (Output) Notes: The interpretation of fraction is described in the notes for entrypoint graphic_macros_$ellipse. ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved