home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / book / gpi4.inf (.txt) < prev    next >
OS/2 Help File  |  1999-05-12  |  1MB  |  15,334 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Correlation ΓòÉΓòÉΓòÉ
  3.  
  4. Correlation is the process of determining which primitives, if any, are 
  5. contained in an area of interest. The process for nonretained graphics is very 
  6. different from the process for retained graphics. The following topics are 
  7. related to the information in this chapter: 
  8.  
  9.      Presentation spaces 
  10.      Coordinate spaces and transformations 
  11.      Editing retained graphics and graphics segments 
  12.  
  13.  
  14. ΓòÉΓòÉΓòÉ 1.1. About Correlation ΓòÉΓòÉΓòÉ
  15.  
  16. When you want to select an area of interest on the screen, you usually move the 
  17. pointer to the applicable point and signal (by clicking a mouse, for example) 
  18. that this is the object you want. This selection process most commonly is used 
  19. for graphic applications. For example, your application could permit a user to 
  20. select an object, then change its color. Correlation, however, can also be used 
  21. in nongraphic applications. For example, your application could model the 
  22. operation of a calculator and permit a user to select numbers for mathematical 
  23. operations. 
  24.  
  25. The area of interest is defined by the operating system as a small rectangle, 
  26. centered on the (x,y) coordinate position, that has been sent to the 
  27. application. The virtual rectangle the application generates is known as the 
  28. pick aperture. The following figure shows an example of a pick aperture. 
  29.  
  30. The Pick Aperture 
  31.  
  32. The process of determining what lies in the pick aperture differs between 
  33. nonretained and retained graphics. For nonretained graphics, the presentation 
  34. space must be put in a state that supports correlation before the primitives 
  35. are drawn. Then correlation is performed while the primitives are being drawn. 
  36. For retained graphics, the segments that contain the graphics can be replayed, 
  37. permitting correlation after the primitives are drawn. 
  38.  
  39. Note:  The necessity to correlate graphics can usually be predicted. Therefore 
  40. you can plan for it when designing applications. However, this does not mean 
  41. that you have to create retained (rather than nonretained) graphic segments. 
  42. The decision to retain graphics is dependent on several considerations of which 
  43. correlation is only one. 
  44.  
  45.  
  46. ΓòÉΓòÉΓòÉ 1.1.1. Correlating Nonretained Graphics ΓòÉΓòÉΓòÉ
  47.  
  48. For the purposes of correlation, nonretained graphics are those graphics that 
  49. are being correlated during the drawing process. Nonretained graphics can exist 
  50. in nonretained graphic segments or completely outside any segment structure. 
  51. Primitives outside segments are detectable when the applicable draw control is 
  52. set. 
  53.  
  54. Nonretained graphics, inside a segment bracket, can be created in either draw 
  55. or draw-and-retain modes. If created in draw-and-retain mode, a segment, at 
  56. first, is considered nonretained while the primitives in the segment are being 
  57. drawn; then it is considered retained. To be correlated, nonretained segments 
  58. must have unique, nonzero identifiers, and must be defined as detectable. The 
  59. primitives within these segments can be tagged just as primitives in retained 
  60. segments are. However, the tags do not influence the correlation process for 
  61. nonretained graphics. 
  62.  
  63. To get correlation data from the drawing of nonretained graphics, three steps 
  64. must be performed- after creation of the presentation space but before drawing 
  65. the primitives: 
  66.  
  67.    1. Call GpiSetDrawControl to switch on the correlation flag (DCTL_CORRELATE, 
  68.       DCTL_ON). 
  69.  
  70.    2. Call GpiSetPickApertureSize, if necessary, to change the size of the pick 
  71.       aperture. 
  72.  
  73.    3. Call GpiSetPickAperturePosition, if necessary, to explicitly position the 
  74.       aperture. As input to this function, you provide the coordinate position 
  75.       on which the pick aperture is to be centered, using presentation page 
  76.       coordinates. 
  77.  
  78.  Correlation is performed for the following functions: 
  79.  
  80.      Individual primitive-drawing requests, for example, GpiBox 
  81.      GpiPutData 
  82.      GpiElement 
  83.      GpiPlayMetaFile 
  84.  
  85.  Correlation is never performed for GpiErase 
  86.  
  87.  You detect correlation hits by examining the returned values from the GPI 
  88.  functions. If GpiLine, for example, draws a line that intersects the pick 
  89.  aperture, it returns a value of GPI_HITS to indicate a correlation hit. If the 
  90.  line does not intersect the pick aperture, GpiLine returns a value of GPI_OK, 
  91.  to indicate the successful drawing of a line without a correlation hit. 
  92.  GpiLine returns a value of GPI_ERROR if an error is detected. 
  93.  
  94.  If the line intersects the pick aperture, a correlation hit is returned even 
  95.  if the line style is LINETYPE_INVISIBLE. For other primitives, if the object 
  96.  is drawn in outline mode, a correlation hit is returned only if the pick 
  97.  aperture intersects the boundary. If the object is in fill mode, a correlation 
  98.  hit is returned if the pick aperture intersects or lies within the boundary. 
  99.  
  100.  The following figure is an example of primitives intersecting the pick 
  101.  aperture. 
  102.  
  103.  Correlating Nonretained Graphics 
  104.  
  105.  Each GPI function whose output intersects the pick aperture returns a hit 
  106.  (GPI_HIT). GpiBox, whose output does not intersect the pick aperture, returns 
  107.  GPI_OK. 
  108.  
  109.  
  110. ΓòÉΓòÉΓòÉ 1.1.2. Correlating Retained Graphics ΓòÉΓòÉΓòÉ
  111.  
  112. The information in a retained graphic segment can be redrawn; therefore, 
  113. setting up an environment for correlation is not necessary. Correlation on 
  114. retained segments is processed through segment IDs and tags throughout the 
  115. segments. 
  116.  
  117. For any retained segment to be a candidate for correlation, the following must 
  118. be done: 
  119.  
  120.    1. Call GpiOpenSegment with a unique, nonzero identifier. 
  121.  
  122.    2. Call GpiSetSegmentAttrs with the following settings: 
  123.  
  124.         a. ATTR_DETECTABLE switched ON 
  125.         b. ATTR_DYNAMIC left OFF (default), 
  126.            unless the segment is unchained and, therefore, drawn 
  127.            non-dynamically 
  128.         c. ATTR_PROP_DETECTABLE left ON (default), 
  129.            in any segment that calls the candidate segment 
  130.  
  131.    3. Call GpiSetTag at appropriate locations within the segment. 
  132.  
  133.  Note:  The preceding is the recommended method. However, an application still 
  134.  can receive correlation data about invisible segments. 
  135.  
  136.  
  137. ΓòÉΓòÉΓòÉ 1.1.2.1. Tagging Primitives within a Segment ΓòÉΓòÉΓòÉ
  138.  
  139. GpiSetTag inserts a long integer value, called a tag, at the current element 
  140. pointer position. The tag becomes a segment element, which serves as an 
  141. identifier for the primitives that follow until the next tag is issued. Tags 
  142. also are called pick tags or pick identifiers. Typically, applications assign 
  143. tags only to elements that correspond to primitives. You can determine the 
  144. value of the last tag assigned to an element using GpiQueryTag. 
  145.  
  146. Note:  Tags are used only in correlation. They are not used in the chaining or 
  147. calling of segments, nor do they cause or modify output. 
  148.  
  149. The long integer value of the tag is 0 by default. However, a 0 value makes the 
  150. subsequent primitives undetectable. An application can use this effect to make 
  151. some parts of a segment detectable and other parts of it non-detectable. If you 
  152. know that this capability is unnecessary, you can change the default tag value 
  153. using GpiSetDefTag. 
  154.  
  155. The tag you specify becomes the current tag, and it applies to all subsequent 
  156. primitives until you next call GpiSetTag. The tag can be considered one of the 
  157. attributes of the primitive and therefore affected by the current attribute 
  158. mode. In AM_PRESERVE mode, it is stored on the LIFO stack and can be recalled 
  159. with GpiPop. Tags cannot be inserted between a GpiBeginArea and GpiEndArea area 
  160. bracket. All primitives within an area have the same tag. 
  161.  
  162. A tag value greater than 0 enables correlation on the subsequent primitives, 
  163. but only if the segment ID is greater than 0 as well. The data returned from 
  164. each correlation consists of a set of segment-tag pairs. The reason for this 
  165. pairing is that a single segment can draw objects in several locations. By 
  166. adding identifiers within the segment, an application has a more exact 
  167. description of what has intersected the pick aperture. 
  168.  
  169. For simple chained segments, each unique segment-tag pair within the pick 
  170. aperture is known as a hit. If two or more primitives in the pick aperture have 
  171. the same tag, they are considered a single hit. Hits for called segments differ 
  172. slightly and are described in The lMaxDepth Input Parameter. 
  173.  
  174.  
  175. ΓòÉΓòÉΓòÉ 1.1.2.2. Correlation Functions for Retained Graphics ΓòÉΓòÉΓòÉ
  176.  
  177. The PM has three different functions that enable you to correlate a uniquely 
  178. identified retained segment. 
  179.  
  180.  Function                 Description 
  181.  
  182.  GpiCorrelateSegment      Permits correlation on a single segment. 
  183.  
  184.  GpiCorrelateFrom         Permits correlation on a range of segments from a 
  185.                           segment chain. 
  186.  
  187.  GpiCorrelateChain        Permits correlation on the entire segment chain. 
  188.  
  189.  For nonretained graphics, the correlation hits are returned by the actual 
  190.  drawing commands. For retained graphics, the correlation hits are returned by 
  191.  the three correlation functions listed above. 
  192.  
  193.  The size of the pick aperture is set using GpiSetPickApertureSize, just as 
  194.  with nonretained graphics. However, the coordinate position on which the pick 
  195.  aperture is centered usually is obtained from operator input, for example, 
  196.  from a WM_BUTTON1DOWN message, instead of from GpiSetPickAperturePosition. 
  197.  
  198.  After the graphics orders that create pictures are stored in retained 
  199.  segments, the pictures can be re-created by your application with the various 
  200.  GpiDraw... functions. Then the user can view the pictures, if the output is 
  201.  directed to a screen for example. After the user selects an area of interest, 
  202.  a GpiCorrelate... function redraws the picture internally to determine just 
  203.  what intersects the pick aperture. The user does not see the re-creation. A 
  204.  standard order of functions within your application would be: 
  205.  
  206.      GpiDraw... 
  207.      GpiSetPickApertureSize 
  208.      GpiCorrelate... 
  209.  
  210.  
  211. ΓòÉΓòÉΓòÉ 1.1.2.3. The Correlation Input Parameters ΓòÉΓòÉΓòÉ
  212.  
  213. There is only one segment chain per presentation space. Therefore 
  214. GpiCorrelateChain needs the presentation space handle as input. The segment 
  215. correlation functions need both the presentation space handle and the segment 
  216. IDs. 
  217.  
  218. All three correlation functions require the following as input: 
  219.  
  220.      Correlation attribute type 
  221.      Maximum number of hits 
  222.      Number of segment-tag pairs to be returned for a single hit, called the 
  223.       pair depth 
  224.  
  225.  
  226. ΓòÉΓòÉΓòÉ 1.1.2.3.1. The lType Input Parameter ΓòÉΓòÉΓòÉ
  227.  
  228. The two classifications of segments upon which you can request correlation are 
  229. the following: 
  230.  
  231.      Segments that have been defined as both detectable and visible 
  232.      All nonzero segments, regardless of their detectability and visibility 
  233.       attributes 
  234.  
  235.  
  236. ΓòÉΓòÉΓòÉ 1.1.2.3.2. The lMaxHits Input Parameter ΓòÉΓòÉΓòÉ
  237.  
  238. The correlation functions return the number of hits made on the retained 
  239. segments. The following figure is an example of a line intersecting the pick 
  240. aperture. 
  241.  
  242. Retained Segment Correlation with One Hit 
  243.  
  244. The intersection of a unique segment-identified and -tagged primitive with the 
  245. pick aperture (pa) produces one hit.  If the pick aperture size were increased, 
  246. there still would be only 1 hit. The triangle produces no hit because its tag 
  247. is 0. 
  248.  
  249. The following figure is an example of multiple primitives intersecting the pick 
  250. aperture. 
  251.  
  252. Retained Segment Correlation with Multiple Hits 
  253.  
  254. Four separate primitives intersect the pick aperture; however, since two 
  255. primitives share the same tag, and one primitive has a segment ID of 0, there 
  256. are only two hits. 
  257.  
  258. Your application can set a limit on the number of hits to return from a 
  259. correlation function. The maximum-number-of-hits parameter influences the size 
  260. of the array created to handle the segment-tag pair returned for each hit. By 
  261. comparing the maximum number desired to the actual number of hits, your 
  262. application can determine whether all hits are accounted for. The following 
  263. figure shows an example of the alSegTag data structure that contains the 
  264. segment-tag pairs for the previous figure. 
  265.  
  266. alSegTag Data Structure 
  267.  
  268. As shown in the previous figure, the The identifier-tag pairs are returned to 
  269. the application in the reverse order of their occurrence on the segment chain. 
  270. That is, the highest priority segment is returned first. Therefore, the 
  271. application can identify the topmost segment, which is the segment most likely 
  272. to have been picked. 
  273.  
  274.  
  275. ΓòÉΓòÉΓòÉ 1.1.2.3.3. The lMaxDepth Input Parameter ΓòÉΓòÉΓòÉ
  276.  
  277. When a called segment is picked, correlation data is returned also for all 
  278. segments above it in the hierarchy, up to and including the root segment. The 
  279. following figure is an example of a picture drawn from a complex segment chain 
  280. with called segments. 
  281.  
  282. Multiple Hits from a Called Segment 
  283.  
  284. Two separate items, called from different portions of the segment chain, 
  285. intersect the pick aperture. Each has a unique segment identifier and tag, so 
  286. there are two hits. 
  287.  
  288. For called segments, the group of segment-tag pairs constitutes a single hit. 
  289. You can limit the number of segment and tag pairs returned for each hit using 
  290. the maximum depth parameter, just as you can limit the total number of hits 
  291. returned to you using the maximum number of hits parameter. The following 
  292. figure shows two examples of the alSegTag data structure from the previous 
  293. figure, for two different lMaxDepth values. 
  294.  
  295.           ΓöîΓöÇ ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ ΓöÇΓöÇΓöÉ            ΓöîΓöÇΓöÇΓöÇ ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ ΓöÇΓöÇΓöÉ
  296.           Γöé  Γöéid = 300Γöé  0Γöé            Γöé    Γöéid = 300Γöé  0Γöé
  297.           Γöé  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γöé            Γöé    Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γöé
  298.           Γöé  Γöétag = 12Γöé  1Γöé            Γöé    Γöétag = 12Γöé  1Γöé
  299.     ΓöîΓöÇ ΓöÇΓöÇΓöñ  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γöé            Γöé    Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γöé
  300.     Γöé     Γöé  Γöéid = 100Γöé  2Γöé            Γöé    Γöéid = 100Γöé  2Γöé
  301.     Γöé     Γöé  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γöé            Γöé    Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γöé
  302.     Γöé     Γöé  Γöétag = 1 Γöé  3Γöé  2 actual  Γöé    Γöétag = 1 Γöé  3Γöé
  303.     Γöé     Γò₧ΓòÉ Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γö£ΓöÇΓöÇ  hits  ΓöÇΓöÇΓöñ    Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γö£ΓöÇ ΓöÇΓöÉ
  304.     Γöé     Γöé  Γöéid = 222Γöé  4Γöé  returned  Γöé    Γöé    0   Γöé  4Γöé    Γöé
  305.     Γöé     Γöé  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γöé            Γöé    Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γöé    Γöé
  306.  IMax     Γöé  Γöétag = 6 Γöé  5Γöé            Γöé    Γöé    0   Γöé  5Γöé    Γöé
  307.  hitsΓöÇ ΓöÇΓöÇΓöñ  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γöé            Γöé    Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γöé    Γöé
  308.  = 3      Γöé  Γöéid = 220Γöé  6Γöé            Γöé    Γöé    0   Γöé  6Γöé    Γöé
  309.     Γöé     Γöé  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γöé            Γöé    Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γöé    Γöé
  310.     Γöé     Γöé  Γöétag = 4 Γöé  7Γöé            Γöé    Γöé    0   Γöé  7Γöé    Γöé
  311.     Γöé     Γò₧ΓòÉ Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ ΓòÉΓòÉΓòí            Γöé ΓöîΓöÇ Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ ΓòÉΓòÉΓòí    Γöé
  312.     Γöé     Γöé  Γöé    ?   Γöé  8Γöé            Γöé Γöé  Γöéid = 222Γöé  8Γöé    Γöé
  313.     Γöé     Γöé  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γöé            Γöé Γöé  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γöé    Γöé
  314.     Γöé     Γöé  Γöé    ?   Γöé  9Γöé  IMax      Γöé Γöé  Γöétag = 6 Γöé  9Γöé    Γöé
  315.     ΓööΓöÇ ΓöÇΓöÇΓöñ  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γö£ΓöÇ Depth     Γöé Γöé  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γöé    Γöé
  316.           Γöé  Γöé    ?   Γöé 10Γöé  = 2       Γöé Γöé  Γöéid = 220Γöé 10Γöé    Γöé
  317.           Γöé  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γöé            Γöé Γöé  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γöé    Γöé
  318.           Γöé  Γöé    ?   Γöé 11Γöé       IMax Γöé Γöé  Γöétag = 4 Γöé 11Γöé  IMax
  319.           ΓööΓöÇ ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ ΓöÇΓöÇΓöÿ       DepthΓöéΓöÇΓöñ  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γö£ΓöÇ hits
  320.                                   = 4  Γöé Γöé  Γöéid = 200Γöé 12Γöé  = 3
  321.                                        Γöé Γöé  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γöé    Γöé
  322.                                        Γöé Γöé  Γöétag = 2 Γöé 13Γöé    Γöé
  323.                                        Γöé Γöé  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γöé    Γöé
  324.                                        Γöé Γöé  Γöéid = 100Γöé 14Γöé    Γöé
  325.                                        Γöé Γöé  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γöé    Γöé
  326.                                        Γöé Γöé  Γöétag = 1 Γöé 15Γöé    Γöé
  327.                                        ΓööΓöÇΓööΓöÇ Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ ΓòÉΓòÉΓòí    Γöé
  328.                                             Γöé    ?   Γöé 16Γöé    Γöé
  329.                                             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γöé    Γöé
  330.                                             Γöé    ?   Γöé 17Γöé    Γöé
  331.                                             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γöé    Γöé
  332.                                             Γöé    ?   Γöé 18Γöé    Γöé
  333.                                             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γöé    Γöé
  334.                                             Γöé    ?   Γöé 19Γöé    Γöé
  335.                                             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γö£ΓöÇ ΓöÇΓöÿ
  336.                                             Γöé    ?   Γöé 20Γöé
  337.                                             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γöé
  338.                                             Γöé    ?   Γöé 21Γöé
  339.                                             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γöé
  340.                                             Γöé    ?   Γöé 22Γöé
  341.                                             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ   Γöé
  342.                                             Γöé    ?   Γöé 23Γöé
  343.                                             ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ ΓöÇΓöÇΓöÿ
  344.  
  345. alSegTag Data Structure for Different lMaxDepth Values 
  346.  
  347. Unused segment-tag pairs for actual hits are set to 0 in the alSegTag array. 
  348.  
  349. There are two major reasons for the PM to provide this capacity. The first is 
  350. the consideration of application storage. If your application is a graphics 
  351. package, for example, providing extensive design capabilities to an end user, 
  352. the user's drawing may be very complex with 10 or more levels of segment 
  353. calling. The data returned from a single hit could require an alSegTag array so 
  354. large the data overruns the application storage you had reserved. By setting a 
  355. maximum calling depth, your application can reserve the correct amount of 
  356. storage. 
  357.  
  358. The second consideration is the knowledge that your application's user is 
  359. interested only in a certain level of calling depth. Many users will be 
  360. interested only in the topmost called segment, because it usually is the 
  361. segment containing the functions that performs the actual drawing. 
  362.  
  363.  
  364. ΓòÉΓòÉΓòÉ 1.1.3. Pick Aperture ΓòÉΓòÉΓòÉ
  365.  
  366. Your application determines the size of the pick aperture using 
  367. GpiQueryPickApertureSize, and determines the page space coordinates of the 
  368. center of the aperture with GpiQueryPickAperturePosition. 
  369.  
  370. Because your objective is to retrieve a single detectable object for each 
  371. correlation operation, you have to obtain a balance between the number of 
  372. detectable objects in a picture and the size of the pick aperture. The more 
  373. detectable objects you define, the smaller the pick aperture must be to return 
  374. a manageable amount of information to the application. However, the pick 
  375. aperture usually is not a 1 pel-by-1 pel rectangle. A larger rectangle makes 
  376. better sense because the pick aperture can be difficult to hit with a single 
  377. pel; but a larger sampling area, for example 4 pels-by-4 pels, increases the 
  378. probability of an intersection between a lighted pel and the pick aperture. 
  379.  
  380. The pick aperture can be specified in any of the units available to the 
  381. presentation space. However, the type of unit must be identical to the type 
  382. specified for the presentation page. The default size of the pick aperture is 
  383. square, with sides equal to the default character cell height. 
  384.  
  385.  
  386. ΓòÉΓòÉΓòÉ 1.2. Using Correlation ΓòÉΓòÉΓòÉ
  387.  
  388. This section explains how to perform correlation on the graphics associated 
  389. with a segment. 
  390.  
  391. The following figure shows how to set the pick aperture size with 
  392. GpiSetPickAperture and correlate the segment chain with GpiCorrelateChain, 
  393. passing it the pick-aperture position as the third argument. The functions use 
  394. the psizlPick and pptlPick arguments to set the aperture size and position the 
  395. aperture center. The correlation is performed on visible and detectable 
  396. segments only (PICKSEL_VISIBLE). GpiCorrelateChain copies any segment-tag pairs 
  397. to the buffer pointed to by alSegTag and returns the count of hits detected. 
  398.  
  399. #define INCL_GPICORRELATION
  400. #include <os2.h>
  401. LONG fncCORL01  (HPS hps, PSIZEL psizlPick, PPOINTL pptlPick,
  402.                   LONG lMaxHits, LONG lMaxDepth, PLONG alSegTag)
  403.     {
  404.         LONG cHits;
  405.  
  406.         GpiSetPickApertureSize(hps, PICKAP_REC, psizlPick);
  407.                                                      /* Set the pick aperture. */
  408.  
  409.         cHits = GpiCorrelateChain(hps, PICKSEL_VISIBLE, pptlPick,
  410.                     lMaxHits, lMaxDepth, alSegTag);
  411.                                                      /* Correlate the hits.    */
  412.  
  413.         return (cHits);                              /* Return count of hits.  */
  414.  
  415. } /* fncCORL01 */
  416.  
  417.  
  418. ΓòÉΓòÉΓòÉ 2. Coordinate Spaces and Transformations ΓòÉΓòÉΓòÉ
  419.  
  420. A transformation is an operation performed on a graphics object that changes 
  421. the object in one of four ways:  translation, rotation, scaling and shearing. 
  422. Transformations enable an application to control the location, orientation, 
  423. size, and shape of graphics output on any output device. 
  424.  
  425. The transformation of graphics output can be conceptually divided into a series 
  426. of distinct transformations applied from one logical stopping point to another. 
  427. Coordinate spaces are used as a method of conceptualizing these logical 
  428. stopping points. The coordinate spaces are concepts used to explain and 
  429. manipulate the transformation process. 
  430.  
  431. A graphics primitive in an intermediate coordinate space cannot be displayed on 
  432. an output device and a transformation cannot be interrupted at one of the 
  433. distinct stages. The entire series of transformation steps is applied all at 
  434. once. 
  435.  
  436. This chapter describes the transformation design process. The following topics 
  437. are related to the information in this chapter: 
  438.  
  439.      Presentation spaces and device contexts 
  440.      Segments and retained graphics 
  441.      Clipping 
  442.  
  443.  
  444. ΓòÉΓòÉΓòÉ 2.1. About Coordinate Spaces ΓòÉΓòÉΓòÉ
  445.  
  446. Most of the GPI functions draw their output in a conceptual area called the 
  447. world coordinate space. If you picture the presentation space as a blank canvas 
  448. on which to draw, the world coordinate space is a Cartesian grid that provides 
  449. a reference of scale for what is being drawn. 
  450.  
  451. The components of a picture defined in a world coordinate space are often 
  452. defined to a scale convenient only to that component. Applications also can 
  453. define each component, or subpicture, starting at the origin (0,0). This 
  454. enables applications to define the scale of a subpicture and the location of 
  455. the subpicture separately. The ability to define all subpictures at the origin 
  456. means there is not always 1-to-1 correspondence between a presentation space 
  457. and a world coordinate space. Frequently a separate world coordinate space 
  458. exists for every subpicture. 
  459.  
  460. After subpictures are defined in the world coordinate space, they undergo a 
  461. process called transformation and then appear on an output device. If an 
  462. application has not specifically applied a transformation to its subpictures, 
  463. by default the PM applies the identity transformation, which, in effect, makes 
  464. no changes to the subpicture. 
  465.  
  466. All graphics systems, not just the PM, use at least one coordinate space to 
  467. generate output. The simplest graphics systems use a single coordinate space, 
  468. whose points are the pels on the display. These are sometimes called 
  469. single-space systems. 
  470.  
  471. The PM creates multiple coordinate spaces and uses transformations to move 
  472. subpictures between the coordinate spaces. The PM assembles the application's 
  473. graphic output in a process that can use up to five coordinate spaces, known 
  474. collectively as the viewing pipeline. The PM coordinate spaces are: 
  475.  
  476.      World coordinate space 
  477.      Model space 
  478.      Page space 
  479.      Device space 
  480.      Media space. 
  481.  For those who are more familiar with a graphics system that uses a 
  482.  single-coordinate space, the following table lists the differences to expect 
  483.  when using PM's multi-coordinate space. 
  484.  
  485.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  486.   ΓöéSingle-Coordinate Space       ΓöéPM Multi-Coordinate System    Γöé
  487.   ΓöéSystems                       Γöé                              Γöé
  488.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  489.   ΓöéDistances and locations       ΓöéSeven units of measurement,   Γöé
  490.   Γöéspecified in pels.            Γöéincluding pels, are available.Γöé
  491.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  492.   ΓöéBecause the shape, or aspect  ΓöéThe output is device          Γöé
  493.   Γöératio, and size of pels can   Γöéindependent.                  Γöé
  494.   Γöévary on different devices, theΓöé                              Γöé
  495.   Γöégraphic primitives on one     Γöé                              Γöé
  496.   Γöédevice might look different onΓöé                              Γöé
  497.   Γöéanother.                      Γöé                              Γöé
  498.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  499.   ΓöéCoordinates entered must      ΓöéCoordinates are made          Γöé
  500.   Γöéalready be device coordinates.Γöédevice-compatible through the Γöé
  501.   Γöé                              ΓöéPM.                           Γöé
  502.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  503.  
  504.  Additionally, a single-space system requires that applications keep track of: 
  505.  
  506.      The scaling between the subpictures. Often this is accomplished by 
  507.       forcing the definition of objects to the scale of the picture, instead of 
  508.       to the scale of the subpicture. 
  509.  
  510.      The scaling between the creation space and output space. Often this is 
  511.       accomplished by forcing the definition of objects to the scale of the 
  512.       paper or window, instead of to the scale of the subpicture. 
  513.  
  514.      All aspects of other transformations. 
  515.  
  516.  
  517. ΓòÉΓòÉΓòÉ 2.1.1. World Coordinate Space ΓòÉΓòÉΓòÉ
  518.  
  519. The world coordinate space is where most drawing coordinates are specified. 
  520. Each primitive in a world coordinate space is defined using the coordinate 
  521. positions in the primitive's definition. For example, if an application draws a 
  522. line from (8,4) to (20,75), the coordinate values (8,4) and (20,75) are world 
  523. coordinates. 
  524.  
  525. The world coordinate space is specified when the presentation space is created 
  526. with GpiCreatePS. The PS_FORMAT option supports two sizes of world coordinate 
  527. spaces:  short and long. If the size is short (GPIF_SHORT), the world 
  528. coordinate space is a rectangular Cartesian space with maximum coordinates of 
  529. (32767, 32767) and minimum coordinates of (-32768, -32768). If the world 
  530. coordinate space is short, it is the application's responsibility to ensure 
  531. that the coordinates defining the subpicture fall within this range. 
  532.  
  533. The second size, long (GPIF_LONG), is the default for the world coordinate 
  534. space. Most GPI functions that direct their output to the world coordinate 
  535. space, for example GpiLine, accept 32-bit integers as parameters. A 32-bit 
  536. integer is equivalent to a rectangular Cartesian space with maximum coordinates 
  537. of (134217727, 134217727) and minimum coordinates of (-134217728, -134217728). 
  538.  
  539. World coordinates do not have to be within the range of the presentation page. 
  540. A graphic image that requires a high degree of detail and precision might use 
  541. most or all of the available coordinate range. A transformation is used to 
  542. scale the graphic image down to an appropriate size. The actual presentation 
  543. page size is unimportant in most cases. It is used with the page viewport to 
  544. redefine the device transform if GpiSetPageViewport is called. 
  545.  
  546. An application can use a clip path clipping area to define the part of the 
  547. world space to place in the next coordinate space (the model space). A clip 
  548. path is the only clipping region that can be nonrectangular. Its edges can 
  549. include arcs, curves, and straight lines. The coordinates that define the 
  550. dimensions and shape of a clip path are always world coordinates. (Clipping is 
  551. further described in Clipping and Boundary Determination.) 
  552.  
  553. In a world-coordinate space, there can be several graphic primitives. If, 
  554. however, an application uses the DM_RETAIN drawing mode to store output in 
  555. graphic segments, the operating system assigns a new world space to each 
  556. segment. There is also a world space for the drawings outside of segments. 
  557.  
  558.  
  559. ΓòÉΓòÉΓòÉ 2.1.2. Model Space ΓòÉΓòÉΓòÉ
  560.  
  561. Model space is the conceptual area where the separate components of a picture, 
  562. defined in world space, are brought together. To assemble one or more 
  563. primitives from world spaces to model space, the application specifies the 
  564. transformations to occur. Then the PM applies them to each of the components. 
  565. Model transformations convert world coordinates to model-space coordinates. For 
  566. example, an octagon and the word STOP, defined individually in separate 
  567. world-coordinate spaces, can be assembled into a stop sign in model space. 
  568.  
  569. Graphics applications can have more than one model space. If there is more than 
  570. one model space, the picture components are assembled in page space. If an 
  571. application has each model space in a different segment, the model transforms 
  572. are reset for each segment. 
  573.  
  574. An application can use a viewing limit clipping area to define the part of a 
  575. model space to place in the next coordinate space (the page space). A viewing 
  576. limit is always rectangular, and the coordinates that define its location and 
  577. dimensions are always model coordinates. 
  578.  
  579.  
  580. ΓòÉΓòÉΓòÉ 2.1.3. Page Space ΓòÉΓòÉΓòÉ
  581.  
  582. The page space is where a complete picture is assembled for viewing on a 
  583. display screen, or for printing or plotting on a piece of paper. Page 
  584. coordinate units can be increments of an inch, a meter, pels, or some arbitrary 
  585. value. An application uses GpiCreatePS to specify the units used for page 
  586. coordinates. 
  587.  
  588. If the application uses retained-drawing mode, the picture in page space 
  589. contains parts of models (or pictures) from each of the model spaces that have 
  590. not been clipped. The picture also contains any additional unclipped 
  591. graphics-primitive output that the application generated in nonretained-drawing 
  592. mode. If the application uses nonretained-drawing mode, the picture in page 
  593. space contains all the graphics-primitive output that has not been clipped. 
  594.  
  595. In the page space, an application can use a rectangular clipping area called a 
  596. graphics field to define the part of the page space to place in the next 
  597. coordinate space (the device space). The coordinates that define the location 
  598. and dimensions of the graphics field are always page coordinates. 
  599.  
  600. The page space contains the presentation page whose size and units are defined 
  601. when creating the presentation space with GpiCreatePS. The presentation page is 
  602. a rectangle in page space. 
  603.  
  604.  
  605. ΓòÉΓòÉΓòÉ 2.1.4. Device Space ΓòÉΓòÉΓòÉ
  606.  
  607. The device space is the coordinate space in which a picture is drawn before it 
  608. appears in a display screen window or on the printer or plotter. 
  609.  
  610. Device space is defined in device-specific units. Depending on the page unit 
  611. used, device-coordinate units can be pels, increments of an inch, increments of 
  612. a meter, or arbitrary. For example, if the page unit is pels, the 
  613. device-coordinate unit is pels; if the page units are arbitrary, the 
  614. device-coordinate units are arbitrary. 
  615.  
  616.  
  617. ΓòÉΓòÉΓòÉ 2.1.5. Media Space ΓòÉΓòÉΓòÉ
  618.  
  619. The media space is used only with windows. When an application draws a 
  620. primitive at a specified location in a window, it is not actually drawing in 
  621. the device space, as the device is the entire terminal screen. 
  622.  
  623. Drawing in a window involves a shifting transformation which moves a drawing 
  624. from the given (unitless) position, to position in the specified window. 
  625.  
  626.  
  627. ΓòÉΓòÉΓòÉ 2.2. About Transformations ΓòÉΓòÉΓòÉ
  628.  
  629. The coordinate spaces are connected by different transformation functions. In 
  630. reality, the input coordinates of the world coordinate space are transformed 
  631. directly into device coordinates in a single operation. The intermediate 
  632. coordinate spaces exist only to provide a useful model to assist in the 
  633. understanding of how to define the different transformation matrixes. 
  634.  
  635. Transformation of graphic primitives occur when a transformation matrix is 
  636. applied to those primitives. The individual transformations introduced here do 
  637. not actually transform the primitives, but rather define portions of the 
  638. transformation matrix. After all portions of the matrix are identified, the 
  639. actual operation is performed in a single step. 
  640.  
  641. The transformation functions manipulate graphics primitives as they move from 
  642. one coordinate space to the next. Transformation functions usually begin with 
  643. the letters Gpi. Most of the function names have a transformation type that 
  644. identifies the entities on which it operates. For example, a model 
  645. transformation is the transformation type that transforms graphics primitives 
  646. between a world coordinate space and a model space. There is a 1-to-1 
  647. correspondence between these transformation types and the actual functions. The 
  648. transformation matrix data structure is called MATRIXLF. 
  649.  
  650. The following figure lists the sequence of coordinate spaces and the 
  651. transformation types between the coordinate spaces. Internally, all 
  652. transformations are combined, and the resulting values are held in the same 
  653. format as the individual components. By default, there is no viewing window and 
  654. no graphics field. The application can use the default page viewport. Clipping 
  655. regions for each coordinate space are also shown. 
  656.  
  657. Viewing Pipeline 
  658.  
  659.  
  660. ΓòÉΓòÉΓòÉ 2.2.1. Identity Transformation ΓòÉΓòÉΓòÉ
  661.  
  662. The identity transformation is the default transformation between all 
  663. coordinate spaces. The identity transformation, makes no change to the original 
  664. coordinates of an object. This transformation is also referred to as the unity 
  665. transformation, because of the mathematical matrix used to make this 
  666. transformation. 
  667.  
  668. The identity matrix looks like this: 
  669.  
  670.  
  671.      Γöî         ΓöÉ
  672.      Γöé 1  0  0 Γöé
  673.      Γöé 0  1  0 Γöé
  674.      Γöé 0  0  1 Γöé
  675.      Γöö         Γöÿ
  676.  
  677. (Transformations are accomplished with matrix multiplication; and 1, not 0, is 
  678. the multiplication identity.) 
  679.  
  680. If a transformation is not explicitly specified, the identity transformation is 
  681. used to create that portion of the transformation matrix. Most transformations 
  682. applied to a primitive can be in addition to, or instead of, the current 
  683. transformation. 
  684.  
  685.  
  686. ΓòÉΓòÉΓòÉ 2.2.2. Moving through Coordinate Spaces Using the Identity Transformation ΓòÉΓòÉΓòÉ
  687.  
  688. The effects of transformation can be minimized by defaulting to the identity 
  689. transformation. This means that no deliberate action is requested by the 
  690. application. 
  691.  
  692. Graphic primitives are drawn in their own coordinate scale in world coordinate 
  693. space. The primitives are then combined in model space. Neither the world 
  694. coordinate space or the model space have "real world" units associated with 
  695. them. This means that if an application draws a line on the x-axis from -300000 
  696. to +300000, the line exists as a line 600000 Cartesian units long in both world 
  697. coordinate and model space. 
  698.  
  699. Page space is the first of the coordinate spaces to be associated with units 
  700. such as millimeters or inches. These units are set with the GpiCreatePS option 
  701. PS_UNITS. If the application specifies the option PS_UNITS with the value 
  702. PU_ARBITRARY, the page space remains unitless; units are applied when the 
  703. output is drawn in device space. 
  704.  
  705. As an example, assume that the units PU_LOMETRIC, (0.1 mm) have been chosen. 
  706. Again, assuming the identity transformation between model and page space, the 
  707. primitive appears in the page space as a line that extends 
  708.  
  709. 300000 * 0.1mm to the right of the origin
  710. 300000 * 0.1mm to the left of the origin
  711.  
  712. A presentation page, a rectangle in page space, has its size defined when a 
  713. presentation space is created with GpiCreatePS. The presentation page format is 
  714. defined with the GpiCreatePS option, PS_FORMAT. The three choices for that 
  715. option are: 
  716.  
  717.      GPIF_DEFAULT-32-bit integers or 2GB 
  718.      GPIF_LONG-32-bit integers 
  719.      GPIF_SHORT-16-bit integers or 32KB. 
  720.  
  721.  PS_FORMAT affects the number of units permitted along the coordinate axes of 
  722.  the presentation page. If the choice was GPIF_LONG or GPIF_DEFAULT, and, for 
  723.  example, PS_UNITS remains PU_LOMETRIC, the presentation page axes could range 
  724.  from 0 to 134217727 0.1mm. If the choice was GPIF_SHORT, the coordinate axes 
  725.  could range only from 0 to 32767 0.1mm. These limits are the maximum number of 
  726.  units, presentation pages are usually much smaller. 
  727.  
  728.  The presentation page does not affect the primitive in presentation space, it 
  729.  determines what parts of the primitive are visible. With no transformation to 
  730.  scale down the primitive from the model to the page space, the presentation 
  731.  page acts like a sheet of cardboard with a rectangular hole. Only the part of 
  732.  the page space behind the "hole" is visible in page space. The view of 
  733.  everything else is blocked by the "cardboard." Only what is visible in the 
  734.  page space is drawn to the next coordinate space. 
  735.  
  736.  Continuing with the example of the 600000 units line above, if GPIF_LONG (or 
  737.  GPIF_DEFAULT) is selected, the 600000 unit line could easily be viewed in the 
  738.  presentation page. If GPIF_SHORT is selected, the maximum presentation page 
  739.  size is 65534 * 0.1 mm units long. In the case, much of the 600000 unit line 
  740.  would not be drawn into the next coordinate space. 
  741.  
  742.  The device space is not affected by the PS_FORMAT option. Whether GPIF_LONG, 
  743.  or GPIF_SHORT, the device space is a rectangle with maximum coordinates of 
  744.  (32767, 32767) and minimum coordinates of (-32768, -32768). Note that not all 
  745.  of this rectangle is visible, since real devices are not that big. The device 
  746.  space relates to the physical device. 
  747.  
  748.  The transformation between the page and device space is handled automatically 
  749.  by the PM. The presentation page is mapped into a rectangle in the device 
  750.  space called the page viewport. This transformation is based on the parameters 
  751.  and options of GpiCreatePS. 
  752.  
  753.  Confusion can arise because the effects of the presentation page and the page 
  754.  viewport appear to be a clipping of the primitives in page and device space. 
  755.  While the action taken is identical, the term clipping is reserved for the 
  756.  activity deliberately designated by the application with clipping functions. 
  757.  
  758.  
  759. ΓòÉΓòÉΓòÉ 2.2.3. Applying Transformations Other Than the Identity Transformation ΓòÉΓòÉΓòÉ
  760.  
  761. To better understand the workings of transformations other than the identity 
  762. transformation, an example of the picture assembly process is illustrated in 
  763. the following figure, and a detailed explanation follows. 
  764.  
  765. Picture Assembly Process 
  766.  
  767. In the world space of the preceding figure four segments are drawn, each 
  768. containing a different subpicture. The units of the subpictures can be 
  769. different (for example, the building might be measured in feet, while the 
  770. window might be measured in inches), because each subpicture is converted to 
  771. the scale of the completed picture when it is transformed into the completed 
  772. picture. All of the subpictures in the previous figure are defined at "real 
  773. world" scales in their own (Cartesian) world coordinate space. 
  774.  
  775. The difference between applying and not applying transformations can be seen in 
  776. the model space in the previous figure. Without transformations, the 
  777. subpictures would be drawn at exactly the coordinates given in the world space 
  778. and thus all four subpictures would overlap. With transformations, the 
  779. subpictures can be scaled and translated to the scale of the final picture. The 
  780. window subpicture, Segment id=200 has been scaled, rotated, and translated. 
  781.  
  782. The model space contains the model of what the application is trying to draw. 
  783. There can be more than one model space for very complex drawings, but this is 
  784. not a recommended style of programming. 
  785.  
  786. The building also resides in the page space and is prepared in the device space 
  787. for printing on an 8 and a half by 11 sheet of paper. This is shown in the 
  788. following figure. Most often the page space to device space transformation (the 
  789. device transformation) is the identity transformation. 
  790.  
  791. Different Spaces 
  792.  
  793. The transformation process in the previous figure is acting on segments. To 
  794. draw the composite picture in model space, create a segment chain that plays 
  795. all four segments associated with the building. The purpose of the 
  796. world-to-model-space transformation is to transform the graphic segments into a 
  797. composite picture. 
  798.  
  799. Having built the composite picture, the next step is to map the composite into 
  800. the page space. Usually, the model-to-page-space transformation is the identity 
  801. transformation. The different coordinate spaces are shown in the previous 
  802. figure. 
  803.  
  804. The user might want an exploded diagram as well as the composite picture. This 
  805. is illustrated in the following figure. To create the exploded diagram, the 
  806. application must draw the segment chain again, with a slight translation down, 
  807. and scaled up (enlarged) with a very large scaling factor. 
  808.  
  809. Again, while it is possible to create several complex images in different model 
  810. spaces that must be assembled in the page space, the most frequent use of the 
  811. page space is to prepare a view of the model-from-model space with the first 
  812. application of "real world" units such as inches or millimeters. As shown in 
  813. the previous figures, both world and model space share unitless Cartesian 
  814. coordinates. 
  815.  
  816. The usual purpose of the page space is to show multiple views of the image 
  817. residing in the model space, as shown in the following figure. 
  818.  
  819. Different Spaces with an Exploded View 
  820.  
  821. The enlarged image on the right side of the page space is drawn after the image 
  822. on the left. It therefore has a higher priority and therefore would be drawn on 
  823. top of the left side image. To obtain a multi-viewed page space image, the 
  824. application defines a clipping region, and applies this region to the second 
  825. (enlarged image) playback of the segment chain. The clipping region permits the 
  826. enlarged image to appear only on the right side of the page space. 
  827.  
  828. The same building also resides in this model space, but it resides in the page 
  829. space, along with an exploded view of the uppermost right side window. The view 
  830. is enlarged to such a magnitude that the details of the window are once again 
  831. evident. If the images in world coordinate space are not able to be drawn in 
  832. the amount of detail now supported by the PM, then drawing details, such as an 
  833. exploded view, would reveal the barrenness of the image. 
  834.  
  835. Subpictures can be drawn in world coordinate space without being drawn inside a 
  836. graphics segment. 
  837.  
  838.  
  839. ΓòÉΓòÉΓòÉ 2.2.4. Combining Transformations Between a Coordinate Space Pair ΓòÉΓòÉΓòÉ
  840.  
  841. There is more than one transformation between the world coordinate and model 
  842. spaces, and between the model and page spaces. Depending on the desired output, 
  843. the transformations can be combined in different ways. 
  844.  
  845. Between the world coordinate and model space, there are five ways of combining 
  846. the three transformations. 
  847.  
  848. World Coordinate to Model Space Transformation Combinations 
  849.  
  850. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  851. ΓöéTransformation Function       ΓöéEffect          ΓöéTransformationΓöé
  852. Γöé                              Γöé                ΓöéType Sequence Γöé
  853. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  854. ΓöéGpiCallSegmentMatrix          ΓöéADD             ΓöéM   I   S     Γöé
  855. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  856. Γöé                              ΓöéPREEMPT         ΓöéI   M   S     Γöé
  857. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  858. Γöé                              ΓöéREPLACE         Γöé    I   S     Γöé
  859. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  860. ΓöéGpiDrawSegment (Call Segment) ΓöéDrawing outside Γöé    M   S     Γöé
  861. Γöé                              Γöéof an instance  Γöé              Γöé
  862. Γöé                              Γöédrawing         Γöé              Γöé
  863. Γöé                              Γöéprimitive but   Γöé              Γöé
  864. Γöé                              Γöéinside a        Γöé              Γöé
  865. Γöé                              Γöésegment.        Γöé              Γöé
  866. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  867. ΓöéNo specific function          ΓöéDrawing outside Γöé        M     Γöé
  868. Γöé                              Γöéof segments     Γöé              Γöé
  869. Γöé                              Γöéaltogether.     Γöé              Γöé
  870. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  871.  
  872. Abbreviations:  I - Instance Transformation, M - Model Transformation, S - 
  873. Segment Transformation 
  874.  
  875. Between the model and page space pair are two transformations and they also can 
  876. be combined in different ways. 
  877.  
  878. Model to Page Space Transformation Combinations 
  879.  
  880. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  881. ΓöéTransformation Function       ΓöéEffect          ΓöéTransformationΓöé
  882. Γöé                              Γöé                ΓöéType Sequence Γöé
  883. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  884. ΓöéGpiSetPageViewport            ΓöéDrawing inside  ΓöéV   D         Γöé
  885. Γöé                              Γöéof and outside  Γöé              Γöé
  886. Γöé                              Γöéof segments.    Γöé              Γöé
  887. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  888. ΓöéGpiSetDefaultViewMatrix       ΓöéDrawing outside Γöé    D         Γöé
  889. Γöé                              Γöéof segments.    Γöé              Γöé
  890. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  891.  
  892. Abbreviations:  V - Viewing Transformation, D - Default Viewing Transformation 
  893.  
  894.  
  895. ΓòÉΓòÉΓòÉ 2.2.5. Transformation Mathematics ΓòÉΓòÉΓòÉ
  896.  
  897. The transformation of a picture can be represented in general terms by two 
  898. linear equations that define how the (x,y) coordinates of each point in the 
  899. picture are changed. 
  900.  
  901.  ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  902.  Γöé  The general form of these equations is:  Γöé  where                                  Γöé
  903.  Γöé                                           Γöé                                         Γöé
  904.  Γöé  x' = Ax + Cy + E                         Γöé    (x,y) defines the original point     Γöé
  905.  Γöé                                           Γöé    (x',y') is the transformed point     Γöé
  906.  Γöé  y' = Bx + Dy + F                         Γöé    A, B, C, D, E, and F are constants.  Γöé
  907.  Γöé                                           Γöé                                         Γöé
  908.  ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  909.  
  910. The transformations that result from these equations depend on the values of 
  911. the constants, which in turn vary according to the type of transformation being 
  912. applied. 
  913.  
  914. The operating system handles transformations by using matrix mathematics. In 
  915. the matrix mathematics, 
  916.  
  917.      Translation is an addition operation 
  918.      Scaling, reflecting, rotation, and shear are multiplication operations. 
  919.  
  920.  If all the transformations were multiplication operations, different types of 
  921.  transformation could be applied with a single transformation operation. 
  922.  Therefore, to facilitate the combining of calls, translation in the IBM OS/2 
  923.  is performed as a multiplication operation, rather than an addition operation. 
  924.  
  925.  This requires that the vector representing a point, [ x   y ] 
  926.  be extended by a third component, w: [ x   y   w ] 
  927.  This enables all the transformations to be handled in a uniform manner. 
  928.  
  929.  This is called a homogeneous coordinate system. The value, w, is a multiplier, 
  930.  so that the point represented is: (wx, wy). 
  931.  
  932.  Note:  The PM does not support a 3-dimensional presentation space. The 
  933.  3-dimensional matrix is created to effect matrix multiplication. 
  934.  
  935.  In this notation, the point (x, y) is represented as [ x   y   1 ]. To be able 
  936.  to operate on such three-element vectors, and to combine translation with the 
  937.  multiplication operations, the 2-by-2 matrix has to be extended to a 3-by-3 
  938.  matrix, with the third column being: 
  939.  
  940.  
  941.          0
  942.          0
  943.          1
  944.  
  945.     ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  946.     Γöé  The linear equations:         Γöé  become the matrix equations:           Γöé
  947.     Γöé                                Γöé                            Γöî         ΓöÉ  Γöé
  948.     Γöé  x' = Ax + Cy + E              Γöé                            Γöé A  B  0 Γöé  Γöé
  949.     Γöé                                Γöé  [ x' y' 1 ] = [ x y 1 ] * Γöé C  D  0 Γöé  Γöé
  950.     Γöé  y' = Bx + Dy + F              Γöé                            Γöé E  F  1 Γöé  Γöé
  951.     Γöé                                Γöé                            Γöö         Γöÿ  Γöé
  952.     ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  953.  
  954.  In standard matrix notation, you have: 
  955.  
  956.  
  957.                               Γöî                      ΓöÉ
  958.                               Γöé Msub11 Msub12 Msub13 Γöé
  959.     [ x' y' 1 ] = [ x y 1 ] * Γöé Msub21 Msub22 Msub23 Γöé
  960.                               Γöé Msub31 Msub32 Msub33 Γöé
  961.                               Γöö                      Γöÿ
  962.  
  963.  
  964. ΓòÉΓòÉΓòÉ 2.2.6. Model for Building the Transformation Matrix ΓòÉΓòÉΓòÉ
  965.  
  966. The transformation matrix shown above can be set equal to an entity as complex 
  967. as: 
  968.  
  969. M*I*S*V*D 
  970.  
  971. where * symbolizes matrix multiplication. As mentioned earlier, all the 
  972. transformation types might not have a distinct value at all times. One, or all, 
  973. could simply be the identity transformation. 
  974.  
  975. These intermediate space and step-wise transformations are not actually how the 
  976. operating system performs transformations. The reason for this relates to the 
  977. way the PM stores transformation information. The transformation matrix data 
  978. structure MATRIXLF, undergoes continuous modification during the drawing 
  979. process, and it can be influenced by more than one transformation function from 
  980. the application responding, for example, to what a user wants the drawing to 
  981. look like. 
  982.  
  983. For example, after creating the model of a building from drawing primitives, 
  984. the user might want to see two identical buildings side-by-side. The 
  985. application has already applied a series of transformations to the two segments 
  986. in world coordinate space to create the model of the building. If the 
  987. application, rather than the PM, had to perform the entire transformation over 
  988. again from start to finish, it would have to keep track of much more detail. 
  989. The PM enables applications to process a smaller portion of the MATRIXLF 
  990. structure, in this example the "V" or "V and D" component, to enable the user 
  991. to see two buildings side-by-side. 
  992.  
  993.  
  994. ΓòÉΓòÉΓòÉ 2.2.7. MATRIXLF, the Transformation Matrix ΓòÉΓòÉΓòÉ
  995.  
  996. For all the transformation functions, the 3-by-3 transformation matrix is 
  997. specified as a one-dimensional array in the following order: 
  998.  
  999. (M11, M12, 0, M21, M22, 0, M31, M32, 1) 
  1000.  
  1001. This one-dimensional array corresponds to the data structure, MATRIXLF. The 
  1002. elements in the data structure correspond to the matrix multiplication 
  1003. constants, as shown in the following table. 
  1004.  
  1005. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1006. ΓöéTransformation Type           ΓöéMatrix Values                 Γöé
  1007. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1008. ΓöéScaling, Reflection           ΓöéM11 and M22                   Γöé
  1009. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1010. ΓöéRotation                      ΓöéM11, M12, M21, M22            Γöé
  1011. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1012. ΓöéTranslation                   ΓöéM31 and M32                   Γöé
  1013. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1014.  
  1015. All nine elements do not have to be specified for every transformation 
  1016. function. However, those specified are interpreted as the first n of the nine. 
  1017. If the third, sixth, and ninth elements are specified, they must be 0, 0, and 1 
  1018. respectively. 
  1019.  
  1020.  
  1021. ΓòÉΓòÉΓòÉ 2.2.7.1. MATRIXLF Structure ΓòÉΓòÉΓòÉ
  1022.  
  1023. Of the nine fields in MATRIXLF, four are special 32-bit FIXED variables. The 
  1024. remaining five are 32-bit long integer variables. 
  1025.  
  1026. The scaling, reflecting, and rotation constants, M11,M12,M21,M22, are the 
  1027. 32-bit, signed, FIXED variables, with an implied binary point between the 
  1028. second and third bytes. The translation constants, M31 and M32, and the three 
  1029. third-column variables, are 32-bit long integers. 
  1030.  
  1031. A FIXED variable is a binary representation of a floating-point number. A FIXED 
  1032. variable has two parts: 
  1033.  
  1034.      The high-order 16-bits, which contain a signed integer in the range 
  1035.       -32768 through 32767. 
  1036.  
  1037.      The low-order 16-bits, which contain the numerator of a fraction in the 
  1038.       range 0 through 65535. 
  1039.  
  1040.       The denominator for this fraction is 65536. 
  1041.  
  1042.  For example, to store the cosine of 60┬░ (0.5) in a FIXED variable, an 
  1043.  application would multiply 65536 by 0.5. The result, 32768, would be the value 
  1044.  to assign to a field in the MATRIXLF structure. 
  1045.  
  1046.  To store a scaling factor of 3 in a FIXED variable, the application would 
  1047.  multiply 65536 by 3. Again, the result, 196608, would be the value to assign 
  1048.  to a field in the MATRIXLF structure. 
  1049.  
  1050.  
  1051. ΓòÉΓòÉΓòÉ 2.2.7.2. MAKEFIXED Macro ΓòÉΓòÉΓòÉ
  1052.  
  1053. The MAKEFIXED macro provides a quick and convenient method for setting the 
  1054. value of FIXED variables. This macro requires two arguments:  the first is the 
  1055. integer part of the FIXED value, and the second is the fraction part of the 
  1056. FIXED value. In the following example, MAKEFIXED is used to assign the FIXED 
  1057. value equivalent of 1 1/8 to the matrix component M11. 
  1058.  
  1059.     matlf.fxM11 = MAKEFIXED(1, 8192)
  1060.  
  1061. The first argument, 1, is the integer part of the FIXED value. The second 
  1062. argument, 8192, is the result of multiplying 65536 by 1/8. 
  1063.  
  1064. If it is necessary for an application to scale or rotate an object, the 
  1065. application can avoid most of these mathematics by using the helper functions, 
  1066. GpiRotate and GpiScale. GpiRotate accepts a rotation in degrees and converts 
  1067. this value into the appropriate fields in the MATRIXLF structure. Similarly, 
  1068. GpiScale accepts a scaling factor and fills in the MATRIXLF structure with the 
  1069. appropriate values. 
  1070.  
  1071.  
  1072. ΓòÉΓòÉΓòÉ 2.3. About Transformation Operations ΓòÉΓòÉΓòÉ
  1073.  
  1074. The available transformations are listed in the following table. 
  1075.  
  1076. Transformations 
  1077.  
  1078. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1079. ΓöéOperation       ΓöéResult                                      Γöé
  1080. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1081. ΓöéScaling         ΓöéShrinks or enlarges the object              Γöé
  1082. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1083. ΓöéReflection      ΓöéCreates a mirror image of an object with    Γöé
  1084. Γöé                Γöérespect to the x- or y- axis                Γöé
  1085. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1086. ΓöéRotation        ΓöéRotates the object                          Γöé
  1087. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1088. ΓöéTranslation     ΓöéShifts the object with respect to the originΓöé
  1089. Γöé                Γöéof the coordinate system                    Γöé
  1090. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1091. ΓöéShear           ΓöéRotates either all the vertical or all the  Γöé
  1092. Γöé                Γöéhorizontal lines in an object               Γöé
  1093. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1094.  
  1095. These basic operations can be combined. 
  1096.  
  1097. The PM provides special functions to perform scaling, rotation, and translation 
  1098. and also enables applications to specify the transformation matrix directly. 
  1099. Applications can specify values for more than one type of transformation on a 
  1100. single transformation call. 
  1101.  
  1102. Transformations are used to manipulate graphic objects as they are being moved 
  1103. from one coordinate space to another. These operations are performed by 
  1104. functions called transformation functions. There are also functions that help 
  1105. perform the transformations called helper functions. 
  1106.  
  1107. The scaling, reflection, rotation, translation, and shear transformations are 
  1108. best demonstrated by applying them to a picture. The following figure shows the 
  1109. image of a flag before any transformations have been applied. The flag is 
  1110. defined by five points. Their (x,y) coordinates are (0,0), (0,4), (0,6), (2,6), 
  1111. and (2,4). 
  1112.  
  1113. Flag Before Transformation 
  1114.  
  1115. In the next several sections, where the transformations are described in 
  1116. detail, the effect of the transformation on the flag is illustrated. 
  1117.  
  1118.  
  1119. ΓòÉΓòÉΓòÉ 2.3.1. Scaling and Reflection Transformations ΓòÉΓòÉΓòÉ
  1120.  
  1121. Applications can scale an object by using GpiScale or by modifying the MATRIXLF 
  1122. structure directly. A scaling transformation reduces or increases the size of a 
  1123. graphics object. A reflecting transformation creates a mirror image of an 
  1124. object with respect to the x- or y-axis. 
  1125.  
  1126. A scaling factor of: 
  1127.  
  1128.      greater than 1 causes an increase in size 
  1129.  
  1130.      greater than 0 but less than 1 causes a reduction in size 
  1131.  
  1132.      less than 0 causes a reflection about that axis. That is, a negative x 
  1133.       scaling factor causes reflection in the x direction. 
  1134.  
  1135.  Note:  If an application specifies a scaling factor of greater than 1, the 
  1136.  graphics presentation space must be defined with the coordinate format 
  1137.  GPIF_LONG. This is because 32-bit matrix elements are required to store these 
  1138.  values in retained segment and metafile orders. 
  1139.  
  1140.  The equations to scale by factors Sx and Sy are obtained from the general 
  1141.  equations (with M11 = Sx and M22 = Sy) and can be written: 
  1142.  
  1143.  x' = xSx 
  1144.  
  1145.  y' = ySy 
  1146.  
  1147.  A scaling transformation reduces or increases all the coordinates of an object 
  1148.  by the scaling factor. Any object not aligned on the x- and y-axes is 
  1149.  therefore moved nearer to the origin by a reduction in size, and away from the 
  1150.  origin by an increase in size. For example, if an application applies a 
  1151.  scaling factor of 0.5 to a simple box with its corners at (4,4), (10,4), 
  1152.  (10,10), and (4,10), the four corners moves to (2,2), (5,2), (5,5), and (2,5). 
  1153.  
  1154.  To scale an object about a point without causing it to move, the following 
  1155.  sequence of transformations is required: 
  1156.  
  1157.    1. Translate the scaling point of the object to the origin. 
  1158.  
  1159.    2. Scale the object at the origin. 
  1160.  
  1161.    3. Translate the scaling point of the object back to its original position. 
  1162.  
  1163.  
  1164. ΓòÉΓòÉΓòÉ 2.3.1.1. Scaling a Graphics Object ΓòÉΓòÉΓòÉ
  1165.  
  1166. An application can scale the flag by 0.5, by applying: 
  1167.  
  1168. x' = 0.5x 
  1169.  
  1170. y' = 0.5y 
  1171.  
  1172. The original five points of the flag are transformed: 
  1173.  
  1174. (0,0) ΓöÇ (0,0)
  1175. (0,4) ΓöÇ (0,2)
  1176. (0,6) ΓöÇ (0,3)
  1177. (2,4) ΓöÇ (1,2)
  1178. (2,6) ΓöÇ (1,3)
  1179. The following figure shows the effect of the scaling. 
  1180.  
  1181. Scaling by 0.5 
  1182.  
  1183. This scaling preserves the shape and orientation of the object, because the 
  1184. scaling factors in both directions are the same. However, scaling equations 
  1185. permit different scaling factors to be applied to x and y, which can cause 
  1186. distortion of the original shape of the object. 
  1187.  
  1188.  
  1189. ΓòÉΓòÉΓòÉ 2.3.1.2. Reflecting a Graphics Object ΓòÉΓòÉΓòÉ
  1190.  
  1191. A negative scaling factor causes a reflection of the object to be drawn. A 
  1192. scaling factor of -1, for example, causes a mirror image of the object to be 
  1193. drawn in the appropriate direction. 
  1194.  
  1195. The following figure shows the flag reflected by applying a negative y scaling 
  1196. factor. 
  1197.  
  1198. Reflection 
  1199.  
  1200.  
  1201. ΓòÉΓòÉΓòÉ 2.3.1.3. MATRIXLF Structure for Scaling and Reflecting ΓòÉΓòÉΓòÉ
  1202.  
  1203. When an application scales an object by using the scaling transformation, the 
  1204. matrix element M11 contains the horizontal scaling component (Sx), and the 
  1205. matrix element M22 contains the vertical scaling component 
  1206. (Sy). 
  1207.  
  1208.  
  1209.                           Γöî         ΓöÉ
  1210.                           Γöé Sx 0  0 Γöé
  1211. [ x' y' 1 ] = [ x y 1 ] * Γöé 0  Sy 0 Γöé
  1212.                           Γöé 0  0  1 Γöé
  1213.                           Γöö         Γöÿ
  1214.  
  1215. If the matrix element M11 contains a negative horizontal reflection component 
  1216. (-Sx), it causes reflection about the y-axis. If the matrix element M22 
  1217. contains a negative vertical reflection component (-Sy) it causes reflection 
  1218. about the x-axis. 
  1219.  
  1220.  
  1221. ΓòÉΓòÉΓòÉ 2.3.2. Rotation Transformations ΓòÉΓòÉΓòÉ
  1222.  
  1223. The application can rotate an object either using GpiRotate or by modifying the 
  1224. MATRIXLF structure directly. 
  1225.  
  1226. The operating system applies a transformation to all points in the source 
  1227. coordinate space. This means that unless an object is drawn about the origin of 
  1228. the source coordinate space, translation occurs when the object is rotated or 
  1229. scaled. GpiRotate enables an application to specify a point, relative to the 
  1230. origin, that is the center of rotation. 
  1231.  
  1232. The equations for the rotation of an object about the origin (0,0) through an 
  1233. angle (theta), can be written: 
  1234.  
  1235. x' = x cos (theta) - y sin (theta) 
  1236.  
  1237. y' = x sin (theta) + y cos (theta) 
  1238.  
  1239. A negative (theta) value rotates the object clockwise. For clockwise rotation, 
  1240. the rotation equations are: 
  1241.  
  1242. x' = x cos (theta) + y sin (theta) 
  1243.  
  1244. y' = -x sin (theta) + y cos (theta) 
  1245.  
  1246. To rotate an object about some other point (p,q), the following sequence of 
  1247. transformations is required: 
  1248.  
  1249.    1. Translate the object by (-p,-q) to move the point of rotation to the 
  1250.       origin. 
  1251.  
  1252.    2. Rotate the object around the origin. 
  1253.  
  1254.    3. Translate the object by (p,q) to move it back to its original position. 
  1255.  
  1256.  Rotation preserves the shape and size of the object. 
  1257.  
  1258.  
  1259. ΓòÉΓòÉΓòÉ 2.3.2.1. Rotating a Graphics Object ΓòÉΓòÉΓòÉ
  1260.  
  1261. An application can rotate the flag counterclockwise through 90┬░, by applying: 
  1262.  
  1263. x' = x cos 90 - y sin 90 
  1264.  
  1265. y' = x sin 90 + y cos 90 
  1266.  
  1267. Because cos 90 = 0 and sin 90 = 1, these equations become: 
  1268.  
  1269. x' = - y 
  1270.  
  1271. y' = x 
  1272.  
  1273. The original five points are transformed: 
  1274.  
  1275. (0,0) ΓöÇ (0,0)
  1276. (0,4) ΓöÇ (-4,0)
  1277. (0,6) ΓöÇ (-6,0)
  1278. (2,4) ΓöÇ (-4,2)
  1279. (2,6) ΓöÇ (-6,2)
  1280.  
  1281. The following figure shows the effect of rotating the flag 90┬░. 
  1282.  
  1283. Rotation Counterclockwise through 90┬░ 
  1284.  
  1285.  
  1286. ΓòÉΓòÉΓòÉ 2.3.2.2. MATRIXLF Structure for Rotating ΓòÉΓòÉΓòÉ
  1287.  
  1288. For counterclockwise rotation: 
  1289.  
  1290.  
  1291.                           Γöî                              ΓöÉ
  1292.                           Γöé  cos (theta)  sin (theta)  0 Γöé
  1293. [ x' y' 1 ] = [ x y 1 ] * Γöé -sin (theta)  cos (theta)  0 Γöé
  1294.                           Γöé   0            0           1 Γöé
  1295.                           Γöö                              Γöÿ
  1296.  
  1297. For clockwise rotation: 
  1298.  
  1299.  
  1300.                           Γöî                              ΓöÉ
  1301.                           Γöé  cos (theta) -sin (theta)  0 Γöé
  1302. [ x' y' 1 ] = [ x y 1 ] * Γöé  sin (theta)  cos (theta)  0 Γöé
  1303.                           Γöé   0            0           1 Γöé
  1304.                           Γöö                              Γöÿ
  1305.  
  1306.  
  1307. ΓòÉΓòÉΓòÉ 2.3.3. Translation Transformations ΓòÉΓòÉΓòÉ
  1308.  
  1309. The application can translate an object either using GpiTranslate or by 
  1310. modifying the MATRIXLF structure directly. 
  1311.  
  1312. To move a graphics object by an absolute number of coordinate units, a 
  1313. translation equation is applied. The equations for translation by Tx and Ty are 
  1314. obtained from the general equations (with E = Tx, and F = Ty) and can be 
  1315. written: 
  1316.  
  1317. x' = x + Tx 
  1318.  
  1319. y' = y + Ty 
  1320.  
  1321. Translation preserves the shape, size, and orientation of the object. A 
  1322. negative Tx value causes movement to the left. A negative Ty value causes 
  1323. movement downward. 
  1324.  
  1325.  
  1326. ΓòÉΓòÉΓòÉ 2.3.3.1. Translating a Graphics Object ΓòÉΓòÉΓòÉ
  1327.  
  1328. If Tx is equal to 8 and Ty is equal to 5, then: 
  1329.  
  1330. x' = x + 8 
  1331.  
  1332. y' = y + 5 
  1333.  
  1334. The original five points are transformed: 
  1335.  
  1336. (0,0) ΓöÇ (8,5)
  1337. (0,4) ΓöÇ (8,9)
  1338. (0,6) ΓöÇ (8,11)
  1339. (2,4) ΓöÇ (10,9)
  1340. (2,6) ΓöÇ (10,11)
  1341.  
  1342. The following figure shows the effect of translating the flag by (8,5). 
  1343.  
  1344. Translation by (8,5) 
  1345.  
  1346.  
  1347. ΓòÉΓòÉΓòÉ 2.3.3.2. MATRIXLF Structure for Translating ΓòÉΓòÉΓòÉ
  1348.  
  1349. When an application translates an object by using the translation 
  1350. transformation, the matrix element M31 contains the horizontal translation 
  1351. component, and the matrix element M32 contains the vertical translation 
  1352. component, as follows: 
  1353.  
  1354.  
  1355.                           Γöî         ΓöÉ
  1356.                           Γöé 1  0  0 Γöé
  1357. [ x' y' 1 ] = [ x y 1 ] * Γöé 0  1  0 Γöé
  1358.                           Γöé Tx Ty 1 Γöé
  1359.                           Γöö         Γöÿ
  1360.  
  1361.  
  1362. ΓòÉΓòÉΓòÉ 2.3.4. Shearing Transformations ΓòÉΓòÉΓòÉ
  1363.  
  1364. There are two shear transformations:  vertical and horizontal. The vertical 
  1365. shear transformation affects only the y-component of the coordinates of points 
  1366. in an object, and the horizontal shear transformation affects only the 
  1367. x-component. 
  1368.  
  1369. If an application shears an object that contains two orthogonal vectors (two 
  1370. perpendicular lines), the vectors are no longer orthogonal. 
  1371.  
  1372. A shearing transformation alters the shape of an object by translating its 
  1373. x-coordinates relative to its y-coordinates, or its y-coordinates relative to 
  1374. its x-coordinates. The amount by which the coordinates are translated is 
  1375. determined by the angle of the shear. 
  1376.  
  1377. The equation for shearing an object to the left along the x axis by angle 
  1378. (theta) is: 
  1379.  
  1380. x' = x - y tan (theta) 
  1381.  
  1382. y' = y 
  1383.  
  1384. To shear an object along the y-axis, the tangent of the angle of the shear is 
  1385. represented by constant B in the general equation. 
  1386.  
  1387.  
  1388. ΓòÉΓòÉΓòÉ 2.3.4.1. Shearing a Graphics Object ΓòÉΓòÉΓòÉ
  1389.  
  1390. The following figure shows the flag sheared to the left along the x-axis. 
  1391.  
  1392. Shearing Along the X-Axis 
  1393.  
  1394.  
  1395. ΓòÉΓòÉΓòÉ 2.3.4.2. MATRIXLF Structure for Shearing ΓòÉΓòÉΓòÉ
  1396.  
  1397. For vertical shear transformation, the matrix element M11 contains the 
  1398. horizontal shear component, and the element M21 contains the vertical shear 
  1399. component, as follows: 
  1400.  
  1401.  
  1402.                           Γöî                         ΓöÉ
  1403.                           Γöé   1     -tan (theta)  0 Γöé
  1404. [ x' y' 1 ] = [ x y 1 ] * Γöé   0           1       0 Γöé
  1405.                           Γöé   0           0       1 Γöé
  1406.                           Γöö                         Γöÿ
  1407.  
  1408. For horizontal shear transformation, the matrix element M21 contains the 
  1409. horizontal shear component, and the matrix element M22 contains the vertical 
  1410. shear component, as follows: 
  1411.  
  1412.  
  1413.                           Γöî                    ΓöÉ
  1414.                           Γöé   1           0  0 Γöé
  1415. [ x' y' 1 ] = [ x y 1 ] * Γöé  -tan theta   1  0 Γöé
  1416.                           Γöé   0           0  1 Γöé
  1417.                           Γöö                    Γöÿ
  1418.  
  1419.  
  1420. ΓòÉΓòÉΓòÉ 2.4. About Transformation Functions ΓòÉΓòÉΓòÉ
  1421.  
  1422. Transformation functions manipulate objects between coordinate spaces by 
  1423. applying transformations. Transformation functions require two coordinate 
  1424. spaces: a source coordinate space, and a target coordinate space. Which 
  1425. transformation function an application should use is determined by the two 
  1426. coordinate spaces and by the transformation effect desired. 
  1427.  
  1428. The world-to-model space, model-to-page space, and page-to-device space 
  1429. transformations are all actually performed as a single operation. The different 
  1430. coordinate spaces are conceptual in nature, rather than explicitly defined 
  1431. entities. Describing them separately is meant to help explain the levels of 
  1432. activity during transformations. 
  1433.  
  1434. All transformation functions share certain parameters, although the values and 
  1435. defaults of those parameters might not be identical. 
  1436.  
  1437.  
  1438. ΓòÉΓòÉΓòÉ 2.4.1. Current Transformation ΓòÉΓòÉΓòÉ
  1439.  
  1440. Every graphics object, whether in world, model, page, or device space, has a 
  1441. current transformation value, even if that value is simply the identity 
  1442. transformation. 
  1443.  
  1444. The default current model transformation is the concatenation of any instance, 
  1445. segment, and model transformations from the root segment downward. The default 
  1446. current viewing transformation is the one most recently specified. The device 
  1447. transformation, which is set by the page viewport and the presentation page, 
  1448. should not be changed while drawing is in progress. 
  1449.  
  1450.  
  1451. ΓòÉΓòÉΓòÉ 2.4.2. Accumulating Transformations ΓòÉΓòÉΓòÉ
  1452.  
  1453. Each time one of the transformation functions is called by an application, the 
  1454. application can set the function's option parameter to control how the function 
  1455. combines the transformation with existing transformations and in what order the 
  1456. transformations are applied. 
  1457.  
  1458. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1459. ΓöéIf the application uses this flag...ΓöéThen the operating      Γöé
  1460. Γöé                                    Γöésystem...               Γöé
  1461. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1462. ΓöéTRANSFORM_REPLACE                   ΓöéReplaces any existing   Γöé
  1463. Γöé                                    Γöétransformations with theΓöé
  1464. Γöé                                    Γöénew transformation. The Γöé
  1465. Γöé                                    Γöéexisting value of the   Γöé
  1466. Γöé                                    Γöématrix is discarded and Γöé
  1467. Γöé                                    Γöéreplaced by straight    Γöé
  1468. Γöé                                    Γöésubstitution.           Γöé
  1469. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1470. ΓöéTRANSFORM_PREEMPT                   ΓöéApplies the new         Γöé
  1471. Γöé                                    Γöétransformation before   Γöé
  1472. Γöé                                    Γöéapplying the existing   Γöé
  1473. Γöé                                    Γöétransformation.         Γöé
  1474. Γöé                                    ΓöéThe transformation      Γöé
  1475. Γöé                                    Γöématrix of the new       Γöé
  1476. Γöé                                    Γöétransformation is       Γöé
  1477. Γöé                                    Γöépre-multiplied with the Γöé
  1478. Γöé                                    Γöétransformation matrix ofΓöé
  1479. Γöé                                    Γöéthe current             Γöé
  1480. Γöé                                    Γöétransformation.         Γöé
  1481. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1482. ΓöéTRANSFORM_ADD                       ΓöéApplies the new         Γöé
  1483. Γöé                                    Γöétransformation after    Γöé
  1484. Γöé                                    Γöéapplying the existing   Γöé
  1485. Γöé                                    Γöétransformation.         Γöé
  1486. Γöé                                    ΓöéThe transformation      Γöé
  1487. Γöé                                    Γöématrix of the new       Γöé
  1488. Γöé                                    Γöétransformation is       Γöé
  1489. Γöé                                    Γöépost-multiplied with theΓöé
  1490. Γöé                                    Γöétransformation matrix ofΓöé
  1491. Γöé                                    Γöéthe current             Γöé
  1492. Γöé                                    Γöétransformation.         Γöé
  1493. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1494.  
  1495. The order in which transformations are applied affects the appearance of the 
  1496. picture. For example, suppose that a box primitive has been defined, with its 
  1497. lower-left corner at (4,2) and its upper-right corner at (8,8), and that you 
  1498. want both to scale the box by 0.5 and to translate it by (-10,-10). 
  1499.  
  1500. If the box is translated before scaling it, the transformed box is as shown in 
  1501. the following figure. 
  1502.  
  1503. Translating before Scaling 
  1504.  
  1505. The translated box has its lower-left corner at (-6,-8), and its upper-right 
  1506. corner at (-2,-2). Each of its coordinates is then scaled by 0.5, and the 
  1507. transformed box has its corners at (-3,-1), (-1,-1), (-3,-4), and (-1,-4). 
  1508.  
  1509. If the box is scaled before translating it, the transformed box is as shown in 
  1510. the figure after the following figure. 
  1511.  
  1512. Scaling before Translating 
  1513.  
  1514. The scaled box has its lower-left corner at (2,1), and its upper-right corner 
  1515. at (4,4). The box is then translated by (-10,-10), and the transformed box has 
  1516. its corners at (-8,-6), (-6,-6), (-6,-9), and (-8,-9). 
  1517.  
  1518. When an application is drawing a picture in which there are called segments, 
  1519. and in which transformations are applied to the root segments, the root-segment 
  1520. transformations should usually be applied to any segments they call. For 
  1521. example, if a segment that is translated to the left of the picture (by 
  1522. changing its segment transformation) calls a second segment, that leftward 
  1523. transformation should also be applied to the called segment. In this instance, 
  1524. the application would specify TRANSFORM_ADD in the call to GpiCallSegmentMatrix 
  1525. to add the instance transformation to the calling segments' segment 
  1526. transformation. Instance transformations are automatically reset on return to 
  1527. the calling segment. 
  1528.  
  1529.  
  1530. ΓòÉΓòÉΓòÉ 2.4.3. Concatenating Transformations ΓòÉΓòÉΓòÉ
  1531.  
  1532. When an application applies more than one transformation, it can concatenate 
  1533. the individual transformations to produce a final result. To concatenate 
  1534. transformations, multiply the individual transformation matrixes. The product 
  1535. of this multiplication is the concatenated transformation. 
  1536.  
  1537. There are four ways the final matrix can be concatenated: 
  1538.  
  1539.    1. Hard code the matrix values into the application, then call the 
  1540.       transformation functions. 
  1541.  
  1542.    2. Multiply the individual matrixes, then call the transformation functions. 
  1543.  
  1544.    3. Use the helper functions with the TRANSFORM_ADD option, then call the 
  1545.       transformation functions. 
  1546.  
  1547.    4. Alternately apply transformation operations directly to the 
  1548.       transformation matrix, then apply a transformation function. 
  1549.  
  1550.  Concatenating before calling provides better performance. 
  1551.  
  1552.  
  1553. ΓòÉΓòÉΓòÉ 2.4.3.1. Hard Coding Values for a Concatenated Matrix ΓòÉΓòÉΓòÉ
  1554.  
  1555. Pre-calculating the concatenated matrix values, then hard coding the values 
  1556. into the application, gives the fastest performance. However, this is rarely 
  1557. practical as the actual transformations to be performed are often variable. 
  1558.  
  1559. If an application is, for example, performing interactive graphics, and one of 
  1560. the options offered to the user is a menu choice of rotate by 90┬░, and enlarge 
  1561. by 4, then the rotational and scaling factors would not change, and the matrix 
  1562. values could be hard coded into the application. 
  1563.  
  1564.  
  1565. ΓòÉΓòÉΓòÉ 2.4.3.2. Multiplying Matrix Values ΓòÉΓòÉΓòÉ
  1566.  
  1567. Multiplying transformation matrix values directly offers the second fastest 
  1568. performance, yet can still respond to a variety of desired transformations. As 
  1569. many transformation matrixes as needed can be multiplied together. If the 
  1570. application is concatenating the matrixes itself, it is responsible for 
  1571. preventing the accumulated transformation side effects. 
  1572.  
  1573. For example, to rotate an object counterclockwise about the point (p,q) using a 
  1574. single transformation call requires three transformations to be concatenated. 
  1575. When the application is specifying each transformation, step-by-step, the 
  1576. sequence of actions would be: 
  1577.  
  1578.    1. Translate the object by (-p,-q) to move the point of rotation to the 
  1579.       origin. 
  1580.  
  1581.    2. Rotate the object about the origin. 
  1582.  
  1583.    3. Translate the object by (p,q) to move it back to its original position. 
  1584.  
  1585.  The individual matrixes are: 
  1586.  
  1587.  
  1588.   Γöî           ΓöÉ Γöî                              ΓöÉ Γöî         ΓöÉ
  1589.   Γöé  1   0  0 Γöé Γöé  cos (theta)  sin (theta)  0 Γöé Γöé 1  0  0 Γöé
  1590.   Γöé  0   1  0 Γöé Γöé -sin (theta)  cos (theta)  0 Γöé Γöé 0  1  0 Γöé
  1591.   Γöé -Tx -Ty 1 Γöé Γöé   0            0           1 Γöé Γöé Tx Ty 1 Γöé
  1592.   Γöö           Γöÿ Γöö                              Γöÿ Γöö         Γöÿ
  1593.  
  1594.  The matrix for the concatenated transformation is produced incrementally. That 
  1595.  is, two adjacent matrixes are multiplied to produce a single matrix, which is 
  1596.  then multiplied with the third matrix. You can begin by multiplying either the 
  1597.  first two matrixes or the second two matrixes. If you start by multiplying 
  1598.  matrixes 2 and 3 together, the resulting matrix is: 
  1599.  
  1600.  
  1601.             Γöî                              ΓöÉ
  1602.             Γöé  cos (theta)  sin (theta)  0 Γöé
  1603.             Γöé -sin (theta)  cos (theta)  0 Γöé
  1604.             Γöé   Tx           Ty          1 Γöé
  1605.             Γöö                              Γöÿ
  1606.  
  1607.  This matrix is multiplied with the first matrix to produce the matrix for 
  1608.  rotating an object at the point (p,q): 
  1609.  
  1610.  
  1611.             Γöî                              ΓöÉ
  1612.             Γöé  cos (theta)  sin (theta)  0 Γöé
  1613.             Γöé -sin (theta)  cos (theta)  0 Γöé
  1614.             Γöé   a            b           1 Γöé
  1615.             Γöö                              Γöÿ
  1616.  
  1617.  where: 
  1618.  
  1619.  a = (-Txcos (theta) + Tysin (theta) + Tx) 
  1620.  
  1621.  and 
  1622.  
  1623.  b = (-Txsin (theta) - Tycos (theta) + Ty) 
  1624.  
  1625.  If an application were performing the concatenation for a scaling operation, 
  1626.  again it would have to specify the transformation step-by-step. The sequence 
  1627.  of actions would be: 
  1628.  
  1629.    1. Translate the object's scaling point to the origin. 
  1630.  
  1631.    2. Scale the object at the origin. 
  1632.  
  1633.    3. Translate the object back to its original position. 
  1634.  
  1635.  Here are the three matrixes required to obtain this effect: 
  1636.  
  1637.  
  1638.   Γöî           ΓöÉ Γöî            ΓöÉ Γöî         ΓöÉ
  1639.   Γöé  1   0  0 Γöé Γöé  Sx  0   0 Γöé Γöé 1  0  0 Γöé
  1640.   Γöé  0   1  0 Γöé Γöé  0   Sy  0 Γöé Γöé 0  1  0 Γöé
  1641.   Γöé -Tx -Ty 1 Γöé Γöé  0   0   1 Γöé Γöé Tx Ty 1 Γöé
  1642.   Γöö           Γöÿ Γöö            Γöÿ Γöö         Γöÿ
  1643.  
  1644.  The matrix of the concatenated transformation is: 
  1645.  
  1646.  
  1647.      Γöî                           ΓöÉ
  1648.      Γöé     Sx          0       0 Γöé
  1649.      Γöé     1           Sy      0 Γöé
  1650.      Γöé (-TxSx+Tx)  (-TySy+Ty)  1 Γöé
  1651.      Γöö                           Γöÿ
  1652.  
  1653.  
  1654. ΓòÉΓòÉΓòÉ 2.4.3.3. Transformation Helper Functions ΓòÉΓòÉΓòÉ
  1655.  
  1656. Three helper functions, are provided to perform the matrix math required to 
  1657. concatenate transformations: 
  1658.  
  1659.      GpiTranslate 
  1660.      GpiRotate 
  1661.      GpiScale 
  1662.  
  1663.  Any of these three functions can be used with the TRANSFORM_ADD option to 
  1664.  concatenate the new matrix with an existing matrix. This method builds up the 
  1665.  matrix in application storage in a sequence of steps before using a single 
  1666.  transform function. 
  1667.  
  1668.  While this is slower than hard coding the matrix, it is faster than 
  1669.  alternating between applying transformation operations directly to the matrix 
  1670.  then applying a transformation function. 
  1671.  
  1672.  The helper functions merely calculate the appropriate matrix. The 
  1673.  transformation is not applied until the array containing the matrix values is 
  1674.  passed to the appropriate transformation function. 
  1675.  
  1676.  Applications use GpiTranslate to change the position of an object. The 
  1677.  application specifies the coordinates of the point to which to move the object 
  1678.  and the name of the transform matrix to use as input to GpiTranslate. The 
  1679.  transformation matrix must be in the form of a one-dimensional array. The 
  1680.  application also can specify whether this transformation is to replace the 
  1681.  value for a previous transformation, or whether it is to be added to it. 
  1682.  
  1683.  Applications use GpiRotate to rotate an object. The application specifies the 
  1684.  angle of rotation, the coordinates of the point around which the object is to 
  1685.  rotate, and the transformation matrix. The transformation matrix must be in 
  1686.  the form of a one-dimensional array. The application also can specify whether 
  1687.  this transformation is to replace the value for a previous transformation, or 
  1688.  whether it is to be added to it. 
  1689.  
  1690.  To scale an object at a point without also moving the object, applications use 
  1691.  GpiScale. When using GpiScale, the application specifies the scaling factor, 
  1692.  the coordinates of the center point, and the transformation matrix. The 
  1693.  transformation matrix must be in the form of a one-dimensional array. The 
  1694.  application also can specify whether this transformation is to replace the 
  1695.  value for a previous transformation, or whether it is to be added to it. 
  1696.  
  1697.  An application could alternate between applying transformation operations 
  1698.  directly to the transformation matrix, then applying a transformation function 
  1699.  with the TRANSFORM_ADD option set. This would build up the matrix in the 
  1700.  presentation space. This method has the slowest performance of the 
  1701.  concatenation methods. 
  1702.  
  1703.  
  1704. ΓòÉΓòÉΓòÉ 2.4.4. Round-Off Error ΓòÉΓòÉΓòÉ
  1705.  
  1706. Whenever an application uses transformations, it should handle any round-off 
  1707. error that occurs after multiple scaling, rotation, shear, or reflection 
  1708. transformations. The rounding error increases because a transformation is 
  1709. incrementally updated by the amount of the error with, for example, the 
  1710. TRANSFORM_ADD option. For the rotation to remain accurate, the application 
  1711. should recalculate the transformation, rather than accumulate many small 
  1712. changes. 
  1713.  
  1714. For example, if an application uses a rotation transformation to rotate the 
  1715. hands of a clock, the accuracy of the clock diminishes due to rounding off 
  1716. after the transformation. The rounding error should be periodically removed by 
  1717. using the TRANSFORM_REPLACE option at known points, for example, every 90┬░ or 
  1718. every complete revolution of the clock. 
  1719.  
  1720.  
  1721. ΓòÉΓòÉΓòÉ 2.4.5. World-Space to Model-Space Transformations ΓòÉΓòÉΓòÉ
  1722.  
  1723. The model transformation drawing attribute operates between world and model 
  1724. space. This attribute can be updated by one of the three following 
  1725. transformation functions: 
  1726.  
  1727.      GpiSetModelTransformMatrix 
  1728.      GpiSetSegmentTransformMatrix 
  1729.      GpiCallSegmentMatrix 
  1730.  
  1731.  If the model transformation drawing attribute has never been updated, the 
  1732.  attribute defaults to the identity transformation. If the drawing attribute 
  1733.  has been updated, the existing transformation is the concatenation of any 
  1734.  instance, segment, or model transformations from the root segment downwards. 
  1735.  Each time a new segment is opened (using GpiOpenSegment), the model 
  1736.  transformation drawing attribute is reset to its default value. 
  1737.  
  1738.  The three transformations that operate between world space and model space 
  1739.  are: 
  1740.  
  1741.      Model transformations 
  1742.      Segment transformations 
  1743.      Instance transformations 
  1744.  
  1745.  The transformations that occur between world-coordinate and model spaces 
  1746.  depend on the drawing mode and the possible segment type of the drawing 
  1747.  primitive. 
  1748.  
  1749.  The drawing mode can be either nonretain or retain. Nonretain mode is also 
  1750.  called draw mode, as the graphics are immediately displayed. In retain mode, 
  1751.  the graphics orders are stored in chained and unchained segments. A series of 
  1752.  segments are shown in the following figure. 
  1753.  
  1754.  Segments 
  1755.  
  1756.  A model transformation effects objects in any of these segments. A segment 
  1757.  transformation affects the six chained segments, on the left and must be 
  1758.  issued before Root Segment 1 is accessed. An instance transformation can be 
  1759.  applied only to Segment B or Segment D and must be issued from Segment A or 
  1760.  Segment 2 or Segment C. The instance transformation is reset on return to the 
  1761.  calling segment. 
  1762.  
  1763.  
  1764. ΓòÉΓòÉΓòÉ 2.4.5.1. Model Transformations ΓòÉΓòÉΓòÉ
  1765.  
  1766. Model transformations also can be applied to objects both inside and outside of 
  1767. segments. Model transformations also can be applied to objects created under 
  1768. retained or nonretained drawing mode. This means model transformations affect 
  1769. the output from: 
  1770.  
  1771.      GpiDrawChain 
  1772.      GpiDrawFrom 
  1773.      GpiDrawSegment 
  1774.      Any GPI functions that occur outside of a retained-drawing segment 
  1775.  
  1776.  Applications can change the model transformation any number of times in a 
  1777.  single segment. Changing the model transformation changes the transformation 
  1778.  applied to any drawing primitives used subsequently. 
  1779.  
  1780.  An application can determine the values for the current model transformation 
  1781.  by calling GpiQueryModelTransformMatrix, model transformation's scaling, 
  1782.  rotation, and translation values in a one-dimensional array representing 
  1783.  elements in the MATRIXLF structure. 
  1784.  
  1785.  GpiSetModelTransformMatrix specifies the model transformation's scaling, 
  1786.  rotation, and translation values applied to subsequent primitives in the 
  1787.  segment. As this function does not require the name a segment, it also can be 
  1788.  used to apply transformations to primitives outside of segments. 
  1789.  
  1790.  For example, in the building example earlier in the chapter, if the window is 
  1791.  stored in a retained segment, an application could draw several identical 
  1792.  windows on the house by setting a new translation component in the model 
  1793.  transformation before calling GpiBox. 
  1794.  
  1795.  
  1796. ΓòÉΓòÉΓòÉ 2.4.5.2. Segment Transformations ΓòÉΓòÉΓòÉ
  1797.  
  1798. The segment transformation provides a way of defining the model transformation 
  1799. drawing attribute at the start of a retained segment. The attribute can 
  1800. subsequently be updated by the model transform orders within the segment. A 
  1801. segment transformation can be applied only to a retained segment. 
  1802.  
  1803. Segment transformations alter retained-drawing output. Unlike a model 
  1804. transformation, which can be set and reset within a segment bracket, a segment 
  1805. transformation must be set outside of a segment bracket. 
  1806.  
  1807. An application can determine the values for the current segment transformation 
  1808. by calling GpiQuerySegmentTransformMatrix, which returns the model 
  1809. transformation's scaling, rotation, and translation values in a one-dimensional 
  1810. array representing elements in the MATRIXLF structure. 
  1811.  
  1812. To apply a segment transformation, applications use 
  1813. GpiSetSegmentTransformMatrix. GpiSetSegmentTransformMatrix can be used to apply 
  1814. any sort of transformation to a segment. For example, it can be used to 
  1815. translate a dynamic segment from one screen position to another, when movement 
  1816. is requested by the user. The application could perform the following steps, 
  1817. for example, on receipt of a WM_MOUSEMOVE message: 
  1818.  
  1819.    1. Use the new mouse position to calculate the required displacement from 
  1820.       the current position. 
  1821.    2. Call GpiRemoveDynamics to remove the dynamic segment from its current 
  1822.       position. 
  1823.    3. Call GpiSetSegmentTransformMatrix to translate the segment coordinates by 
  1824.       the required amount. 
  1825.    4. Call GpiDrawDynamics to redraw the segment in its new position. 
  1826.  
  1827.  
  1828. ΓòÉΓòÉΓòÉ 2.4.5.3. Instance Transformations ΓòÉΓòÉΓòÉ
  1829.  
  1830. Instance transformations provide a way of defining the model transformation 
  1831. drawing attribute for the duration of a called segment. 
  1832.  
  1833. Instance transformations alter the retained-drawing output from special 
  1834. segments referred to as called segments. A called segment usually contains a 
  1835. subpicture duplicated several times in other subpictures. The instance 
  1836. transformation positions, sizes, and rotates the subpicture each time the 
  1837. segment is duplicated, because the transformation is set each time the segment 
  1838. is called. An instance transformation applies only to the called segment, and 
  1839. is reset on return to the calling segment. There is no query function 
  1840. associated with the transformation as it must be explicitly set for each called 
  1841. segment. 
  1842.  
  1843. To apply an instance transformation, applications call GpiCallSegmentMatrix 
  1844. from the calling segment. GpiCallSegmentMatrix calls the segment and also 
  1845. applies the model transformation's scaling, rotation, and translation values in 
  1846. a one-dimensional array representing elements in the MATRIXLF structure and 
  1847. passes a segment identifier. 
  1848.  
  1849.  
  1850. ΓòÉΓòÉΓòÉ 2.4.5.4. World Space-to-Model Space Transformation Summary ΓòÉΓòÉΓòÉ
  1851.  
  1852. The following table summarizes the choices available during world-coordinate 
  1853. space to model space transformations. 
  1854.  
  1855. World to Model Space Transformation Summary 
  1856.  
  1857. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1858. ΓöéTransformation ΓöéTransformation Function           ΓöéApplies    Γöé
  1859. ΓöéType           Γöé                                  Γöéto...      Γöé
  1860. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1861. ΓöéModel          ΓöéGpiSetModelTransformMatrix        ΓöéPrimitives Γöé
  1862. ΓöétransformationsΓöé                                  Γöéboth insideΓöé
  1863. Γöé               Γöé                                  Γöéand outsideΓöé
  1864. Γöé               Γöé                                  Γöéa segment  Γöé
  1865. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1866. ΓöéSegment        ΓöéGpiSetSegmentTransformMatrix      ΓöéA retained Γöé
  1867. ΓöétransformationsΓöé                                  Γöésegment,   Γöé
  1868. Γöé               Γöé                                  Γöéissued at  Γöé
  1869. Γöé               Γöé                                  Γöéthe first  Γöé
  1870. Γöé               Γöé                                  Γöéelement of Γöé
  1871. Γöé               Γöé                                  Γöéthe segmentΓöé
  1872. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1873. ΓöéInstance       ΓöéGpiCallSegmentMatrix              ΓöéOnly the   Γöé
  1874. ΓöétransformationsΓöé                                  Γöécalled     Γöé
  1875. Γöé               Γöé                                  Γöésegment    Γöé
  1876. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1877.  
  1878. Note:  The effect of GpiSetModelTransformMatrix and GpiCallSegmentMatrix on the 
  1879. model transformation drawing attribute can be duplicated by an equivalent 
  1880. drawing order in a drawn retained segment. 
  1881.  
  1882.  
  1883. ΓòÉΓòÉΓòÉ 2.4.6. Model Space-to-Page Space Transformations ΓòÉΓòÉΓòÉ
  1884.  
  1885. There are two transformations that operate between the model space and the page 
  1886. space: 
  1887.  
  1888.      Viewing transformations 
  1889.      Default viewing transformations 
  1890.  
  1891.  All three model transformation types and the viewing transformations can be 
  1892.  considered a part of the picture. The default viewing transformation is part 
  1893.  of the environment, and must not be used for picture construction. 
  1894.  
  1895.  Viewing transformations only apply in retained or nonretained segments. The 
  1896.  viewing transformation attribute is set to the presentation space viewing 
  1897.  transformation matrix value at the start of each drawn root segment and 
  1898.  remains constant for that segment. If GpiSetViewingTransformMatrix is called, 
  1899.  the new value is not used until the next segment is opened. The matrix drawing 
  1900.  attribute is reset to identity at the end of the segment. Each change in a 
  1901.  viewing transformation is equivalent to defining a new model space. 
  1902.  
  1903.  The default viewing transformation is a presentation space attribute and 
  1904.  should not normally be modified in the middle of a picture. This attribute can 
  1905.  be updated by GpiSetDefaultViewMatrix. 
  1906.  
  1907.  A picture is normally constructed in the presentation page with an identity 
  1908.  default viewing transformation. The default viewing transformation can then be 
  1909.  used to scale and scroll the entire picture in the presentation page. 
  1910.  
  1911.  
  1912. ΓòÉΓòÉΓòÉ 2.4.6.1. Viewing Transformations ΓòÉΓòÉΓòÉ
  1913.  
  1914. More than one copy of an entire model space can be drawn in page coordinate 
  1915. space, and each copy can be transformed as required. Parts of the model space 
  1916. also can be transformed to the presentation page. For example, an enlarged view 
  1917. of the tail of an aircraft can be shown with a reduced view of the complete 
  1918. aircraft in one corner. This is shown in the following figure. 
  1919.  
  1920. Presentation-Page Space 
  1921.  
  1922. The entire model space (the aircraft) and a part of the model space (the tail 
  1923. of the aircraft) are drawn to a single page coordinate space. In each instance, 
  1924. scaling and translation transformations have been applied. 
  1925.  
  1926. Alternatively, the displayed picture can be made up of several subpictures with 
  1927. no common graphical elements. For example, the aircraft can be drawn in one 
  1928. part of the display, and a map of an airport in another part of the display. In 
  1929. this instance, the final picture would be derived from different model spaces. 
  1930.  
  1931. Whether multiple views are derived from a single model space or from different 
  1932. model spaces, there are two items to address for each instance of a model space 
  1933. incorporated into the presentation page: 
  1934.  
  1935.    1. The part of the model space to be displayed must be identified by 
  1936.       defining a viewing window for the model space. 
  1937.  
  1938.    2. To position and size the contents of the model space in page coordinate 
  1939.       space, a viewing transformation must be specified. 
  1940.  
  1941.  To get views of one or more model spaces on the screen simultaneously, each 
  1942.  model space is drawn the required number of times. Before each drawing 
  1943.  request, the viewing window is defined and a viewing transformation is 
  1944.  specified. 
  1945.  
  1946.  
  1947. ΓòÉΓòÉΓòÉ 2.4.6.2. Defining the Viewing Window ΓòÉΓòÉΓòÉ
  1948.  
  1949. The viewing window is a conceptual boundary around a part of the model space. 
  1950. To produce the picture in the previous figure, the aircraft is drawn twice. The 
  1951. first time, the viewing window is on only the tail of the aircraft, and the 
  1952. second time, the viewing window is on the entire aircraft. Only those parts of 
  1953. the model space within the viewing window are visible in the picture assembled 
  1954. in presentation-page space. GpiSetViewingLimits is used to define the viewing 
  1955. window. 
  1956.  
  1957.  
  1958. ΓòÉΓòÉΓòÉ 2.4.6.3. Graphics Field ΓòÉΓòÉΓòÉ
  1959.  
  1960. Applications also can specify a type of viewing window for the presentation 
  1961. page smaller than the page. This window is known as the graphics field. To 
  1962. define a graphics field, use GpiSetGraphicsField. By default, no graphics field 
  1963. is specified. If a graphics field is defined, the picture assembled within it 
  1964. is the picture that is visible on the output device. 
  1965.  
  1966. An application can determine the current values for the viewing transformation 
  1967. by calling GpiQueryViewingTransformMatrix, which returns the transformation 
  1968. values in a one-dimensional array representing elements in the MATRIXLF 
  1969. structure. The application can set the values by calling 
  1970. GpiSetViewingTransformMatrix, and passing the transformation values in a 
  1971. one-dimensional array representing elements in MATRIXLF structure. 
  1972.  
  1973.  
  1974. ΓòÉΓòÉΓòÉ 2.4.6.4. Default Viewing Transformations ΓòÉΓòÉΓòÉ
  1975.  
  1976. The default viewing window is the same size as the model space. Therefore, to 
  1977. display one or more entire model spaces, draw the picture the required number 
  1978. of times and let the viewing window default each time. 
  1979.  
  1980. Default viewing transformations scroll or zoom pictures in a window on a 
  1981. display screen. An application can determine the current values for the default 
  1982. viewing transformation by calling GpiQueryDefaultViewMatrix, which returns the 
  1983. default-viewing-transformation values in a one-dimensional array representing 
  1984. elements in MATRIXLF structure. The application can set these values by calling 
  1985. GpiSetDefaultViewMatrix and passing the transformation values in a 
  1986. one-dimensional array representing elements in MATRIXLF structure. 
  1987.  
  1988. A default viewing transformation is applied when the screen contents are zoomed 
  1989. or scrolled by user interaction. A picture is zoomed when the user wants to 
  1990. increase or decrease the size of an area of interest. A picture is usually 
  1991. scrolled when there is more in the presentation page than can be displayed in a 
  1992. single page of output. Anything lying off the screen, but within the range of 
  1993. the presentation page, can be scrolled into view. The default viewing 
  1994. transformation applies to the entire page coordinate space, and can be added 
  1995. to, or can replace, the current default viewing transformation. The PM applies 
  1996. it after any viewing transformations. 
  1997.  
  1998. When a presentation page is created, the default viewing transformation is set 
  1999. to identity. For example, if the presentation-page contents are scrolled: 
  2000.  
  2001.      Erase the screen contents. 
  2002.  
  2003.      Call GpiSetDefaultViewMatrix to translate the presentation-page picture 
  2004.       by the required amount. 
  2005.  
  2006.      Draw the picture again. 
  2007.  
  2008.  The following figure shows the airplane presentation-page contents scrolled to 
  2009.  the left. 
  2010.  
  2011.  Scrolling the Presentation Page 
  2012.  
  2013.  Every presentation-page coordinate is translated to the left by the same 
  2014.  amount. 
  2015.  
  2016.  Zooming is implemented in the same way, except that the default viewing 
  2017.  transformation is used to scale the picture up or down as required. 
  2018.  
  2019.  If you want to display only one view of a single picture, and if you do not 
  2020.  want scrolling and zooming capabilities, you can let the viewing and default 
  2021.  viewing transformations default. When both transformations are permitted to 
  2022.  default, page coordinate space is effectively the same as model space. 
  2023.  
  2024.  
  2025. ΓòÉΓòÉΓòÉ 2.4.7. Page-Space to Device-Space Transformations ΓòÉΓòÉΓòÉ
  2026.  
  2027. There is only one transformation between the page coordinate space and the 
  2028. device space, the device transformation. The device transformation enables 
  2029. applications to work in any presentation-page units regardless of the target 
  2030. device. Unlike the transformations previously described, the device 
  2031. transformation only scales and translates objects, and it is defined by two 
  2032. rectangles. 
  2033.  
  2034. The first rectangle is called the presentation page. Its location is the bottom 
  2035. left origin and its dimensions are fixed. The second is called the page 
  2036. viewport. Its location is the bottom left origin and its dimensions can be 
  2037. varied. 
  2038.  
  2039. The device transformation, which maps the picture in presentation-page space to 
  2040. device space, happens automatically. The device transformation is established 
  2041. when the presentation space is created, and ensures that graphics are displayed 
  2042. in the correct size and, where possible, that their aspect ratio is preserved. 
  2043.  
  2044. To modify the device transformation, applications use GpiSetPageViewport. Input 
  2045. for this function is the device coordinates of the lower-left and upper-right 
  2046. corners of the page viewport. Applications should modify the default device 
  2047. transformation only when it is necessary to use nonstandard page units. 
  2048.  
  2049.  
  2050. ΓòÉΓòÉΓòÉ 2.4.7.1. Presentation Pages ΓòÉΓòÉΓòÉ
  2051.  
  2052. A presentation page is a rectangle in a page space. Its lower-left corner is 
  2053. always positioned at the origin of the page space. 
  2054.  
  2055. An application can determine the dimensions of the presentation page by calling 
  2056. GpiQueryPS. It returns a pointer to a SIZEL structure that contains the page 
  2057. dimensions. If an application specifies arbitrary page units when creating a 
  2058. presentation space with GpiCreatePS, the page viewport is constructed such that 
  2059. the origin of the page rectangle maps to the origin of the default device 
  2060. rectangle and either the right or top edge maps to the corresponding edge. 
  2061. Thus, the aspect ratio of the graphic is preserved. 
  2062.  
  2063. If either the height or width of the presentation page is set to 0 (using 
  2064. GpiCreatePS), the application must set GPIA_ASSOC to set the default 
  2065. presentation page size to the default device rectangle size. 
  2066.  
  2067.  
  2068. ΓòÉΓòÉΓòÉ 2.4.7.2. Page Viewports ΓòÉΓòÉΓòÉ
  2069.  
  2070. A page viewport is a rectangle in device space, whose origin and size can be 
  2071. varied. The operating system uses the presentation-page rectangle and the 
  2072. page-viewport rectangle to define the device transformation. 
  2073.  
  2074. An application can determine the current dimensions of the page viewport by 
  2075. calling GpiQueryPageViewport, which returns a pointer to a RECTL structure that 
  2076. contains the coordinates of the viewport. The application can set the location 
  2077. and dimensions of the page viewport by calling GpiSetPageViewport and passing 
  2078. it a pointer to a RECTL structure that contains the new values. 
  2079.  
  2080. The ratio of the page width to the page-viewport width defines a horizontal 
  2081. scaling factor. The ratio of the page height to the viewport height defines a 
  2082. vertical scaling factor. Applications can use DevQueryCaps to obtain the 
  2083. horizontal and vertical resolution of a device in pels per meter. The 
  2084. dimensions of a pel can vary from one device to another, but they usually fall 
  2085. in the range of 0.25 to 0.50 mm. 
  2086.  
  2087. The page viewport can be shifted in the device space by a translation 
  2088. transformation. 
  2089.  
  2090.  
  2091. ΓòÉΓòÉΓòÉ 2.4.7.3. Mapping the Presentation Page to the Device ΓòÉΓòÉΓòÉ
  2092.  
  2093. When an application associates a presentation space with a device context, a 
  2094. default device transformation is set. A page viewport is defined according to 
  2095. the rules in the following table: 
  2096.  
  2097. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2098. ΓöéPresentation-page ΓöéPage viewport size  ΓöéUsage.                Γöé
  2099. Γöéspecification     Γöé                    Γöé                      Γöé
  2100. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2101. ΓöéPels              ΓöéThe same size as theΓöéThe lower-left corner Γöé
  2102. Γöé                  Γöépresentation page.  Γöéof the presentation   Γöé
  2103. Γöé                  Γöé                    Γöépage maps to the      Γöé
  2104. Γöé                  Γöé                    Γöélower-left corner of  Γöé
  2105. Γöé                  Γöé                    Γöéthe device space. For Γöé
  2106. Γöé                  Γöé                    Γöéexample, if an        Γöé
  2107. Γöé                  Γöé                    Γöéapplication defines a Γöé
  2108. Γöé                  Γöé                    Γöépresentation page of  Γöé
  2109. Γöé                  Γöé                    Γöé300 coordinates       Γöé
  2110. Γöé                  Γöé                    Γöé(x-axis)-by-200       Γöé
  2111. Γöé                  Γöé                    Γöécoordinates (y-axis), Γöé
  2112. Γöé                  Γöé                    Γöéthen the picture is   Γöé
  2113. Γöé                  Γöé                    Γöétransformed to a      Γöé
  2114. Γöé                  Γöé                    Γöéscreen area of the    Γöé
  2115. Γöé                  Γöé                    Γöésame size.            Γöé
  2116. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2117. ΓöéMetric units      ΓöéThe coordinates thatΓöéThe lower-left corner Γöé
  2118. Γöé                  Γöéproduce the correct Γöéof the presentation   Γöé
  2119. Γöé                  Γöématrix for the      Γöépage maps to the      Γöé
  2120. Γöé                  Γöéphysical spacing of Γöélower-left corner of  Γöé
  2121. Γöé                  Γöéthe pels.           Γöéthe device space.     Γöé
  2122. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2123. ΓöéArbitrary units   ΓöéThe default size forΓöéThe page viewport is  Γöé
  2124. Γöé                  Γöéthe device is used. Γöéconstructed such that Γöé
  2125. Γöé                  ΓöéFor a plotter or    Γöéthe presentation-page Γöé
  2126. Γöé                  Γöéprinter, this is theΓöécoordinates give equalΓöé
  2127. Γöé                  Γöémaximum accessible  Γöéx- and y-spacing. The Γöé
  2128. Γöé                  Γöéarea of the paper,  Γöélower-left corner of  Γöé
  2129. Γöé                  Γöéand for a screen, itΓöéthe presentation page Γöé
  2130. Γöé                  Γöéis the maximized    Γöémaps to the lower-leftΓöé
  2131. Γöé                  Γöéwindow size.        Γöécorner of the device  Γöé
  2132. Γöé                  Γöé                    Γöéspace, and either the Γöé
  2133. Γöé                  Γöé                    Γöéright or the top edgesΓöé
  2134. Γöé                  Γöé                    Γöémap, such that the    Γöé
  2135. Γöé                  Γöé                    Γöépicture is contained  Γöé
  2136. Γöé                  Γöé                    Γöéwithin the device     Γöé
  2137. Γöé                  Γöé                    Γöérectangle and its     Γöé
  2138. Γöé                  Γöé                    Γöéaspect ratio is       Γöé
  2139. Γöé                  Γöé                    Γöépreserved.            Γöé
  2140. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2141. The following figure shows mapping from the presentation page to the device. 
  2142.  
  2143. The device transformation can be explicitly specified using GpiSetPageViewport. 
  2144.  
  2145. Mapping a Picture from the Presentation Page to the Device 
  2146.  
  2147. In this example, a map of the world has been drawn in a presentation page, 
  2148. defined in arbitrary units, that is much larger than the device space. The 
  2149. device transformation scales the picture to fit the maximized window size and 
  2150. preserves its aspect ratio. 
  2151.  
  2152.  
  2153. ΓòÉΓòÉΓòÉ 2.4.7.4. Coding the Device Transformation ΓòÉΓòÉΓòÉ
  2154.  
  2155. The PM automatically transforms the presentation-page contents to the area of 
  2156. the device space within the page viewport. The drawing is not clipped to the 
  2157. page viewport because this is a scaling transformation only. The entire picture 
  2158. is displayed, regardless of the size of the page viewport specified. The 
  2159. following figure shows the airplane presentation-page contents scaled to fit 
  2160. the page viewport. 
  2161.  
  2162. Device Space 
  2163.  
  2164. A page viewport smaller than the presentation page has been defined. The 
  2165. picture assembled in the presentation page is therefore scaled to fit the page 
  2166. viewport. 
  2167.  
  2168. After transformation to device space, graphics coordinates must be in the range 
  2169. -32768 through +32767, even if the presentation page is defined in GPIF_LONG 
  2170. format. An attempt to address a coordinate outside this range results in a 
  2171. coordinate-overflow error. To determine if a graphics object will give an 
  2172. error, applications can do the following: 
  2173.  
  2174.      If the application is not rotating or shearing a graphics object, it 
  2175.       calls GpiConvert to convert the device-space limits to 
  2176.       world-coordinate-space limits, then uses these limits when creating the 
  2177.       graphics object. 
  2178.  
  2179.      If the application is rotating or shearing a graphics object, it uses 
  2180.       GpiConvert to convert the device-space limits back to model space, and 
  2181.       ensures that the picture boundary is inside these limits. Note that this 
  2182.       method only applies if all rotational and shearing is performed using 1 
  2183.       of the model transformation types. 
  2184.  
  2185.  Remember that world-coordinate space has its own own limits: 
  2186.  
  2187.      -32768 through +32767 for a GPIF_SHORT-format presentation page 
  2188.  
  2189.      -134217728 through +134217727 for a GPIF_LONG-format presentation page. 
  2190.  
  2191.  Although applications can specify a page viewport of any size, the 
  2192.  presentation page can be mapped only to an area equal to, or less than, the 
  2193.  available device space. If an application specifies a viewport larger than the 
  2194.  available device space, part of the presentation page contents are displayed 
  2195.  outside the visible device output area. To find out the dimensions of the page 
  2196.  viewport for the currently associated device, use GpiQueryPageViewport. 
  2197.  Applications can store the dimensions of the current page viewport before 
  2198.  changing them, and restore them later. 
  2199.  
  2200.  
  2201. ΓòÉΓòÉΓòÉ 2.4.7.5. Device-Transformation Matrix ΓòÉΓòÉΓòÉ
  2202.  
  2203. To directly manipulate the device-transformation matrix it is necessary for 
  2204. applications to know the following values: 
  2205.  
  2206.  X1   the x-coordinate of the lower-left corner of the page viewport 
  2207.  
  2208.  Y1   the y-coordinate of the lower-left corner of the page viewport 
  2209.  
  2210.  X2   the x-coordinate of the upper-right corner of the page viewport 
  2211.  
  2212.  Y2   the y-coordinate of the upper-right corner of the page viewport 
  2213.  
  2214.  XPS  the presentation-space width -1 
  2215.  
  2216.  YPS  the presentation-space height -1. 
  2217.  
  2218.  The device-transformation matrix is defined as: 
  2219.  
  2220.     ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2221.     Γöé  The device-transformation matrix: Γöé  where:                      Γöé
  2222.     Γöé  Γöî                 ΓöÉ               Γöé                              Γöé
  2223.     Γöé  Γöé Msub11  0     0 Γöé               Γöé a = (Xsub2-Xsub1)/(Xps+1)    Γöé
  2224.     Γöé  Γöé  0     Msub22 0 Γöé               Γöé                              Γöé
  2225.     Γöé  Γöé Msub31 Msub32 1 Γöé               Γöé b = (Ysub2-Ysub1)/(Yps+1)    Γöé
  2226.     Γöé  Γöö                 Γöÿ               Γöé                              Γöé
  2227.     Γöé                                    Γöé c = Xsub1+(a-1)/2            Γöé
  2228.     Γöé                                    Γöé                              Γöé
  2229.     Γöé                                    Γöé d = Ysub1+(b-1)/2            Γöé
  2230.     Γöé                                    Γöé                              Γöé
  2231.     ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2232.  
  2233.  
  2234. ΓòÉΓòÉΓòÉ 2.4.8. Windowing-System Transformation ΓòÉΓòÉΓòÉ
  2235.  
  2236. There is one transformation, the windowing-system transformation, performed 
  2237. automatically by the PM. The windowing-system transformation, which is a 
  2238. translation transformation only, maps the coordinates of the picture in device 
  2239. space to the coordinates of the screen window or printer page. This happens 
  2240. when a picture is first drawn and whenever the display window in which the 
  2241. picture has been drawn is moved. 
  2242.  
  2243.  
  2244. ΓòÉΓòÉΓòÉ 2.4.9. Transforming Bit-Map Data ΓòÉΓòÉΓòÉ
  2245.  
  2246. In general, graphics defined in device coordinates (bit maps and image 
  2247. primitives) cannot be transformed. For example, the size of an image primitive 
  2248. is specified in device coordinates, and cannot be altered. The size, therefore, 
  2249. remains unaltered down the viewing pipeline. The position of an image 
  2250. primitive, however, is specified in world coordinates. The image is therefore 
  2251. subject to translation transformations. Note, however, that GpiWCBitBlt permits 
  2252. the target rectangle to be specified in world coordinates, which are 
  2253. transformed. 
  2254.  
  2255. Because the position of the image primitive is specified in world coordinates 
  2256. and its width is specified in device coordinates, positioning two images 
  2257. together on the screen causes special difficulties. The second image cannot be 
  2258. positioned without knowing the width, in world coordinates, of the first image. 
  2259. To get the width of the first image: 
  2260.  
  2261.    1. Identify two coordinate positions, one on the image's left edge, and one 
  2262.       on its right edge. For example, the two positions could be (10,80) and 
  2263.       (150,80). These positions are in device coordinates. 
  2264.  
  2265.    2. Convert these device coordinates to world coordinates using GpiConvert. 
  2266.       GpiConvert converts an array of (x,y) coordinates that apply in one 
  2267.       coordinate space to their corresponding values in another coordinate 
  2268.       space. 
  2269.  
  2270.    3. Subtract the lower x-coordinate from the higher x-coordinate. In the 
  2271.       above example, the width of the image is the difference between the 
  2272.       world-coordinate equivalents of 150 and 10. 
  2273.  
  2274.  When you have the width of the first image in world coordinates, you can 
  2275.  calculate the start position of the second image. 
  2276.  
  2277.  Paths, although defined in world coordinates, are device-dependent and are 
  2278.  bound in device coordinates when they are defined. Subsequent transformations 
  2279.  (other than the windowing-system transformation) have no effect on paths. 
  2280.  However, if a path is used to create a wide line, the width of the line is 
  2281.  scaled as required. 
  2282.  
  2283.  
  2284. ΓòÉΓòÉΓòÉ 2.5. Using Coordinate Spaces and Transformations ΓòÉΓòÉΓòÉ
  2285.  
  2286. This section explains how to: 
  2287.  
  2288.      Set an application's drawing units to convenient units 
  2289.      Translate, rotate, and scale a picture 
  2290.      Shear a picture 
  2291.  
  2292.  
  2293. ΓòÉΓòÉΓòÉ 2.5.1. Setting Drawing Units ΓòÉΓòÉΓòÉ
  2294.  
  2295. Applications can use GpiCreatePS to set the device transformation so that it 
  2296. uses page units that might be more convenient than pels; for example, 
  2297. centimeters. If the output device is a screen, the application first opens a 
  2298. device context by calling WinOpenWindowDC. If the output device is a printer or 
  2299. plotter, the application opens a printer or plotter device context by calling 
  2300. DevOpenDC. The application then creates a presentation space by calling 
  2301. GpiCreatePS, specifying low-metric page units and associating the device 
  2302. context with the presentation space. The following figure is an example of how 
  2303. to set drawing units. 
  2304.  
  2305.  
  2306.     HWND hwnd;                    /* Client-window handle         */
  2307.     HAB hab;                      /* Anchor-block handle          */
  2308.     HPS hps;                      /* Presentation-space handle    */
  2309.     HDC hdc;                      /* Device-context handle        */
  2310.     SIZEL sizlPage;               /* Presentation-page rectangle  */
  2311.  
  2312.     hdc = WinOpenWindowDC(hwnd);
  2313.     sizlPage.cx = 0;
  2314.     sizlPage.cy = 0;
  2315.     hps = GpiCreatePS(hab,        /* Anchor-block handle          */
  2316.           hdc,                    /* Device-context handle        */
  2317.           &sizlPage,              /* Address of SIZEL structure   */
  2318.           PU_LOMETRIC             /* Centimeters as page units    */
  2319.           | GPIA_ASSOC);          /* Associates window DC with PS */
  2320.  
  2321.  
  2322. ΓòÉΓòÉΓòÉ 2.5.2. Translating, Rotating, and Scaling a Picture ΓòÉΓòÉΓòÉ
  2323.  
  2324. GpiTranslate, GpiRotate, and GpiScale provide a convenient method for 
  2325. transforming objects in a picture. The following figure shows how to use these 
  2326. functions to translate, rotate, and scale a triangle. 
  2327.  
  2328.     MATRIXLF matlfTransform;
  2329.     POINTL ptlStart, ptlTrans, ptlRotate, ptlScale;
  2330.     FIXED fxAngle, afxScale[2];
  2331.     POINTL aptlTriangle[] = { 575, 300, 575, 500, 500, 300 };
  2332.  
  2333.     ptlStart.x = 500;                      /* Starting point x direction   */
  2334.     ptlStart.y = 300;                      /* Starting point y direction   */
  2335.     GpiMove(hps, &ptlStart);
  2336.     GpiPolyLine(hps, sizeof(aptlTriangle) / sizeof(POINTL), aptlTriangle);
  2337.  
  2338.     ptlTrans.x = 75;                       /* x coordinate for translation */
  2339.     ptlTrans.y = 75;                       /* y coordinate for translation */
  2340.  
  2341.     GpiTranslate(hps,                      /* Presentation-space handle    */
  2342.         &matlfTransform,                   /* Address of matrix            */
  2343.         TRANSFORM_REPLACE,                 /* Replace old matrix with new  */
  2344.         &ptlTrans);                        /* Coordinates for translation  */
  2345.  
  2346.     GpiSetModelTransformMatrix(hps,        /* Presentation-space handle    */
  2347.         9,                                 /* Number of points in matrix   */
  2348.         &matlfTransform,                   /* Address of matrix            */
  2349.         TRANSFORM_REPLACE);                /* Replace old matrix with new  */
  2350.  
  2351.     GpiMove(hps, &ptlStart);               /* Move to starting point       */
  2352.     GpiPolyLine(hps, sizeof(aptlTriangle) / sizeof(POINTL), aptlTriangle);
  2353.  
  2354.     fxAngle = MAKEFIXED(-45, 0);           /* Rotate 45 degrees clockwise  */
  2355.     ptlRotate.x = 550;                     /* x coordinate rotation origin */
  2356.     ptlRotate.y = 350;                     /* y coordinate rotation origin */
  2357.  
  2358.     GpiRotate(hps,                         /* Presentation-space handle    */
  2359.         &matlfTransform,                   /* Address of matrix            */
  2360.         TRANSFORM_REPLACE,                 /* Replace old matrix with new  */
  2361.         fxAngle,                           /* Rotation angle               */
  2362.         &ptlRotate);                       /* Origin of rotation           */
  2363.  
  2364.     GpiSetModelTransformMatrix(hps, 9, &matlfTransform, TRANSFORM_REPLACE);
  2365.  
  2366.     GpiMove(hps, &ptlStart);               /* Move to starting point       */
  2367.     GpiPolyLine(hps, sizeof(aptlTriangle) / sizeof(POINTL), aptlTriangle);
  2368.  
  2369.     ptlScale.x = 550;                      /* x coordinate scale origin    */
  2370.     ptlScale.y = 350;                      /* y coordinate scale origin    */
  2371.     afxScale[0] = MAKEFIXED(2, 0);         /* Scaling factor on x axis     */
  2372.     afxScale[1] = MAKEFIXED(2, 0);         /* Scaling factor on y axis     */
  2373.  
  2374.     GpiScale(hps,                          /* Presentation-space handle    */
  2375.         &matlfTransform,                   /* Address of matrix            */
  2376.         TRANSFORM_REPLACE,                 /* Replace old matrix with new  */
  2377.         &afxScale[0],                      /* Scaling factor               */
  2378.         &ptlScale);                        /* Origin of scaling operation  */
  2379.  
  2380.     GpiSetModelTransformMatrix(hps, 9, &matlfTransform, TRANSFORM_REPLACE);
  2381.  
  2382.     GpiMove(hps, &ptlStart);               /* Move to starting point       */
  2383.     GpiPolyLine(hps, sizeof(aptlTriangle) / sizeof(POINTL), aptlTriangle);
  2384.  
  2385.  
  2386. ΓòÉΓòÉΓòÉ 2.5.3. Shearing a Picture ΓòÉΓòÉΓòÉ
  2387.  
  2388. The following figure is an example of shearing a picture by modifying the 
  2389. transformation matrix directly. 
  2390.  
  2391.  
  2392.    MATRIXLF matlfTransform;
  2393.    POINTL ptlStart, ptlEnd;
  2394.  
  2395.    ptlStart.x = 500;          /* x coordinate, lower-left corner of box   */
  2396.    ptlStart.y = 300;          /* y coordinate, lower-left corner of box   */
  2397.    GpiMove(hps, &ptlStart);
  2398.    ptlEnd.x = 700;      ;     /* x coordinate, upper-right corner of box  */
  2399.    ptlEnd.y = 500;      ;     /* y coordinate, upper-right corner of box  */
  2400.    GpiBox(hps, DRO_OUTLINE, &ptlEnd, 0, 0);  /* Draw first box            */
  2401.  
  2402.     matlfTransform.fxM11 = MAKEFIXED(1, 0);
  2403.     matlfTransform.fxM12 = MAKEFIXED(0, 0);
  2404.     matlfTransform.lM13 = 0;
  2405.     matlfTransform.fxM21 = MAKEFIXED(0, 65536 / 2);  /* Shear factor .5   */
  2406.     matlfTransform.fxM22 = MAKEFIXED(1, 0);
  2407.     matlfTransform.lM23 = 0;
  2408.     matlfTransform.lM31 = 200;               /* Translate 200 units right */
  2409.     matlfTransform.lM32 = 0;
  2410.     matlfTransform.lM33 = 1;
  2411.     GpiSetDefaultViewMatrix(hps, 9, &matlfTransform, TRANSFORM_REPLACE);
  2412.  
  2413.     GpiMove(hps, &ptlStart);
  2414.     GpiBox(hps, DRO_OUTLINE, &ptlEnd, 0, 0); /* Draw sheared box          */
  2415.  
  2416.  
  2417. ΓòÉΓòÉΓòÉ 2.5.4. Using World to Model Space Transformations ΓòÉΓòÉΓòÉ
  2418.  
  2419. The following is an example of a sequence of calls in which segment, model, and 
  2420. instance transformations are applied to graphics objects. 
  2421.  
  2422. GpiSetDrawingMode (DM_RETAIN)   /* Sets the current drawing mode        */
  2423.                                 /* to DM_RETAIN                         */
  2424.  
  2425. GpiOpenSegment (segment 1)      /* Creates a chained segment            */
  2426.  
  2427. GpiCloseSegment
  2428. GpiSetSegmentAttrs              /* Make segment 1 an unchained segment  */
  2429.  
  2430. GpiOpenSegment (segment 2)      /* Creates a retained, chained segment  */
  2431.  
  2432. GpiSetModelTransformMatrix (TRANSFORM_ADD)
  2433.                                 /* Specifies a transformation to        */
  2434.                                 /* apply to subsequent primitives.      */
  2435.                                 /* This is in addition to the current   */
  2436.                                 /* model transformation.                */
  2437.  
  2438. GpiCallSegmentMatrix (1, TRANSFORM_ADD)
  2439.                                 /* Calls segment 1 and applies a        */
  2440.                                 /* transformation to it.                */
  2441.                                 /* This transformation is in addition   */
  2442.                                 /* to the current model transformation, */
  2443.                                 /* and applies only to the called       */
  2444.                                 /* segment.                             */
  2445.    .
  2446.    .
  2447. GpiSetCurrentArcParams
  2448. GpiPointArc                     /* The 3-point arc is not subject       */
  2449.                                 /* to the transformation specified      */
  2450.                                 /* on the call to GpiCallSegmentMatrix. */
  2451.                                 /* The transformation that was          */
  2452.                                 /* current before segment 1 was called  */
  2453.                                 /* is applied to the remainder of       */
  2454.                                 /* segment 2.                           */
  2455.  
  2456. GpiCloseSegment
  2457. GpiSetSegmentTransformMatrix (segment 2)
  2458.                                 /* Specifies a segment transformation   */
  2459.                                 /* for segment 2                        */
  2460.  
  2461. GpiDrawSegment                  /* Draws segment 2                      */
  2462.  
  2463.  
  2464. ΓòÉΓòÉΓòÉ 2.5.5. Viewing Transformation ΓòÉΓòÉΓòÉ
  2465.  
  2466. Each time an application draws the model space, it specifies a different 
  2467. viewing transformation to transfer a view of the picture-to-page coordinate 
  2468. space. GpiSetViewingTransformMatrix is used to apply a viewing transformation. 
  2469. There is one viewing transformation for each part or whole model space to be 
  2470. incorporated in page-coordinate space. 
  2471.  
  2472. GpiSetViewingTransformMatrix cannot be called while there is an open segment, 
  2473. and it has no effect on primitives outside segments. When it has been 
  2474. specified, the viewing transformation applies to all subsequently created 
  2475. segments until it is next changed. The viewing transformation that is current 
  2476. when a segment is created is a fixed part of the segment. Once specified, the 
  2477. viewing transformation cannot be queried, nor can it be altered, unless you 
  2478. re-create the segment. This is inconvenient when several versions of the same 
  2479. picture are being drawn. The problem can be solved by: 
  2480.  
  2481.      Defining the picture in one or more unchained segments. 
  2482.  
  2483.      Creating a segment chain and calling the unchained segments from each 
  2484.       root segment. 
  2485.  
  2486.      Setting the viewing transformation before each root segment. 
  2487.  
  2488.  Each time the segment chain is drawn, multiple views of the same picture are 
  2489.  produced. This sequence is illustrated in the following example, where the 
  2490.  segment chain comprises three root segments, each of which calls a single 
  2491.  unchained segment. 
  2492.  
  2493.   GpiSetInitialSegmentAttrs      /* Switches off the chained attribute   */
  2494.  
  2495.   GpiOpenSegment                 /* Creates an unchained segment         */
  2496.                                  /* containing the picture definition    */
  2497.  
  2498.   GpiCloseSegment
  2499.   GpiSetInitialSegmentAttrs      /* Switches on the chained attribute    */
  2500.  
  2501.   GpiSetViewingTransformMatrix   /* Sets the viewing transformation      */
  2502.                                  /* for segment 1                        */
  2503.  
  2504.   GpiOpenSegment (segment 1)
  2505.   GpiCallSegmentMatrix           /* Calls the unchained segment          */
  2506.  
  2507.   GpiCloseSegment
  2508.   GpiSetViewingTransformMatrix   /* Sets the viewing transformation      */
  2509.                                  /* for segment 2                        */
  2510.  
  2511.   GpiOpenSegment (segment 2)
  2512.   GpiSetViewingLimits            /* Specifies the area of interest       */
  2513.                                  /* in the model space.                  */
  2514.  
  2515.   GpiCallSegmentMatrix           /* Calls the unchained segment          */
  2516.  
  2517.   GpiCloseSegment
  2518.   GpiSetViewingTransformMatrix   /* Sets the viewing transformation      */
  2519.                                  /* for segment 3                        */
  2520.  
  2521.   GpiOpenSegment (segment 3)
  2522.   GpiCallSegmentMatrix           /* Calls the unchained segment          */
  2523.   GpiCloseSegment
  2524.  
  2525.  When a segment chain has been created using this method, an application cannot 
  2526.  change the viewing transformation unless it re-creates the segment chain. The 
  2527.  viewing transformation of a segment is permanently recorded and cannot be 
  2528.  edited. The application would not, however, have to re-create the picture 
  2529.  definition in the unchained segment. 
  2530.  
  2531.  If the picture definition comprises a number of unchained segments, an 
  2532.  application must create an intermediate segment to contain the 
  2533.  GpiCallSegmentMatrix calls for those segments. Each root segment would then 
  2534.  call the intermediate segment. 
  2535.  
  2536.  The viewing transformation applies to the entire root segment and cannot be 
  2537.  overridden from within the segment. It is particularly useful for positioning 
  2538.  and scaling one or more segments of a subpicture within the presentation page 
  2539.  when a segment transformation cannot be used. A segment transformation can be 
  2540.  overridden by any model or instance transformations within the segment. A 
  2541.  typical example of its use is when importing a subpicture using GpiPutData or 
  2542.  GpiPlayMetaFile. 
  2543.  
  2544.  Note:  The viewing transformation must be set to its default value before an 
  2545.  application defines an unchained segment to be called from another segment. 
  2546.  
  2547.  
  2548. ΓòÉΓòÉΓòÉ 3. Editing Retained Graphics and Graphics Segments ΓòÉΓòÉΓòÉ
  2549.  
  2550. This chapter describes editing retained graphics and graphics segments. The 
  2551. following topics are related to the information in this chapter: 
  2552.  
  2553.      Presentation spaces and device contexts 
  2554.      Coordinate spaces and transformations 
  2555.      Creating and drawing retained graphics 
  2556.  
  2557.  
  2558. ΓòÉΓòÉΓòÉ 3.1. About Editing Retained Graphics and Graphics Segments ΓòÉΓòÉΓòÉ
  2559.  
  2560. In the OS/2 operating system, applications store retained graphics in segments. 
  2561. One of the advantages of using graphics segments is that segments can be 
  2562. edited, which allows the retained image to be modified without having to 
  2563. re-create the unmodified portion with multiple GPI functions. 
  2564.  
  2565. Creating and Drawing Retained Graphics described how to create a segment, and 
  2566. store GPI functions within the segment bracket (the GPI functions bracketed by 
  2567. GpiOpenSegment and GpiCloseSegment). To understand how to edit a segment, the 
  2568. underlying structure of a segment is described here in greater detail. 
  2569.  
  2570. The GPI functions are not inserted directly into a segment bracket. Instead, 
  2571. the operating system converts the GPI functions into graphics orders. A 
  2572. graphics order, also known as a drawing order, is the smallest complete portion 
  2573. of a segment. Once the GPI functions are converted into graphics orders, these 
  2574. orders are stored in the GpiOpenSegment-GpiCloseSegment bracket. 
  2575.  
  2576. Generally, each of the GPI functions within the segment bracket generates one 
  2577. element of the segment. An element is the smallest portion of a segment that 
  2578. can be edited and is made up of one or more orders. The following figure 
  2579. illustrates the levels of graphic segment construction. 
  2580.  
  2581.  
  2582. GpiOpenSegment (...);    Graphic Segment
  2583.                         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ              element
  2584. GpiLine (...);          Γöé line order            Γöé element 0   pointer
  2585.                         Γöé                       Γöé
  2586. GpiBeginElement (...);  Γöé begin element order   Γöé element 1
  2587.                         Γöé                       Γöé
  2588.    GpiBox (...);        Γöé       box order       Γöé
  2589.    GpiPolyline (...);   Γöé       polyline order  Γöé
  2590.                         Γöé                       Γöé
  2591. GpiEndElement (...);    Γöé end element order     Γöé
  2592.                         Γöé                       Γöé
  2593. GpiLabel (...);         Γöé label order           Γöé element 2
  2594.                         Γöé                       Γöé
  2595. GpiSetColor (...);      Γöé set-color order       Γöé element 3
  2596.                         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2597. GpiCloseSegment (...);
  2598.  
  2599. Structure of a Graphics Segment 
  2600.  
  2601. Elements 0, 2, and 3 are each composed of a single order. Element 1 is composed 
  2602. of two orders bracketed by GpiBeginElement and GpiEndElement. 
  2603.  
  2604.  
  2605. ΓòÉΓòÉΓòÉ 3.1.1. Graphics Orders ΓòÉΓòÉΓòÉ
  2606.  
  2607. A graphics order is a low-level graphics command that corresponds to a 
  2608. primitive function or attribute. In addition to code and data requirements, 
  2609. each graphics order uses approximately 11 bytes of storage. An application that 
  2610. uses 2000 graphics drawing orders will use around 22KB of memory to store them. 
  2611. The following table describes the four sizes of graphics orders. 
  2612.  
  2613. Graphics Orders 
  2614.  
  2615. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2616. ΓöéGraphics Order Size     ΓöéContent                             Γöé
  2617. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2618. Γöé1 byte                  ΓöéA hexadecimal identifier            Γöé
  2619. Γöé                        Γöécorresponding to a drawing function Γöé
  2620. Γöé                        Γöéor attribute function. This         Γöé
  2621. Γöé                        Γöéidentifier is also known as the     Γöé
  2622. Γöé                        Γöéorder code.                         Γöé
  2623. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2624. Γöé2 byte                  ΓöéThe order code is in the first byte,Γöé
  2625. Γöé                        Γöéand data is in the second byte.     Γöé
  2626. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2627. ΓöéLong                    ΓöéThe order code is in the first byte.Γöé
  2628. Γöé                        Γöé                                    Γöé
  2629. Γöé                        ΓöéThe length value of the actual data,Γöé
  2630. Γöé                        Γöéin bytes, is in the second byte.    Γöé
  2631. Γöé                        Γöé                                    Γöé
  2632. Γöé                        ΓöéThe actual data (up to 255 bytes).  Γöé
  2633. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2634. ΓöéVery long               ΓöéA hexadecimal identifier            Γöé
  2635. Γöé(maximum length of 64KB)Γöéspecifically for extended orders, isΓöé
  2636. Γöé                        Γöéin the first byte.                  Γöé
  2637. Γöé                        Γöé                                    Γöé
  2638. Γöé                        ΓöéThe order code is in the second     Γöé
  2639. Γöé                        Γöébyte.                               Γöé
  2640. Γöé                        Γöé                                    Γöé
  2641. Γöé                        ΓöéA length value that specifies how   Γöé
  2642. Γöé                        Γöémany bytes are used by the          Γöé
  2643. Γöé                        Γöégraphics-order arguments, (high     Γöé
  2644. Γöé                        Γöéorder) is in the third byte.        Γöé
  2645. Γöé                        Γöé                                    Γöé
  2646. Γöé                        ΓöéA length value that specifies how   Γöé
  2647. Γöé                        Γöémany bytes are used by the          Γöé
  2648. Γöé                        Γöégraphics-order arguments, (low      Γöé
  2649. Γöé                        Γöéorder) is in the fourth byte.       Γöé
  2650. Γöé                        Γöé                                    Γöé
  2651. Γöé                        ΓöéThe actual data.                    Γöé
  2652. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2653.  
  2654. The following example shows a long graphics order that corresponds to GpiLine: 
  2655.  
  2656.     81 8 100 0 0 0 100 0 0 0
  2657.  
  2658. The first number, 81, is the hexadecimal identifier that corresponds to 
  2659. GpiLine. The second number, 8, is the length value that specifies how many 
  2660. bytes are used by the graphics-order arguments. The next eight bytes contain 
  2661. the arguments for GpiLine. In this case, the arguments specify the line's end 
  2662. point at (100,100). 
  2663.  
  2664.  
  2665.  
  2666.                                Graphics
  2667.                                Segment
  2668.                                       Γöé
  2669. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ  ΓöîΓöÇΓöÇ  0x21  Γö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ order # ΓöÇΓöÇΓöÉ
  2670. Γöé                      Γöé  Γöé     0x08  Γö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ length    Γöé
  2671. Γöé ptl.x = 100L;        Γöé  Γöé     0x00  Γöé ΓöÇΓöÇΓöÇΓöÇΓöÉ               Γöé
  2672. Γöé ptl.y = 100L;        Γöé  Γöé     0x00  Γöé     Γö£ΓöÇΓöÇ      x      Γöé
  2673. Γöé GpiMove (hps, &ptl); Γö╝ΓöÇΓöÇΓöÿ     0x10  Γöé     Γöé               Γö£ΓöÇΓöÇ  element
  2674. Γöé ptl.x = 200L;        Γöé        0x00  Γöé ΓöÇΓöÇΓöÇΓöÇΓöÿ               Γöé
  2675. Γöé ptl.y = 400L;        Γöé        0x00  Γöé ΓöÇΓöÇΓöÇΓöÇΓöÉ               Γöé
  2676. Γöé GpiMove (hps, &ptl); Γö╝ΓöÇΓöÇΓöÉ     0x00  Γöé     Γö£ΓöÇΓöÇ      y      Γöé
  2677. Γöé                      Γöé  Γöé     0x20  Γöé     Γöé               Γöé
  2678. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ  Γöé     0x00  Γöé ΓöÇΓöÇΓöÇΓöÇΓöÿ             ΓöÇΓöÇΓöÿ
  2679.                           ΓööΓöÇΓöÇ  0x81  Γö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ order # ΓöÇΓöÇΓöÉ
  2680.                                 0x08  Γö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ length    Γöé
  2681.                                 0x00  Γöé ΓöÇΓöÇΓöÇΓöÇΓöÉ               Γöé
  2682.                                 0x00  Γöé     Γö£ΓöÇΓöÇ      x      Γöé
  2683.                                 0x30  Γöé     Γöé               Γö£ΓöÇΓöÇ  element
  2684.                                 0x00  Γöé ΓöÇΓöÇΓöÇΓöÇΓöÿ               Γöé
  2685.                                 0x00  Γöé ΓöÇΓöÇΓöÇΓöÇΓöÉ               Γöé
  2686.                                 0x00  Γöé     Γö£ΓöÇΓöÇ      y      Γöé
  2687.                                 0x40  Γöé     Γöé               Γöé
  2688.                                 0x00  Γöé ΓöÇΓöÇΓöÇΓöÇΓöÿ             ΓöÇΓöÇΓöÿ
  2689.                                       Γöé
  2690.  
  2691.  
  2692. Graphics Orders 
  2693.  
  2694. The encoding that appears in the Graphics Segments column is a hexadecimal 
  2695. version of the order, length, and parameter information. 
  2696.  
  2697. In most cases, graphics orders in a segment correspond to a subpicture, which 
  2698. is part of a complete, more complex picture. Your application would combine the 
  2699. individual segments to form the complete picture. 
  2700.  
  2701. Three drawing modes affect how the operating system stores graphics orders in 
  2702. segments. These modes are described in the following table. The default drawing 
  2703. mode is draw (DM_DRAW). To specify another as the current drawing mode, use 
  2704. GpiSetDrawingMode. 
  2705.  
  2706. The actual drawing mode is a combination of the drawing mode as set using 
  2707. GpiSetDrawingMode, and the segment status-chained, unchained, or outside of the 
  2708. segment. The actual drawing mode does not affect the storing of orders in 
  2709. segments. 
  2710.  
  2711. Segment Graphics Drawing Modes 
  2712.  
  2713. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2714. ΓöéDrawing Mode      ΓöéGpiSetDrawingMode ΓöéWhen this mode is set...Γöé
  2715. Γöé                  ΓöéValue             Γöé                        Γöé
  2716. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2717. ΓöéDraw              ΓöéDM_DRAW           Γöéit is not possible to   Γöé
  2718. Γöé                  Γöé                  Γöéstore graphics orders inΓöé
  2719. Γöé                  Γöé                  Γöéa chained segment.      Γöé
  2720. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2721. ΓöéRetain            ΓöéDM_RETAIN         Γöéyour application can    Γöé
  2722. Γöé                  Γöé                  Γöéstore graphics orders inΓöé
  2723. Γöé                  Γöé                  Γöéchained and unchained   Γöé
  2724. Γöé                  Γöé                  Γöésegments.               Γöé
  2725. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2726. ΓöéDraw-and-retain   ΓöéDM_DRAWANDRETAIN  Γöéyour application can    Γöé
  2727. Γöé                  Γöé                  Γöéstore graphics orders inΓöé
  2728. Γöé                  Γöé                  Γöéchained and unchained   Γöé
  2729. Γöé                  Γöé                  Γöésegments.  In this mode,Γöé
  2730. Γöé                  Γöé                  Γöéoutput intended for a   Γöé
  2731. Γöé                  Γöé                  Γöéchained segment is both Γöé
  2732. Γöé                  Γöé                  Γöédrawn on the device and Γöé
  2733. Γöé                  Γöé                  Γöéstored in a segment.    Γöé
  2734. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2735.  
  2736.  
  2737. ΓòÉΓòÉΓòÉ 3.1.2. Graphics Elements ΓòÉΓòÉΓòÉ
  2738.  
  2739. Graphics elements are composed of either a single graphics order, or a series 
  2740. of graphic orders that are bracketed by an opening and closing element 
  2741. function. 
  2742.  
  2743. The purpose of this element bracket is to allow the addition of a single 
  2744. element, that comprises more than one graphics order, to a segment. This is 
  2745. most useful when you know that you will want to retrieve those orders at a 
  2746. later time, and manipulate them as a group rather than as individual functions. 
  2747.  
  2748. Note:  There is no reason for enclosing a single GPI function within a 
  2749. GpiBeginElement-GpiEndElement bracket, although it is a valid construction. 
  2750.  
  2751. Element brackets also are valid when drawing graphics directly to the output 
  2752. device, but again, they serve no purpose unless converted to a retained segment 
  2753. at a later time. Elements cannot be nested, so two elements cannot begin in 
  2754. succession without an intervening GpiEndElement request. Certain GPI functions 
  2755. cannot be called between GpiBeginElement and GpiEndElement. For example, 
  2756. GpiLabel cannot be used between GpiBeginElement and GpiEndElement. 
  2757.  
  2758. Element construction is valid only within segments. 
  2759.  
  2760.  
  2761. ΓòÉΓòÉΓòÉ 3.1.2.1. Adding Elements to a New Segment ΓòÉΓòÉΓòÉ
  2762.  
  2763. There are four ways of adding elements to a newly created segment: 
  2764.  
  2765.      Call one or more GPI functions. Each function generates one element of 
  2766.       the segment. This is the simplest way of supplying graphics data to a 
  2767.       segment. 
  2768.  
  2769.      Call GpiBeginElement, and follow it with one or more GPI functions. Close 
  2770.       the element using GpiEndElement. All the GPI functions enclosed within 
  2771.       the bracket and GpiBeginElement and GpiEndElement generate a single 
  2772.       element of the segment, and therefore occupy a single-element-pointer 
  2773.       position. Subsequently, the graphics orders cannot be accessed 
  2774.       individually with the element pointer, although the orders can be 
  2775.       accessed directly, for example, using GpiGetData. 
  2776.  
  2777.      Call GpiElement. As input, you supply the graphics orders themselves, 
  2778.       rather than the GPI functions that generate them. No matter how much data 
  2779.       you supply on this request, it is considered a single element of the 
  2780.       segment. 
  2781.  
  2782.       Multiple orders added to a segment in this way cannot be accessed 
  2783.       individually using the element pointer, but they can be accessed 
  2784.       directly, for example, using GpiGetData. 
  2785.  
  2786.       GpiElement cannot be included within a GpiBeginElement-GpiEndElement 
  2787.       bracket. The data passed by GpiElement must not include GpiBeginElement 
  2788.       and GpiEndElement. 
  2789.  
  2790.      Call GpiPutData. As with GpiElement, supply graphics orders as input. You 
  2791.       can even include GpiBeginElement and GpiEndElement orders in this data, 
  2792.       and thus add more than one element to the segment. GpiPutData is useful 
  2793.       when there is a large amount of data to add to a segment. 
  2794.  
  2795.       GpiPutData cannot be used if the segment editing mode is set to 
  2796.       SEGEM_REPLACE. When the segment editing mode is SEGEM_INSERT, the element 
  2797.       pointer must point to the last element in the current segment. The 
  2798.       segment editing mode can be set by using GpiSetEditMode.. 
  2799.  
  2800.       GpiPutData is most often used in conjunction with GpiGetData, which 
  2801.       copies data as a list of drawing orders from a segment to application 
  2802.       storage. 
  2803.  
  2804.  
  2805. ΓòÉΓòÉΓòÉ 3.1.2.2. Element Types ΓòÉΓòÉΓòÉ
  2806.  
  2807. Each element that results from a single GPI function has an associated element 
  2808. type. 
  2809.  
  2810. The element type is generally the graphics-order code associated with the 
  2811. graphics order generated by the GPI function, and is supplied by the system. 
  2812. For example, GpiLine has the element type, OCODE_GCLINE, which identifies it as 
  2813. a line-drawing request. Your application can determine the current 
  2814. classification of an element using GpiQueryElementType. 
  2815.  
  2816. When using GpiElement or GpiBeginElement, you can simultaneously add several 
  2817. graphics orders to a segment. Those orders become one element of the segment. 
  2818. You can supply your own classification for these compound elements by supplying 
  2819. a value for the type parameter of GpiElement or GpiBeginElement in the range of 
  2820. 0x81000000 through 0XFFFFFFFF. 
  2821.  
  2822. For example, the orders passed by a single GpiElement function could change the 
  2823. line type to dotted, set the current color to blue, and draw a line. You could 
  2824. classify this element with a type value that identifies it as a blue dotted 
  2825. line. 
  2826.  
  2827. Note:  Element types are used only for classification. They are not used as 
  2828. location markers or correlation tags. 
  2829.  
  2830.  
  2831. ΓòÉΓòÉΓòÉ 3.1.2.3. Element Pointer ΓòÉΓòÉΓòÉ
  2832.  
  2833. Use the element pointer to change the contents of an existing segment. When 
  2834. calling GpiOpenSegment, the element pointer is set to 0. The first element that 
  2835. you add to a newly created segment causes the pointer to be set to 1, and each 
  2836. subsequent element causes the pointer to be incremented by 1. When a segment is 
  2837. closed, the element pointer is always reset to 0. 
  2838.  
  2839. Your application can move the element pointer to a specified value using 
  2840. GpiSetElementPointer. For example, to address the sixth element in a segment, 
  2841. set the element pointer to 6. 
  2842.  
  2843. Your application also can move the element pointer by a specific number, rather 
  2844. than to a specific number, using GpiOffsetElementPointer. For example, if the 
  2845. element pointer currently addresses element 3, to move it to element 8, code an 
  2846. offset of 5 in GpiOffsetElementPointer. The pointer moves backward rather than 
  2847. forward through the segment. The offset value can be a positive or negative 
  2848. number. 
  2849.  
  2850. If the sum of the offset and the current pointer position is less than 0, the 
  2851. operating system sets the pointer so that it points to position 0. Position 0 
  2852. precedes the first element in the segment. If the sum of the offset and the 
  2853. current pointer position is greater than the number of elements in the segment, 
  2854. the operating system sets the pointer so that it points to the last element in 
  2855. the segment. 
  2856.  
  2857. You can determine the current location of the element pointer using 
  2858. GpiQueryElementPointer. To request the contents of a part of or all of the 
  2859. elements at the current pointer position, use GpiQueryElement. 
  2860.  
  2861.  
  2862. ΓòÉΓòÉΓòÉ 3.1.2.4. Labels ΓòÉΓòÉΓòÉ
  2863.  
  2864. You can include labels in a segment to make locating particular elements of the 
  2865. segment easier. If you label an element that is likely to be edited, you can 
  2866. access that element when necessary, regardless of whether the actual position 
  2867. of the label-element pair within the segment has changed. 
  2868.  
  2869. Warning: When editing segments, do not inadvertently insert elements between a 
  2870. label and the element that follows. Your application will no longer be able to 
  2871. use certain GPIs correctly because their default locations and offsets will be 
  2872. invalid. 
  2873.  
  2874. A label is only a place-holder or reference point, and is itself an element of 
  2875. the segment. Labels are long integer values. To include a label in a segment, 
  2876. use GpiLabel. The following example includes the label 5 in the current 
  2877. segment, whose segment id is 4. 
  2878.  
  2879. GpiOpenSegment(hps, 4L);
  2880. GpiLabel(hps, 5L);
  2881.  .
  2882.  .
  2883.  .
  2884. Your application can set the element pointer to the label position using 
  2885. GpiSetElementPointerAtLabel, then increment the pointer position to the element 
  2886. itself using GpiOffsetElementPointer with an offset of 1. 
  2887.  
  2888. Note:  This example of GPI cannot work properly if your application has allowed 
  2889. the insertion of elements between a label and the element that follows it. 
  2890.  
  2891. Labels do not have to be unique. If you do not use unique labels, 
  2892. GpiSetElementPointerAtLabel positions the element pointer at the first 
  2893. occurrence of the label, starting from the current pointer position. If the 
  2894. label is not found between the current pointer position and the end of the 
  2895. segment, an error condition is raised. Using labels as a navigation aid might 
  2896. be quicker than scanning the segment for a particular element. 
  2897.  
  2898. If you do not use labels, you must locate an element before you can change it. 
  2899. To locate a specific element in a segment, you must repeatedly move the element 
  2900. pointer using GpiSetElementPointer then read the contents of the element using 
  2901. GpiQueryElement. This can be quite a lengthy procedure depending upon the 
  2902. number of elements in the segment. 
  2903.  
  2904.  
  2905. ΓòÉΓòÉΓòÉ 3.1.3. Graphics Segments ΓòÉΓòÉΓòÉ
  2906.  
  2907. Segments are made up of elements, which are in turn made up of one or more 
  2908. graphic orders. The previous sections have discussed the properties and 
  2909. functions for orders and elements. The following sections discuss the 
  2910. attributes and functions that apply to segments as a whole. 
  2911.  
  2912. The segment attributes are encoded in a segment prior to the graphics orders 
  2913. that correspond to GPIs and attributes. 
  2914.  
  2915.  
  2916. ΓòÉΓòÉΓòÉ 3.1.3.1. Segment Attributes ΓòÉΓòÉΓòÉ
  2917.  
  2918. Each segment has a number of characteristics, called attributes that you can 
  2919. set in accordance with your application's requirements. The attributes of a 
  2920. segment are quite different from those of a graphics primitive, in that segment 
  2921. attributes have ON and OFF settings. There are seven segment attributes, each 
  2922. described in the following table. 
  2923.  
  2924. Graphic Segment Attributes and Initial Settings 
  2925.  
  2926. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2927. ΓöéAttribute         ΓöéValue               ΓöéIf set...     ΓöéDefault Γöé
  2928. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2929. ΓöéChained           ΓöéATTR_CHAINED        Γöéthe operating ΓöéON      Γöé
  2930. Γöé                  Γöé                    Γöésystem adds   Γöé        Γöé
  2931. Γöé                  Γöé                    Γöéeach new      Γöé        Γöé
  2932. Γöé                  Γöé                    Γöésegment in    Γöé        Γöé
  2933. Γöé                  Γöé                    Γöéyour          Γöé        Γöé
  2934. Γöé                  Γöé                    Γöéapplication's Γöé        Γöé
  2935. Γöé                  Γöé                    Γöépresentation  Γöé        Γöé
  2936. Γöé                  Γöé                    Γöéspace to the  Γöé        Γöé
  2937. Γöé                  Γöé                    Γöésegment chain.Γöé        Γöé
  2938. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2939. ΓöéFast chain        ΓöéATTR_FASTCHAIN      Γöéthe operating ΓöéON      Γöé
  2940. Γöé                  Γöé                    Γöésystem        Γöé        Γöé
  2941. Γöé                  Γöé                    Γöéprevents the  Γöé        Γöé
  2942. Γöé                  Γöé                    Γöéresetting of  Γöé        Γöé
  2943. Γöé                  Γöé                    Γöéprimitive     Γöé        Γöé
  2944. Γöé                  Γöé                    Γöéattributes to Γöé        Γöé
  2945. Γöé                  Γöé                    Γöétheir default Γöé        Γöé
  2946. Γöé                  Γöé                    Γöévalues before Γöé        Γöé
  2947. Γöé                  Γöé                    Γöédrawing the   Γöé        Γöé
  2948. Γöé                  Γöé                    Γöésegment chain.Γöé        Γöé
  2949. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2950. ΓöéDynamic           ΓöéATTR_DYNAMIC        Γöéthe operating ΓöéOFF     Γöé
  2951. Γöé                  Γöé                    Γöésystem draws  Γöé        Γöé
  2952. Γöé                  Γöé                    Γöésegment outputΓöé        Γöé
  2953. Γöé                  Γöé                    Γöéby using the  Γöé        Γöé
  2954. Γöé                  Γöé                    ΓöéXOR raster    Γöé        Γöé
  2955. Γöé                  Γöé                    Γöéoperation.    Γöé        Γöé
  2956. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2957. ΓöéDetectable        ΓöéATTR_DETECTABLE     Γöéyour          ΓöéOFF     Γöé
  2958. Γöé                  Γöé                    Γöéapplication   Γöé        Γöé
  2959. Γöé                  Γöé                    Γöécan perform   Γöé        Γöé
  2960. Γöé                  Γöé                    Γöécorrelation   Γöé        Γöé
  2961. Γöé                  Γöé                    Γöéoperations on Γöé        Γöé
  2962. Γöé                  Γöé                    Γöésegments      Γöé        Γöé
  2963. Γöé                  Γöé                    Γöécreated in    Γöé        Γöé
  2964. Γöé                  Γöé                    Γöéthis          Γöé        Γöé
  2965. Γöé                  Γöé                    Γöépresentation  Γöé        Γöé
  2966. Γöé                  Γöé                    Γöéspace.        Γöé        Γöé
  2967. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2968. ΓöéPropagate         ΓöéATTR_PROP_DETECTABLEΓöéthe detectableΓöéON      Γöé
  2969. Γöédetectable        Γöé                    Γöéattribute willΓöé        Γöé
  2970. Γöé                  Γöé                    Γöébe set in eachΓöé        Γöé
  2971. Γöé                  Γöé                    Γöésegment calledΓöé        Γöé
  2972. Γöé                  Γöé                    Γöéby a chained  Γöé        Γöé
  2973. Γöé                  Γöé                    Γöésegment.      Γöé        Γöé
  2974. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2975. ΓöéVisible           ΓöéATTR_VISIBLE        ΓöéGpiDrawChain, ΓöéON      Γöé
  2976. Γöé                  Γöé                    ΓöéGpiDrawFrom,  Γöé        Γöé
  2977. Γöé                  Γöé                    Γöéand           Γöé        Γöé
  2978. Γöé                  Γöé                    ΓöéGpiDrawSegmentΓöé        Γöé
  2979. Γöé                  Γöé                    Γöéwill generate Γöé        Γöé
  2980. Γöé                  Γöé                    Γöéoutput on a   Γöé        Γöé
  2981. Γöé                  Γöé                    Γöédevice.       Γöé        Γöé
  2982. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2983. ΓöéPropagate visible ΓöéATTR_PROP_VISIBLE   ΓöéThe visible   ΓöéON      Γöé
  2984. Γöé                  Γöé                    Γöéattribute willΓöé        Γöé
  2985. Γöé                  Γöé                    Γöébe set in eachΓöé        Γöé
  2986. Γöé                  Γöé                    Γöésegment calledΓöé        Γöé
  2987. Γöé                  Γöé                    Γöéby a chained  Γöé        Γöé
  2988. Γöé                  Γöé                    Γöésegment.      Γöé        Γöé
  2989. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2990.  
  2991. When an application creates a segment in a presentation space, the operating 
  2992. system assigns initial attributes to it. By default, five of the attributes 
  2993. will be set ON and two will be set OFF. Your application can override the 
  2994. defaults for all subsequently created segments within the presentation space 
  2995. using GpiSetInitialSegmentAttrs. 
  2996.  
  2997. Use GpiQueryInitialSegmentAttrs, to retrieve the values of the current initial 
  2998. attributes. 
  2999.  
  3000.  
  3001. ΓòÉΓòÉΓòÉ 3.1.3.1.1. The Dynamic Attribute ΓòÉΓòÉΓòÉ
  3002.  
  3003. Dynamic segments are graphics segments that can be moved from where they were 
  3004. drawn on the screen to a different coordinate position, or altered in some 
  3005. other way, without affecting the remaining part of the picture. The new 
  3006. position of a dynamic segment can be provided with an input device, such as a 
  3007. mouse, or it can be application-generated. 
  3008.  
  3009. The dynamic attribute is set to OFF by default. The setting is always inherited 
  3010. by called segments from the setting of their callers. If a calling segment is 
  3011. nondynamic, any segments called by it are also nondynamic, regardless of how 
  3012. they have been defined. If the calling segment is dynamic, all segments called 
  3013. by it are also dynamic. Any segment explicitly defined as dynamic must have a 
  3014. unique name, and it cannot be created when the current drawing-mode parameter 
  3015. is DM_DRAW or DM_DRAWANDRETAIN. Although no error condition is raised if you 
  3016. define an unchained segment as dynamic, it is not treated as dynamic unless the 
  3017. segment is called from a dynamic root segment. 
  3018.  
  3019. Graphics objects to be moved without disturbing the remaining contents of the 
  3020. display are drawn in exclusive-OR mode. Segments that you define as dynamic 
  3021. always are drawn in exclusive-OR mode, regardless of the current mix attribute 
  3022. settings and any GpiSetMix functions the segment itself might contain. 
  3023.  
  3024. For performance reasons, dynamic segments are to be grouped at the start of the 
  3025. picture chain. There are GPI functions that handle dynamic segments as a group, 
  3026. so it is more efficient if the entire segment chain does not have to be scanned 
  3027. to locate them. 
  3028.  
  3029. When the entire picture chain is drawn, however, dynamic segments are to be 
  3030. drawn after all other segments in the chain to ensure that the effects of 
  3031. drawing in exclusive-OR mode are not adversely affected by drawings in other 
  3032. mix modes. Also, you must ensure that no nondynamic drawing overlays the 
  3033. dynamic segments after they have been drawn. The PM ensures that dynamic 
  3034. segments are always drawn on top of other graphics. 
  3035.  
  3036.  
  3037. ΓòÉΓòÉΓòÉ 3.1.3.1.2. The Detectability Attribute ΓòÉΓòÉΓòÉ
  3038.  
  3039. The detectability attribute of a segment determines if that segment can be 
  3040. selected with an input device, such as a mouse. A segment with this attribute 
  3041. is said to be selectable. Selectable segments can be selected for correlation 
  3042. operations. The detectability attribute is set OFF by default. All detectable 
  3043. segments must have unique names. If you define a zero segment as detectable, it 
  3044. is created as nondetectable. 
  3045.  
  3046.  
  3047. ΓòÉΓòÉΓòÉ 3.1.3.1.3. The Propagate-Detectability Attribute ΓòÉΓòÉΓòÉ
  3048.  
  3049. This attribute controls whether the detectability attribute of a calling 
  3050. segment is inherited by any segments called from it. The 
  3051. propagate-detectability attribute is set ON by default. This value overrides 
  3052. the detectability setting of the called segment. For example, if you set the 
  3053. detectability attribute of a calling segment to OFF, all segments called from 
  3054. it are nondetectable, regardless of how they have been defined. 
  3055.  
  3056.  
  3057. ΓòÉΓòÉΓòÉ 3.1.3.1.4. The Visibility Attribute ΓòÉΓòÉΓòÉ
  3058.  
  3059. The visibility attribute controls whether a segment is to be visible on an 
  3060. output device. The contents of a segment that is not defined with the 
  3061. visibility attribute set ON are still executed whenever the segment is drawn. 
  3062. This can cause changes to the current position and to current attribute values, 
  3063. even though the primitives themselves are not visible on the output device. The 
  3064. visibility attribute is set ON by default. 
  3065.  
  3066.  
  3067. ΓòÉΓòÉΓòÉ 3.1.3.1.5. The Propagate-Visibility Attribute ΓòÉΓòÉΓòÉ
  3068.  
  3069. This attribute controls whether the visibility attribute of a calling segment 
  3070. is inherited by any segments called from it. The propagate-visibility attribute 
  3071. is set ON by default. This value overrides the visibility setting of the called 
  3072. segment. For example, if the visibility attribute of a calling segment is set 
  3073. to OFF, all segments called from it are invisible, regardless of how they have 
  3074. been defined. 
  3075.  
  3076.  
  3077. ΓòÉΓòÉΓòÉ 3.1.4. Changing the Attributes of a Segment ΓòÉΓòÉΓòÉ
  3078.  
  3079. After you create a segment, you might need to alter its attributes. For 
  3080. example, if you created a segment using the default attributes and you want to 
  3081. perform a correlation operation on the subpicture in that segment, you will 
  3082. need to set the detectable attribute using GpiSetSegmentAttrs. You can retrieve 
  3083. the values of the attributes for any segment using GpiQuerySegmentAttrs. 
  3084.  
  3085. You can change the default segment-attribute settings globally for a single 
  3086. presentation space using GpiSetInitialSegmentAttrs. The attribute setting that 
  3087. you specify in this function applies to all segments created subsequently in 
  3088. that presentation space, except that a nonretained segment can never have the 
  3089. dynamic attribute. For example, if you want all segments to be detectable, you 
  3090. can call this function to change the setting for all of them before you create 
  3091. them. GpiSetInitialSegmentAttrs cannot be used to change the attributes of 
  3092. existing segments. 
  3093.  
  3094. You also can change the attributes of any single retained segment, but not 
  3095. those created subsequently, using GpiSetSegmentAttrs. This is useful if, for 
  3096. example, you want most of the segments in a picture chain to be detectable. You 
  3097. can change the attribute setting to detectable for the entire chain, before 
  3098. creating it, using GpiSetInitialSegmentAttrs; then, change the attribute to 
  3099. nondetectable for each of the segment exceptions using GpiSetSegmentAttrs. You 
  3100. can also use GpiSetSegmentAttrs, for example, to make a visible segment 
  3101. invisible when an erase request is received from the operator, or to take a 
  3102. segment out of the chain by redefining it as unchained. If you change an 
  3103. unchained segment to chained, it is added to the end of the segment chain. If 
  3104. you want the newly chained segment to be positioned elsewhere in the chain, use 
  3105. GpiSetSegmentPriority rather than GpiSetSegmentAttrs. 
  3106.  
  3107. Some of these segment attributes apply equally to primitives that are outside 
  3108. of segments, although their default settings cannot be changed. Primitives 
  3109. outside of segments are always detectable and visible. They cannot be dynamic, 
  3110. because the dynamic attribute applies only to retained graphics. The chained 
  3111. and fast-chaining attributes do not apply to primitives outside of segments. 
  3112.  
  3113.  
  3114. ΓòÉΓòÉΓòÉ 3.1.5. Editing a Segment ΓòÉΓòÉΓòÉ
  3115.  
  3116. The operating system provides segment editing functions for writing 
  3117. applications that allow users to edit segments or elements in a segment. For 
  3118. example, after performing a correlation operation using your application, a 
  3119. user might need to alter the elements that intersected the pick aperture. 
  3120. Correlation and the pick aperture are explained in in Correlation. 
  3121.  
  3122. You can edit the contents of any retained segment that has a unique name. You 
  3123. also can edit the contents of a retained zero segment that has not yet been 
  3124. closed. Zero segments cannot be edited after they have been closed, because you 
  3125. cannot refer to a zero segment when it is no longer the current open segment. 
  3126.  
  3127. Before you can begin editing, you must set the current drawing-mode parameter 
  3128. to DM_RETAIN. You cannot edit a segment if the current drawing-mode parameter 
  3129. is DM_DRAWANDRETAIN or DM_DRAW. To begin editing, call GpiOpenSegment and 
  3130. specify the name of the segment you want to edit. When you are finished editing 
  3131. a segment, close it using GpiCloseSegment. 
  3132.  
  3133. The operating system has two edit modes: insert mode and replace mode. You can 
  3134. set the edit modes using GpiSetEditMode. You can determine which mode is 
  3135. currently set using GpiQueryEditMode. 
  3136.  
  3137. The current edit mode applies to all segments in the presentation space until 
  3138. you change it. The edit mode is not an attribute of a particular segment and 
  3139. can be changed at any time. The default edit mode, which is set when you create 
  3140. a presentation space, is insert mode. When you create a graphics segment, you 
  3141. are actually editing it in insert mode. 
  3142.  
  3143. If the edit mode is set to insert (SEGEM_INSERT) you can insert an element at 
  3144. the current location of the element pointer. The operating system shifts the 
  3145. element that was previously at that location into the next slot, and so on, 
  3146. until the last element is shifted into a new, final slot. The following figure 
  3147. shows a segment before and after a new element is inserted at position 0, the 
  3148. beginning of the segment. 
  3149.  
  3150.             Original Segment                         New Segment
  3151.                                 Element Pointer
  3152.             ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ     Γöé             Γöé      ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3153. Position 0  Γöé             ΓöéΓöÇΓöÇΓöÇΓöÇΓöÿ             ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöé             Γöé
  3154.             Γöé             Γöé                          Γöé             Γöé
  3155.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ                          Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3156. Position 1  Γöé  Element 1  ΓöéΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇΓöÉ      Γöé New element Γöé
  3157.             Γöé             Γöé                   Γöé      Γöé             Γöé
  3158.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ                   Γöé      Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3159. Position 2  Γöé  Element 2  ΓöéΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇΓöÉ ΓööΓöÇ ΓöÇ ΓöÇΓöé  Element 1  Γöé
  3160.             Γöé             Γöé                 Γöé        Γöé             Γöé
  3161.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ                 Γöé        Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3162. Position 3  Γöé  Element 3  ΓöéΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇΓöÉ ΓööΓöÇ ΓöÇ ΓöÇ ΓöÇΓöé  Element 2  Γöé
  3163.             Γöé             Γöé               Γöé          Γöé             Γöé
  3164.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ               Γöé          Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3165. Position 4  Γöé  Element 4  ΓöéΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇΓöÉ ΓööΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇΓöé  Element 3  Γöé
  3166.             Γöé             Γöé             Γöé            Γöé             Γöé
  3167.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ             Γöé            Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3168. Position 5  Γöé  Element 5  ΓöéΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇΓöÉ ΓööΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇΓöé  Element 4  Γöé
  3169.             Γöé             Γöé           Γöé              Γöé             Γöé
  3170.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ           Γöé              Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3171. Position 6  Γöé  Element 6  ΓöéΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇΓöÉ ΓööΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇΓöé  Element 5  Γöé
  3172.             Γöé             Γöé         Γöé                Γöé             Γöé
  3173.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ         Γöé                Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3174. Position 7  Γöé  Element 7  ΓöéΓöÇ ΓöÇ ΓöÇ ΓöÇΓöÉ ΓööΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇΓöé  Element 6  Γöé
  3175.             Γöé             Γöé       Γöé                  Γöé             Γöé
  3176.             ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ       Γöé                  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3177.                                   ΓööΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇ ΓöÇΓöé  Element 7  Γöé
  3178.                                                      Γöé             Γöé
  3179.                                                      ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  3180.  
  3181. Inserting a New Element in a Segment 
  3182.  
  3183. The new element is inserted after the current element; then, the element 
  3184. pointer is set to the new element. 
  3185.  
  3186. If replace mode is set (SEGEM_REPLACE) you can replace the element at the 
  3187. current pointer location with a new element. The following figure shows a 
  3188. segment before and after the third element was replaced. 
  3189.  
  3190.  
  3191.            Original Segment                         New Segment
  3192.            ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ                          ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3193. Position 0 Γöé             Γöé                          Γöé             Γöé
  3194.            Γöé             Γöé                          Γöé             Γöé
  3195.            Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ                          Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3196. Position 1 Γöé  Element 1  Γöé                          Γöé  Element 1  Γöé
  3197.            Γöé             Γöé                          Γöé             Γöé
  3198.            Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ                          Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3199. Position 2 Γöé  Element 2  Γöé                          Γöé  Element 2  Γöé
  3200.            Γöé             Γöé     Element pointer      Γöé             Γöé
  3201.            Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ     Γöé             Γöé      Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3202. Position 3 Γöé  Element 3  ΓöéΓöÇΓöÇΓöÇΓöÇΓöÿ             ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöé  Element 3  Γöé
  3203.            Γöé             Γöé                          Γöé             Γöé
  3204.            Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ                          Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3205. Position 4 Γöé  Element 4  Γöé                          Γöé  Element 4  Γöé
  3206.            Γöé             Γöé                          Γöé             Γöé
  3207.            Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ                          Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3208. Position 5 Γöé  Element 5  Γöé                          Γöé  Element 5  Γöé
  3209.            Γöé             Γöé                          Γöé             Γöé
  3210.            Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ                          Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3211. Position 6 Γöé  Element 6  Γöé                          Γöé  Element 6  Γöé
  3212.            Γöé             Γöé                          Γöé             Γöé
  3213.            Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ                          Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3214. Position 7 Γöé  Element 7  Γöé                          Γöé  Element 7  Γöé
  3215.            Γöé             Γöé                          Γöé             Γöé
  3216.            ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ                          ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  3217.  
  3218. Replacing an Element with a New Element 
  3219.  
  3220. The new element overwrites the previous element; the element pointer does not 
  3221. change. 
  3222.  
  3223. Replacing elements is the recommended technique for redrawing identical 
  3224. primitives with different attributes-for example, color. 
  3225.  
  3226. You can insert or replace data in an existing segment using any of the 
  3227. functions described in Adding Elements to a New Segment. As mentioned 
  3228. previously, GpiPutData is valid only in insert mode and only when the element 
  3229. pointer is addressing the final element in the segment. That is, when you are 
  3230. editing, you can use GpiPutData only to add data to the end of a segment. 
  3231.  
  3232. A replace request is not valid when the element pointer is set to 0. If you 
  3233. call GpiOpenSegment to create a new segment without first ensuring that the 
  3234. current edit mode is insert, your first attempt to add an element to the 
  3235. segment might cause an error condition to be raised. 
  3236.  
  3237.  
  3238. ΓòÉΓòÉΓòÉ 3.1.5.1. Deleting a Graphics Element ΓòÉΓòÉΓòÉ
  3239.  
  3240. The PM has three different functions that allow you to delete elements within 
  3241. the currently opened segment. 
  3242.  
  3243.  Function                        Description 
  3244.  
  3245.  GpiDeleteElement                Deletes a single element at the current 
  3246.                                  element pointer location. 
  3247.  
  3248.  GpiDeleteElementRange           Deletes a range of elements in a segment. 
  3249.  
  3250.  GpiDeleteElementsBetweenLabels  Deletes a series of elements between two 
  3251.                                  labels. 
  3252.  
  3253.  When you remove an element from a segment, the element pointer addresses the 
  3254.  element immediately before the one you deleted. As with other editing 
  3255.  functions, the current drawing mode parameter must be DM_RETAIN when you are 
  3256.  deleting elements. The current editing mode (insert or replace) has no effect 
  3257.  on the delete functions. 
  3258.  
  3259.  
  3260. ΓòÉΓòÉΓòÉ 3.1.5.2. Deleting Graphics Segments ΓòÉΓòÉΓòÉ
  3261.  
  3262. When you have finished drawing the subpicture associated with a segment, you 
  3263. should delete the segment. The PM has two different functions that allow you to 
  3264. delete segments. 
  3265.  
  3266.  Function                 Description 
  3267.  
  3268.  GpiDeleteSegment         Deletes a retained segment 
  3269.  
  3270.  GpiDeleteSegments        Deletes a range of retained segments. 
  3271.  
  3272.  Your application can only delete segments that have unique names because you 
  3273.  use the segment identifiers to identify the segment or range of segments for 
  3274.  deletion. Retained zero segments cannot be deleted. They disappear only when 
  3275.  their associated presentation space is deleted or reset. The presentation 
  3276.  space can be reset either by GpiResetPS with the GRES_SEGMENTS flag or the 
  3277.  GRES_ALL flag set, or by GpiSetPS. Resetting the presentation space is 
  3278.  described in Reusing the Presentation Space. 
  3279.  
  3280.  If GpiDeleteSegment occurs within a segment bracket and the segment identified 
  3281.  is the currently open segment, the operating system deletes the segment and 
  3282.  ignores the remainder of the functions up to, and including, GpiCloseSegment. 
  3283.  If GpiDeleteSegment occurs within a segment bracket and the identifier for a 
  3284.  segment other than the currently open segment, the operating system deletes 
  3285.  the segment, then continues processing the remaining functions in the segment 
  3286.  bracket. If GpiDeleteSegment occurs outside of a segment and references a 
  3287.  segment in the segment chain, the operating system removes the segment from 
  3288.  the chain and links the two adjacent segments, if such segments exist. 
  3289.  
  3290.  If the range of segments deleted by GpiDeleteSegments were in the segment 
  3291.  chain, the operating system "repairs" the chain by linking the segments 
  3292.  immediately preceding and following the deleted segments, if such segments 
  3293.  exist. 
  3294.  
  3295.  
  3296. ΓòÉΓòÉΓòÉ 3.1.5.3. Copying a Single Graphics Element ΓòÉΓòÉΓòÉ
  3297.  
  3298. Your application can copy the graphics orders from a single element using the 
  3299. GpiQueryElement and GpiElement functions. GpiQueryElement copies the graphics 
  3300. orders (or part of the orders, depending on allocated size) from an element 
  3301. into an array of bytes. GpiQueryElement is not valid within an element bracket, 
  3302. nor if the drawing mode is other than DM_RETAIN. 
  3303.  
  3304. GpiElement copies the data from the array back into the current segment. The 
  3305. data may not contain any begin or end element orders. GpiElement is not valid 
  3306. within an element bracket. The element is retained if the drawing mode is 
  3307. DM_RETAIN and drawn if the mode is either DM_DRAW, or DM_DRAWANDRETAIN. 
  3308.  
  3309.  
  3310. ΓòÉΓòÉΓòÉ 3.1.5.4. Copying Multiple Graphics Elements ΓòÉΓòÉΓòÉ
  3311.  
  3312. Your application can use GpiGetData and GpiPutData to: 
  3313.  
  3314.      Copy elements from one segment to another 
  3315.  
  3316.      Copy elements from one position in a segment to another position in the 
  3317.       same segment. 
  3318.  
  3319.  GpiGetData copies a buffer of graphics orders from a named segment, into an 
  3320.  area of application storage, whose byte size you specify on input. Only the 
  3321.  named segment must not be open when you call this function. The named segment 
  3322.  is also known as the source segment. 
  3323.  
  3324.  The first time GpiGetData is called, data retrieval has to start at the 
  3325.  beginning of the segment. This is done by declaring an element offset of 0. 
  3326.  
  3327.  Output from GpiGetData depends on whether the area of application storage is 
  3328.  large enough to hold the entire buffer of graphics orders. If so, the buffer 
  3329.  is returned along with a count of the number of bytes of data returned to you 
  3330.  from the segment. If not, the application storage is filled, and the count is 
  3331.  set to the size of the application storage. The offset of the element where 
  3332.  GpiGetData stopped copying, and the count are returned. Your application can 
  3333.  then determine if a subsequent GpiGetData needs to be called, by checking that 
  3334.  the count is less than the size (length) of the application storage. 
  3335.  
  3336.  On subsequent GpiGetData functions, the element offset can be 0, or it can be 
  3337.  the offset value that was returned from the previous function. In this manner, 
  3338.  if your application calls GpiGetData more than once to copy an entire segment, 
  3339.  it can "pick up where it left off", rather than recopying the segment from the 
  3340.  beginning each time. 
  3341.  
  3342.  You can copy the data from the application storage to a new location in a 
  3343.  segment using GpiPutData. This receiving segment is also known as the 
  3344.  destination segment. The segment into which you are copying the data can be 
  3345.  open when you call GpiPutData. 
  3346.  
  3347.  If GpiGetData does not retrieve a complete segment, the data it does retrieve 
  3348.  can be written out to the second segment using GpiPutData, even if the last 
  3349.  order copied is incomplete. 
  3350.  
  3351.  The current drawing mode determines whether the graphics orders are executed, 
  3352.  stored in the segment, or both. When you call GpiPutData, the current edit 
  3353.  mode must be SEGEM_INSERT and, if there is already data in the destination 
  3354.  segment, the element pointer must address the last element of the segment. 
  3355.  
  3356.  Because the PM does not support explicit renaming of segments, 
  3357.  GpiGetData-GpiPutData is the method you use to rename a segment. That is, 
  3358.  create a second segment with the desired name, copy the contents of the first 
  3359.  segment to it, then delete the original segment. 
  3360.  
  3361.  
  3362. ΓòÉΓòÉΓòÉ 3.1.6. Drawing Retained Graphics ΓòÉΓòÉΓòÉ
  3363.  
  3364. Nonretained graphics segments and primitives outside of graphics segment are 
  3365. always drawn immediately to the current output device. Segments that have been 
  3366. retained in segment store, however, can be drawn any number of times to any 
  3367. number of device contexts. The PM has three different functions that allow you 
  3368. to draw segments: 
  3369.  
  3370.  Function                 Description 
  3371.  
  3372.  GpiDrawSegment           Draws a single segment in the chain 
  3373.  
  3374.  GpiDrawFrom              Draws a group of segments in the chain 
  3375.  
  3376.  GpiDrawChain             Draws the entire chain 
  3377.  
  3378.  GpiDrawSegment draws a single, named segment, which can be chained or 
  3379.  unchained. You supply the segment name as input to this function. 
  3380.  GpiDrawSegment can draw a dynamic segment in some circumstances. These are 
  3381.  described in Drawing Dynamic Segments. 
  3382.  
  3383.  GpiDrawFrom draws one or more root segments from the segment chain. You supply 
  3384.  the names of two root segments as input. The drawing process starts at the 
  3385.  first named segment and draws all chained and called segments, excluding 
  3386.  dynamic segments, up to and including the second named segment. 
  3387.  
  3388.  The order in which you specify the segment names is to reflect their relative 
  3389.  positions in the segment chain. If the second-named segment appears in the 
  3390.  segment chain before the first-named segment, no error is raised, but drawing 
  3391.  starts from the first named segment and continues to the end of the chain. 
  3392.  This also happens if the second segment is an unchained segment rather than a 
  3393.  root segment. If the drawing control, DCTL_DYNAMIC is set, any dynamic 
  3394.  segments already drawn on the display are removed before GpiDrawFrom begins to 
  3395.  draw nondynamic segments. Then they are redrawn after GpiDrawFrom ends. 
  3396.  
  3397.  GpiDrawChain draws all nondynamic chained segments in a named presentation 
  3398.  space, as well as any unchained segments called by those chained segments. It 
  3399.  does not draw dynamic segments. You supply only the presentation space handle 
  3400.  as input to this function. If the drawing control, DCTL_DYNAMIC is set, any 
  3401.  dynamic segments already drawn on the display are removed before GpiDrawFrom 
  3402.  begins to draw nondynamic segments. Then they are redrawn after GpiDrawFrom 
  3403.  completes. 
  3404.  
  3405.  You can call any of these functions while a segment is open. The open segment 
  3406.  is not modified by these functions, although any of them can result in the 
  3407.  current attribute values and current position being modified. For more 
  3408.  information about the attribute-resetting process, see Graphics Attributes. 
  3409.  
  3410.  The current drawing mode determines whether the segments identified in the 
  3411.  drawing functions are executed, stored in the segment, or both. The current 
  3412.  drawing mode does not affect which segments are drawn, or the priority in 
  3413.  which they are drawn for any of these three GPI drawing functions. 
  3414.  
  3415.  If an error occurs during the drawing process, you can determine where the 
  3416.  error occurred using GpiErrorSegmentData. This function returns information 
  3417.  about the last error that occurred during a segment-drawing operation. It 
  3418.  returns a pointer to the segment identifier and a pointer to one of three 
  3419.  constants that indicate when the error occurred. 
  3420.  
  3421.  Constant                 Error occurred... 
  3422.  
  3423.  GPIE_SEGMENT             While drawing the segment 
  3424.  
  3425.  GPIE_ELEMENT             While calling GpiElement 
  3426.  
  3427.  GPIE_DATA                While calling GpiPutData 
  3428.  
  3429.  
  3430. ΓòÉΓòÉΓòÉ 3.1.7. Drawing Dynamic Segments ΓòÉΓòÉΓòÉ
  3431.  
  3432. A dynamic segment is a chained segment that possesses special properties. 
  3433. Dynamic segments are those that can be moved or changed in some other way 
  3434. without disturbing the remaining parts of the picture. To draw dynamic segments 
  3435. on the display screen for the first time, use GpiDrawDynamics. GpiDrawDynamics 
  3436. draws every dynamic segment in the segment chain. 
  3437.  
  3438. When they have been drawn on the display, dynamic segments can be updated. For 
  3439. example, to move one or more dynamic segments to another part of the display 
  3440. screen, remove them from their current position using GpiRemoveDynamics. You 
  3441. can restrict the scope of this function by supplying the names of a start 
  3442. segment and a finish segment. The start segment and finish segment can be the 
  3443. same. Dynamic segments outside of this range are not removed from the display 
  3444. screen. 
  3445.  
  3446. If you intend to re-associate the presentation space, call GpiRemoveDynamics 
  3447. first; otherwise, GpiRemoveDynamics cannot remove the dynamic segments after 
  3448. the presentation space has been re-associated. The dynamic segments effectively 
  3449. cease to be dynamic. 
  3450.  
  3451. After removing the appropriate dynamic segments from the display screen, you 
  3452. can redraw them elsewhere, again using GpiDrawDynamics. If you specify a range 
  3453. of dynamic segments in GpiRemoveDynamics, the redrawing is restricted to that 
  3454. range. Note that, when dynamic segments have been drawn on the display screen, 
  3455. you must not edit their definitions in segment store. 
  3456.  
  3457. Dynamic segments are treated like nondynamic segments when you are directing 
  3458. output to a hardcopy device. GpiRemoveDynamics and GpiDrawDynamics raise an 
  3459. error condition if the current output device is not a display window. 
  3460.  
  3461.  
  3462. ΓòÉΓòÉΓòÉ 3.1.8. The Drawing Controls ΓòÉΓòÉΓòÉ
  3463.  
  3464. GpiErase clears the output display of the currently associated device to 
  3465. CLR_BACKGROUND, which is the normal background color for the device. If you are 
  3466. using the default color table, this value clears the window background to 
  3467. white. This is a once-only request and must be issued each time you want the 
  3468. display screen cleared before drawing a new picture. You can use this function 
  3469. for either a micro presentation space or a normal presentation space. 
  3470.  
  3471. To get this effect for more than one drawing request, you can use 
  3472. GpiSetDrawControl. This function establishes current values for five drawing 
  3473. controls, which remain in effect until they are reset. The following table 
  3474. describes the five drawing controls. 
  3475.  
  3476. Drawing Controls 
  3477.  
  3478. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3479. ΓöéControl                 ΓöéValue           ΓöéIf set, the         Γöé
  3480. Γöé                        Γöé                Γöéoperating system... Γöé
  3481. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3482. ΓöéBoundary data           ΓöéDCTL_BOUNDARY   Γöécomputes the        Γöé
  3483. Γöéaccumulation            Γöé                Γöédimensions of the   Γöé
  3484. Γöé                        Γöé                Γöésmallest rectangle  Γöé
  3485. Γöé                        Γöé                Γöéthat would          Γöé
  3486. Γöé                        Γöé                Γöécompletely surround Γöé
  3487. Γöé                        Γöé                Γöéthe retained-drawingΓöé
  3488. Γöé                        Γöé                Γöéoutput.             Γöé
  3489. Γöé                        Γöé                ΓöéThis control is     Γöé
  3490. Γöé                        Γöé                Γöédescribed in        Γöé
  3491. Γöé                        Γöé                ΓöéClipping and        Γöé
  3492. Γöé                        Γöé                ΓöéBoundary            Γöé
  3493. Γöé                        Γöé                ΓöéDetermination.      Γöé
  3494. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3495. ΓöéCorrelation             ΓöéDCTL_CORRELATE  Γöéperforms correlationΓöé
  3496. Γöé                        Γöé                Γöéoperations on any   Γöé
  3497. Γöé                        Γöé                Γöéprimitives or any   Γöé
  3498. Γöé                        Γöé                Γöéoutput associated   Γöé
  3499. Γöé                        Γöé                Γöéwith GpiPutData or  Γöé
  3500. Γöé                        Γöé                ΓöéGpiElement.         Γöé
  3501. Γöé                        Γöé                ΓöéThis control is     Γöé
  3502. Γöé                        Γöé                Γöédescribed in        Γöé
  3503. Γöé                        Γöé                ΓöéCorrelation.        Γöé
  3504. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3505. ΓöéDisplay control         ΓöéDCTL_DISPLAY    Γöédraws retained      Γöé
  3506. Γöé                        Γöé                Γöéoutput on the deviceΓöé
  3507. Γöé                        Γöé                Γöéidentified by the   Γöé
  3508. Γöé                        Γöé                Γöécurrent device      Γöé
  3509. Γöé                        Γöé                Γöécontext. If this    Γöé
  3510. Γöé                        Γöé                Γöécontrol is not set, Γöé
  3511. Γöé                        Γöé                Γöéno retained output  Γöé
  3512. Γöé                        Γöé                Γöéwill appear on the  Γöé
  3513. Γöé                        Γöé                Γöédevice.             Γöé
  3514. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3515. ΓöéDraw-dynamic-segments   ΓöéDCTL_DYNAMIC    Γöécalls               Γöé
  3516. Γöé                        Γöé                ΓöéGpiRemoveDynamics   Γöé
  3517. Γöé                        Γöé                Γöébefore drawing any  Γöé
  3518. Γöé                        Γöé                Γöéretained output and Γöé
  3519. Γöé                        Γöé                Γöéthen, after drawing Γöé
  3520. Γöé                        Γöé                Γöéthe retained output,Γöé
  3521. Γöé                        Γöé                Γöéit calls            Γöé
  3522. Γöé                        Γöé                ΓöéGpiDrawDynamics to  Γöé
  3523. Γöé                        Γöé                Γöédraw output stored  Γöé
  3524. Γöé                        Γöé                Γöéin dynamic segments.Γöé
  3525. Γöé                        Γöé                ΓöéThis automatically  Γöé
  3526. Γöé                        Γöé                Γöéremoves all dynamic Γöé
  3527. Γöé                        Γöé                Γöésegments from the   Γöé
  3528. Γöé                        Γöé                Γöédisplay screen      Γöé
  3529. Γöé                        Γöé                Γöébefore a GpiDraw... Γöé
  3530. Γöé                        Γöé                Γöérequest is issued,  Γöé
  3531. Γöé                        Γöé                Γöéthen later redraws  Γöé
  3532. Γöé                        Γöé                Γöéthe segments. This  Γöé
  3533. Γöé                        Γöé                Γöéensures that dynamicΓöé
  3534. Γöé                        Γöé                Γöésegments are always Γöé
  3535. Γöé                        Γöé                Γöédrawn on top of     Γöé
  3536. Γöé                        Γöé                Γöénondynamic segments Γöé
  3537. Γöé                        Γöé                Γöéand primitives.     Γöé
  3538. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3539. ΓöéErase-before-draw       ΓöéDCTL_ERASE      Γöécalls GpiErase      Γöé
  3540. Γöé                        Γöé                Γöébefore drawing any  Γöé
  3541. Γöé                        Γöé                Γöéretained output.    Γöé
  3542. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  3543.  
  3544. GpiSetDrawControl can be called in either a micro or a normal presentation 
  3545. space, although not all of the controls are valid in a micro presentation 
  3546. space. GpiDrawSegment can be used to draw a dynamic segment in some 
  3547. circumstances. Its effects are as follows: 
  3548.  
  3549.      If the named segment is both chained and dynamic, and the DCTL_DYNAMIC 
  3550.       drawing control is set, all dynamic segments in the chain, including the 
  3551.       named segment, are drawn as dynamic. 
  3552.  
  3553.      If the named segment is both chained and dynamic, and the DCTL_DYNAMIC 
  3554.       control is not set, the named segment is not drawn. 
  3555.  
  3556.      If the named segment is unchained and dynamic, it is drawn as a 
  3557.       nondynamic segment, regardless of the setting of the DCTL_DYNAMIC 
  3558.       control. 
  3559.  
  3560.  If you called GpiRemoveDynamics prior to calling GpiDrawDynamics and you 
  3561.  specified a range of dynamic segments, the operating system draws only that 
  3562.  range. If you set the DCTL_DYNAMIC control using GpiSetDrawControl, the 
  3563.  operating system calls GpiRemoveDynamics before drawing the subpictures from 
  3564.  the dynamic segments. 
  3565.  
  3566.  The DCTL_DISPLAY control is the only control set to DCTL_ON by default. All 
  3567.  other controls are set to DCTL_OFF when you create a presentation space. 
  3568.  
  3569.  
  3570. ΓòÉΓòÉΓòÉ 3.2. Using Segment Editing Functions ΓòÉΓòÉΓòÉ
  3571.  
  3572. You can use editing functions to: 
  3573.  
  3574.      Create a chained-dynamic segment 
  3575.      Delete a segment 
  3576.      Edit the contents of a segment 
  3577.  
  3578.  The following figure shows an example of how to edit the contents of a 
  3579.  segment. In the example, three elements are inserted. The steps required for 
  3580.  this task are as follows: 
  3581.  
  3582.    1. Set the segment edit mode to insert or replace using GpiSetEditMode. 
  3583.  
  3584.    2. Set the drawing mode to retain. 
  3585.  
  3586.    3. Open the segment using GpiOpenSegment, passing it the segment identifier 
  3587.       from a previous correlation operation. 
  3588.  
  3589.    4. Set the element pointer so that it points to the position at which you 
  3590.       will replace or insert an element using GpiSetElementPointer, 
  3591.       GpiSetElementPointerAtLabel or GpiOffsetElementPointer. 
  3592.  
  3593.    5. Insert the new primitives using any of the Gpi primitive functions. 
  3594.  
  3595.    6. Delete any unnecessary primitives using GpiDeleteElement or 
  3596.       GpiDeleteElementRange. 
  3597.  
  3598.    7. Close the segment using GpiCloseSegment. 
  3599.  
  3600.   #define INCL_GPISEGEDITING
  3601.   #define INCL_GPICONTROL
  3602.   #include <os2.h>
  3603.   void fncESEG01(void){
  3604.       HPS hps;
  3605.       LONG idNonChained;
  3606.       POINTL ptl;
  3607.  
  3608.       GpiSetEditMode(hps, SEGEM_INSERT);
  3609.  
  3610.       GpiSetDrawingMode(hps, DM_RETAIN);
  3611.  
  3612.       GpiOpenSegment(hps, idNonChained);
  3613.  
  3614.       GpiSetElementPointer(hps, 0L);
  3615.  
  3616.       GpiSetColor(hps, CLR_YELLOW);
  3617.  
  3618.       ptl.x = 100; ptl.y = 100;
  3619.  
  3620.       GpiMove(hps, &ptl);
  3621.  
  3622.       ptl.x = 150; ptl.y = 150;
  3623.  
  3624.       GpiBox(hps, DRO_OUTLINE, &ptl, 40L, 40L);
  3625.  
  3626.       ptl.x = 30; ptl.y = 30;
  3627.  
  3628.       GpiMove(hps, &ptl);
  3629.  
  3630.       GpiSetElementPointer(hps, 5L);
  3631.  
  3632.       GpiDeleteElement(hps);
  3633.  
  3634.       GpiCloseSegment(hps);
  3635.  
  3636.   } /* fncESEG01 */
  3637.  
  3638.  The first element inserted contains the graphics order that sets the color to 
  3639.  yellow; the second element moves the current position; and the third element 
  3640.  draws an outlined box with rounded corners. After the three elements are 
  3641.  inserted, the code deletes the element at position 5 in the segment (this 
  3642.  element was previously at positions 1 and 2). 
  3643.  
  3644.  
  3645. ΓòÉΓòÉΓòÉ 4. Fonts ΓòÉΓòÉΓòÉ
  3646.  
  3647. In typography, a font is a collection of characters that share a common height, 
  3648. line weight, and appearance. In Presentation Manager, fonts are an 
  3649. lcid-identified resource, like bit maps, and are used in conjunction with the 
  3650. character string primitive data structures to define the appearance of 
  3651. displayed and printed text. The primary role of the PM with regard to fonts is 
  3652. to evaluate whether a particular font is appropriate for a given situation. 
  3653.  
  3654. The following topics are related to information in this chapter: 
  3655.  
  3656.      Presentation spaces and device contexts 
  3657.      Character string primitives 
  3658.      Coordinate spaces and transformations 
  3659.      Color and mix attributes 
  3660.  
  3661.  
  3662. ΓòÉΓòÉΓòÉ 4.1. About Fonts ΓòÉΓòÉΓòÉ
  3663.  
  3664. Font height is specified in printer's points, referred to in this book as just 
  3665. points. A point equals approximately 1/72 of an inch. The line weight and 
  3666. appearance of a font are specified by the categories listed in the following 
  3667. table. 
  3668.  
  3669. Examples of Line Weight and Font Appearance Categories 
  3670.  
  3671. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3672. ΓöéAttribute   ΓöéCategory    ΓöéDescription                         Γöé
  3673. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3674. ΓöéLine Weight ΓöéNormal      ΓöéCharacters drawn with a normal line Γöé
  3675. Γöé            Γöé            Γöéweight                              Γöé
  3676. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3677. Γöé            ΓöéBold        ΓöéCharacters drawn with a heavier lineΓöé
  3678. Γöé            Γöé            Γöéweight                              Γöé
  3679. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3680. ΓöéAppearance  ΓöéCondensed   ΓöéCharacters drawn with half the      Γöé
  3681. Γöé            Γöé            Γöéaverage character width             Γöé
  3682. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3683. Γöé            ΓöéExpanded    ΓöéCharacters drawn with twice the     Γöé
  3684. Γöé            Γöé            Γöéaverage character width             Γöé
  3685. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3686. Γöé            ΓöéItalic      ΓöéCharacters drawn with a normal line Γöé
  3687. Γöé            Γöé            Γöéweight and sloped to the right      Γöé
  3688. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  3689.  
  3690. A font family is a collection of fonts that share common design characteristics 
  3691. such as stroke width and serif. Stroke width refers to the width of lines used 
  3692. to draw the characters and symbols of a font. A serif is a short cross-line 
  3693. drawn at the ends of the main strokes forming a character or symbol. 
  3694.  
  3695. Text output is drawn with the characters and symbols of a font. The operating 
  3696. system stores fonts either in memory or on devices. Applications can access 
  3697. fonts through a device context associated with the current presentation space. 
  3698. When an application creates a presentation space, using GpiCreatePS or 
  3699. WinGetPS, the operating system assigns the presentation space a default font 
  3700. from one of the available fonts. An application can retrieve information about 
  3701. the default font using GpiQueryFontMetrics. 
  3702.  
  3703.  
  3704. ΓòÉΓòÉΓòÉ 4.1.1. Image Font and Outline Font Implementation ΓòÉΓòÉΓòÉ
  3705.  
  3706. The operating system can define and implement the characters of a font as 
  3707. either images or outlines. 
  3708.  
  3709. Each of the characters in an image font (sometimes called a raster font) is 
  3710. created by alternating the ON and OFF settings of pels to produce the image. 
  3711. The image characters are stored as a bit map. Sometimes image fonts are even 
  3712. referred to as bit-map fonts. 
  3713.  
  3714. The characters in an image font must be drawn in a fixed size-you cannot rotate 
  3715. or scale them, for example-but usually they are of good quality. They are 
  3716. displayed faster than outline characters, and frequently they look better at 
  3717. low resolutions. 
  3718.  
  3719. The characters in an outline font, on the other hand, are drawn using a 
  3720. sequence of lines and arcs. Then the characters are filled if so requested. The 
  3721. outline characters are stored as a collection of line, fillet, and spline 
  3722. functions. Outline fonts are transformable because the outline characters can 
  3723. be scaled, rotated, and sheared. Outline fonts can be implemented as vectors, 
  3724. drawn by a series of small, straight lines. If that is the case, they can be 
  3725. referred to correctly as vector fonts. Vector fonts can be drawn much faster 
  3726. than fonts requiring the inclusion of actual curves and arcs. 
  3727.  
  3728. A major advantage of outline fonts is their device independence. Unlike image 
  3729. fonts, whose appearance depends on the device's pel definition. 
  3730.  
  3731. The following figure is an example of a character in both an image font and an 
  3732. outline font. 
  3733.  
  3734. Image and Outline Characters 
  3735.  
  3736. The image character is produced by manipulating pels. The outline character is 
  3737. produced by drawing a sequence of lines and arcs. (The resultant shape of an 
  3738. outline character can be filled if desired.) 
  3739.  
  3740. Most of the functions and data structures described in this chapter relate only 
  3741. to outline fonts. 
  3742.  
  3743.  
  3744. ΓòÉΓòÉΓòÉ 4.1.2. PM-Supplied Fonts ΓòÉΓòÉΓòÉ
  3745.  
  3746. The PM provides a number of both image and outline typographic-quality 
  3747. character fonts. On some devices, image fonts in small font sizes have a better 
  3748. appearance than their outline-font equivalents. 
  3749.  
  3750. Type size is measured in points. There are approximately 72 points to an inch, 
  3751. so each character in a 24-point font, for example, is 1/3-inch high. Each 
  3752. incremental unit of a presentation page in PU_TWIPS format is 1/20 of a 
  3753. printer's point (1/1440 inch). 
  3754.  
  3755. The following image fonts are available on all OS/2-supported display adapters: 
  3756.  
  3757. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3758. ΓöéFont Family Name         ΓöéPoint Sizes Available              Γöé
  3759. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3760. ΓöéTms Rmn                  Γöé8, 10, 12, 14, 18, 24              Γöé
  3761. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3762. ΓöéHelv                     Γöé8, 10, 12, 14, 18, 24              Γöé
  3763. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3764. ΓöéCourier (monospace)      Γöé8, 10, 12                          Γöé
  3765. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3766. ΓöéSystem Monospace         Γöé10                                 Γöé
  3767. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  3768.  
  3769. In addition, a default system font is used in window components such as title 
  3770. bars and menus. It is a proportionally spaced Swiss font. 
  3771.  
  3772. The outline fonts provided by the PM are Adobe** Type 1. The appearance and 
  3773. performance characteristics of these fonts are more flexible than for image 
  3774. fonts. 
  3775.  
  3776. The following table lists the outline fonts available with the operating system 
  3777. and their equivalent fonts from earlier versions of the OS/2 operating system. 
  3778.  
  3779. Available Outline Fonts 
  3780.  
  3781. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3782. ΓöéOutline Font      ΓöéOS/2 Fonts Available        ΓöéEquivalent    Γöé
  3783. ΓöéFamily Name       Γöé                            ΓöéName          Γöé
  3784. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3785. ΓöéTimes New Roman** ΓöéTimes New Roman             ΓöéTms Rmn       Γöé
  3786. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3787. Γöé                  ΓöéTimes New Roman Bold        ΓöéTms Rmn Bold  Γöé
  3788. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3789. Γöé                  ΓöéTimes New Roman Bold Italic ΓöéTms Rmn Bold  Γöé
  3790. Γöé                  Γöé                            ΓöéItalic        Γöé
  3791. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3792. Γöé                  ΓöéTimes New Roman Italic      ΓöéTms Rmn ItalicΓöé
  3793. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3794. ΓöéHelvetica**       ΓöéHelvetica                   ΓöéHelv          Γöé
  3795. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3796. Γöé                  ΓöéHelvetica Bold              ΓöéHelv Bold     Γöé
  3797. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3798. Γöé                  ΓöéHelvetica Bold Italic       ΓöéHelv Bold     Γöé
  3799. Γöé                  Γöé                            ΓöéItalic        Γöé
  3800. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3801. Γöé                  ΓöéHelvetica Italic.           ΓöéHelv Italic   Γöé
  3802. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3803. ΓöéCourier           ΓöéCourier                     ΓöéCourier       Γöé
  3804. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3805. Γöé                  ΓöéCourier Bold                ΓöéCourier Bold  Γöé
  3806. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3807. Γöé                  ΓöéCourier Bold Italic         ΓöéCourier Bold  Γöé
  3808. Γöé                  Γöé                            ΓöéItalic        Γöé
  3809. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3810. Γöé                  ΓöéCourier Italic              ΓöéCourier ItalicΓöé
  3811. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3812. ΓöéSymbol            ΓöéSymbol                      ΓöéNone          Γöé
  3813. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  3814.  
  3815. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3816. ΓöéThe outline font names provided with earlier versions of the  Γöé
  3817. ΓöéOS/2 operating system are still supported, but the            Γöé
  3818. Γöécorresponding new fonts are obtained when the previous font   Γöé
  3819. Γöénames are selected.                                           Γöé
  3820. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  3821.  
  3822.  
  3823. ΓòÉΓòÉΓòÉ 4.1.3. Availability of Additional Fonts ΓòÉΓòÉΓòÉ
  3824.  
  3825. Over 600 Adobe Type 1 fonts are available from font vendors, and user systems 
  3826. could have a large number of these installed. Applications must be capable of 
  3827. functioning properly with whatever font the user selects. 
  3828.  
  3829. An application can examine the font metrics to see what a font looks like or 
  3830. display different font characters from which the user can choose. When dealing 
  3831. with an interactive or user-driven application, the recommended method of 
  3832. choosing a font is to call WinFontDlg, which displays an example of the font in 
  3833. a dialog box. 
  3834.  
  3835. Additional Adobe Type 1 fonts can be used just like other outline fonts. 
  3836. Notice, however, that some of those fonts are more stylized; that is, the fonts 
  3837. have a greater variation in the widths of different characters within the same 
  3838. font, which is provided by kerning. 
  3839.  
  3840. Adobe Type 1 fonts, provided with and for a particular application, can be 
  3841. loaded with GpiLoadFonts, provided that the following rules are observed: 
  3842.  
  3843.      The .AFM file of the font must be specified as the font file. 
  3844.      The .PFB file must be in the same directory as the .AFM file. 
  3845.  
  3846.  
  3847. ΓòÉΓòÉΓòÉ 4.1.4. Font Data Structures and Attributes ΓòÉΓòÉΓòÉ
  3848.  
  3849. The attributes of fonts are contained in the FONTMETRICS data structure. The 
  3850. appearance of the actual text is influenced also by the attributes of the 
  3851. individual characters, which can be found in the CHARBUNDLE data structure. 
  3852.  
  3853. An application can determine whether to use a particular font by examining its 
  3854. font metrics, which are the measurements that define the features of that font. 
  3855. The measurements are decided on by a font designer, whose most important 
  3856. criteria might be ensuring that the font is pleasing to the eye. 
  3857.  
  3858. Unlike the attributes of a character string primitive, the individual font 
  3859. metrics attributes cannot be changed using specific GPI functions. Your 
  3860. application can determine the values of the current logical font attributes by 
  3861. calling GpiQueryFontMetrics, which accepts as input the amount of data to be 
  3862. returned as well as a pointer to the data area. Unlike other GPI calls, 
  3863. GpiQueryFontMetrics does not return the size necessary for all font metrics 
  3864. data. Querying with a sizeof operator, instead of calling the query twice, 
  3865. returns the size data. 
  3866.  
  3867. The following table and text defines and explains the uses of the various font 
  3868. metric attributes. 
  3869.  
  3870. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3871. ΓöéAttribute                     ΓöéDescription                   Γöé
  3872. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3873. ΓöéFace name                     ΓöéThe full typeface name of a   Γöé
  3874. Γöé                              Γöéfont, such as Courier Bold    Γöé
  3875. Γöé                              ΓöéItalic.                       Γöé
  3876. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3877. ΓöéFamily name                   ΓöéA broader equivalent of the   Γöé
  3878. Γöé                              Γöéface name (e.g.Courier).      Γöé
  3879. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3880. ΓöéCode page                     ΓöéThe mapping between a set of  Γöé
  3881. Γöé                              Γöécodepoints and a set of       Γöé
  3882. Γöé                              Γöégraphic characters.           Γöé
  3883. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3884. ΓöéCharacter cell                ΓöéControls the height and width Γöé
  3885. Γöé                              Γöéof outline font characters.   Γöé
  3886. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3887. ΓöéCharacter cell ascent         ΓöéDistance between the baseline Γöé
  3888. Γöé                              Γöéto the top of the character   Γöé
  3889. Γöé                              Γöécell.                         Γöé
  3890. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3891. ΓöéCharacter cell descent        ΓöéDistance between the baseline Γöé
  3892. Γöé                              Γöéand the bottom of the         Γöé
  3893. Γöé                              Γöécharacter cell.               Γöé
  3894. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3895. ΓöéMaximum baseline extent       ΓöéMaximum vertical extent of    Γöé
  3896. Γöé                              Γöéfont characters in world      Γöé
  3897. Γöé                              Γöécoordinates.                  Γöé
  3898. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3899. ΓöéMaximum ascender              ΓöéMaximum distance a font       Γöé
  3900. Γöé                              Γöécharacter ascends above the   Γöé
  3901. Γöé                              Γöébaseline.                     Γöé
  3902. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3903. ΓöéMaximum descender             ΓöéMaximum distance a font       Γöé
  3904. Γöé                              Γöécharter descends below the    Γöé
  3905. Γöé                              Γöébaseline.                     Γöé
  3906. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3907. ΓöéInternal leading              ΓöéVertical distance equal to theΓöé
  3908. Γöé                              Γöédifference between the maximumΓöé
  3909. Γöé                              Γöébaseline extent and the em    Γöé
  3910. Γöé                              Γöéheight.                       Γöé
  3911. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3912. ΓöéEm height                     ΓöéEquivalent to the character   Γöé
  3913. Γöé                              Γöécell height.                  Γöé
  3914. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3915. ΓöéEm width                      ΓöéEquivalent to the character   Γöé
  3916. Γöé                              Γöécell width.                   Γöé
  3917. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3918. ΓöéX height                      ΓöéHeight above the baseline of  Γöé
  3919. Γöé                              Γöéany lowercase character.      Γöé
  3920. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3921. ΓöéLowercase ascent              ΓöéMaximum distance of a         Γöé
  3922. Γöé                              Γöélowercase character above the Γöé
  3923. Γöé                              Γöébaseline.                     Γöé
  3924. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3925. ΓöéLowercase descent             ΓöéMaximum distance of a         Γöé
  3926. Γöé                              Γöélowercase character below the Γöé
  3927. Γöé                              Γöébaseline.                     Γöé
  3928. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3929. ΓöéExternal leading              ΓöéMaximum vertical font spacing Γöé
  3930. Γöé                              Γöéthat can be added without     Γöé
  3931. Γöé                              Γöéadversely affecting the       Γöé
  3932. Γöé                              Γöéappearance of the text.       Γöé
  3933. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3934. ΓöéAverage character width       ΓöéAverage width of font         Γöé
  3935. Γöé                              Γöécharacters in world           Γöé
  3936. Γöé                              Γöécoordinates                   Γöé
  3937. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3938. ΓöéCharacter slope               ΓöéInitial slope of a character  Γöé
  3939. Γöé                              Γöéwith respect to a vertical    Γöé
  3940. Γöé                              Γöéline.                         Γöé
  3941. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3942. ΓöéInline direction              ΓöéCharacter angle measured with Γöé
  3943. Γöé                              Γöérespect to a horizontal line. Γöé
  3944. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3945. ΓöéWeight class                  ΓöéSpecifies the thickness of    Γöé
  3946. Γöé                              Γöéeach stroke of a font         Γöé
  3947. Γöé                              Γöécharacter.                    Γöé
  3948. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3949. ΓöéFirst, last, default, and     ΓöéSee the topic Glyphs, Code    Γöé
  3950. Γöébreak characters              ΓöéPages and Code Points.        Γöé
  3951. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  3952.  
  3953. The face name attribute is the typeface name by which a particular font design 
  3954. is known. Two examples are Times New Roman Bold and Times New Roman Italic. 
  3955. Roman is the family name of these fonts. You always should provide a face name 
  3956. because most outline fonts are known by it. 
  3957.  
  3958. The code page to be associated with the font is identified by this metric. Some 
  3959. fonts are specific to a particular code page and should be used with only that 
  3960. code page. Other fonts are universal and can be used with any supported code 
  3961. page. 
  3962.  
  3963. Every character in a font is drawn within a rectangular region called a 
  3964. character cell. The character-cell height is the distance from the bottom of 
  3965. the character cell to its top. The width of the character cell is the distance 
  3966. from one side to the other. 
  3967.  
  3968. An imaginary horizontal line, called a baseline, is drawn through the lower 
  3969. portion of the character cell. The operating system uses the baseline to 
  3970. position characters. All uppercase and most lowercase letters in a given font 
  3971. rest approximately on the baseline. Some lowercase letters, such as g and y, 
  3972. descend below the baseline. 
  3973.  
  3974. The distance from the baseline to the top of the character cell is the 
  3975. character-cell ascent. Similarly, the character-cell descent is the distance 
  3976. from the baseline to the bottom of the character cell. The following figure 
  3977. illustrates characters drawn along a baseline inside their character cells. 
  3978. Various font metrics also are illustrated. 
  3979.  
  3980. Some Font Metrics 
  3981.  
  3982. The maximum baseline extent is the sum of the maximum ascender and the maximum 
  3983. descender values. The internal leading is the space allowed for diacritics 
  3984. above capital letters. When an application draws a string of text, the 
  3985. operating system positions the leftmost point of the baseline over a 
  3986. predetermined point for each character in the string. 
  3987.  
  3988. A font's Em height is a measure of its visual height. This measurement was 
  3989. given its name because, historically, the height of an uppercase letter M 
  3990. usually was equal to the average height of all uppercase characters in the 
  3991. font. However, this is no longer the case. 
  3992.  
  3993. The value of Em height represents the font point size in world coordinates and 
  3994. is the same as the character cell height. For an outline font, this can be set 
  3995. by the character cell height attribute. The value of Em Width is the equivalent 
  3996. horizontal dimension and is the same as the character cell width. For an 
  3997. outline font this also can be set by the character cell width attribute. These 
  3998. are, in fact, the dimensions of the em square (a typographic term) and, like 
  3999. point size, cannot be defined in terms of any measurable characteristic of a 
  4000. visible character of the font. 
  4001.  
  4002. The average distance from the baseline to the top of any lowercase character is 
  4003. called a font's x height. This measurement was given its name because the 
  4004. height of a lowercase x usually is equal to the average height of all lowercase 
  4005. characters in the font. 
  4006.  
  4007. The maximum ascender is the height of the tallest character in a font. The 
  4008. maximum descender is the depth (below the baseline) of the lowest character in 
  4009. a font. 
  4010.  
  4011. The lowercase ascent is the height of the tallest lowercase character in a 
  4012. font. The lowercase descent is the depth (below the baseline) of the lowest 
  4013. lowercase character in a font. 
  4014.  
  4015. Many fonts reserve part of the space in the top of each character cell for 
  4016. accent marks. This reserved space is called internal leading. Some fonts 
  4017. require a certain amount of space to be left between rows of text. This space, 
  4018. called external leading, is not included in the character-cell height or ascent 
  4019. measurements. The external leading is the recommended space to leave between 
  4020. rows of text to preserve its pleasing appearance. 
  4021.  
  4022. The average character width is stored in the lAveCharWidth field in the 
  4023. FONTMETRICS structure. The average character width is a measure of character 
  4024. width based on the normal frequency of lowercase letter usage in the English 
  4025. language. You can use this value to approximate the average width of a 
  4026. character in string length calculations. 
  4027.  
  4028. The maximum baseline extent for a font is the sum of the maximum ascender and 
  4029. the maximum descender. Maximum baseline extent is not equal to cell height for 
  4030. outline fonts, but is for image fonts. 
  4031.  
  4032. The character slope is an angle measured clockwise with respect to a typical 
  4033. vertical line. The slope of a normal font is 0; the slope of an italic font is 
  4034. other than 0. The character slope in the FONTMETRICS data structure can be 
  4035. thought of as the initial slope, since the slope can be changed in the 
  4036. CHARBUNDLE data structure. 
  4037.  
  4038. The inline direction is an angle measured clockwise with respect to a 
  4039. horizontal line. The inline direction for a Swiss, Helvetica, or Roman font is 
  4040. normally 0-exactly horizontal. The inline direction for a Hebrew font is 
  4041. normally 180, because Hebrew text is oriented right to left. 
  4042.  
  4043. The character-rotation angle is an angle measured counterclockwise with respect 
  4044. to a horizontal line. The baselines of characters are aligned with the vector 
  4045. drawn at the angle of rotation. 
  4046.  
  4047. The weight class specifies the thickness of each stroke that forms part of each 
  4048. character in a font. 
  4049.  
  4050. The first, last, default, and break character all are associated with glyphs 
  4051. for UGL fonts and code pages. 
  4052.  
  4053. A superscript is a character drawn immediately above and to the right of a 
  4054. normal character in a string of text. Superscripts are identified by a width 
  4055. and height and by vertical and horizontal offsets. 
  4056.  
  4057. A subscript is a character drawn immediately below and to the right of a normal 
  4058. character in a string of text. Subscripts are identified by a width and height 
  4059. and by vertical and horizontal offsets. 
  4060.  
  4061.  
  4062. ΓòÉΓòÉΓòÉ 4.1.5. Glyphs, Code Pages, and Code Points ΓòÉΓòÉΓòÉ
  4063.  
  4064. The image or picture that you associate with each character or symbol in a font 
  4065. is called a glyph. The mapping between a set of glyphs and their code points is 
  4066. called a code page. 
  4067.  
  4068. For a single byte character set (SBCS), each code page contains up to 256 code 
  4069. points. Normally these are 8-bit integers in the range 0 through 255, with one 
  4070. code point identifying one glyph in that code page. The code pages can be 
  4071. either ASCII or EBCDIC. Because a code point repeats on a new code page, you 
  4072. need both the code page and code point to uniquely identify a glyph. 
  4073.  
  4074. There usually is one code page per font. However, double byte character sets 
  4075. (DBCS) are sometimes used for Asian languages with large character sets. Fonts 
  4076. are a set of glyph definitions and a default code page mapping. The same set of 
  4077. font glyph definitions is remapped for different code pages. 
  4078.  
  4079. Each font contains four special glyph points: 
  4080.  
  4081.      First glyph 
  4082.      Last glyph 
  4083.      Default glyph 
  4084.      Break glyph 
  4085.  
  4086.  First and last glyph points are of more interest to the font designers than 
  4087.  application programmers because they apply to the set of font glyph 
  4088.  definitions rather than a particular code page. The last character is the 
  4089.  maximum code point of the font that has a glyph associated with it and may be 
  4090.  bigger than 256. 
  4091.  
  4092.  The default glyph appears in text when an application specifies a glyph point 
  4093.  that does not exist in the font. 
  4094.  
  4095.  The break glyph usually is the space character and often has the same code 
  4096.  point as the default character. 
  4097.  
  4098.  Actually a font can have more or less than 256 definitions, but any particular 
  4099.  code page may have less than 256 but no more. There may be a translation 
  4100.  between the code point in the code page and the code point (between the first 
  4101.  and last glyphs) that references the glyph in the font. 
  4102.  
  4103.  The operating system assigns unique identifiers to each of its code pages. 
  4104.  Common code pages are 437-the United States code page, and 850-the 
  4105.  multilingual code page. The default code page is 850. 
  4106.  
  4107.  An application can determine the current code page by calling GpiQueryCp. or 
  4108.  it can assign a new code page using GpiSetCp. If you default the code page in 
  4109.  the FATTRS structure when calling GpiCreateLogFont, you get the current code 
  4110.  page as specified by GpiSetCp (or returned by GpiQueryCp). You can specify any 
  4111.  one of the code page identifiers returned to you from WinQueryCpList. 
  4112.  
  4113.  When using a font other than the system font, you specify the required code 
  4114.  page in the FATTRS structure of GpiCreateLogFont. You can determine the code 
  4115.  page for that font (if it is the current logical font) by using 
  4116.  GpiQueryFontMetrics. 
  4117.  
  4118.  
  4119. ΓòÉΓòÉΓòÉ 4.1.6. Proportional and Monospace Fonts ΓòÉΓòÉΓòÉ
  4120.  
  4121. When text is drawn, the operating system aligns each character by positioning 
  4122. its character cell next to that of the previous character. 
  4123.  
  4124. A monospace font provides the same amount of space for each character, whatever 
  4125. its shape. These fonts also are called fixed fonts. Courier and System 
  4126. Monospaced are monospace fonts. Monospace fonts, in fact, are essential for 
  4127. some purposes- for example program listings, where vertical alignment is 
  4128. important. 
  4129.  
  4130. A proportionally-spaced font is one in which some characters are allotted less 
  4131. space than others, so that each character occupies the proportion of space that 
  4132. is correct for its shape. For example, a lowercase letter l does not need the 
  4133. same space as a lowercase letter m. Many graphics fonts supplied by the PM, 
  4134. including the system font, support proportional spacing. 
  4135.  
  4136. The font metrics value maxcharinc specifies the width of the widest character 
  4137. in the font, and the value avecharwidth specifies an average width of the 
  4138. characters in the font. 
  4139.  
  4140. You can retrieve information about the widths of the characters in the current 
  4141. font by calling GpiQueryWidthTable. You provide the code point of the first 
  4142. character you are interested in and the number of characters for which you want 
  4143. width-table information. 
  4144.  
  4145.  
  4146. ΓòÉΓòÉΓòÉ 4.1.7. Kerning ΓòÉΓòÉΓòÉ
  4147.  
  4148. Kerning, like proportional spacing, is a type of letter spacing. In a kerned 
  4149. font, some characters are allowed to overhang others and, therefore, occupy an 
  4150. area that is less than each character's increment for that font. Usually this 
  4151. feature is restricted to pairs of characters whose appearance might benefit 
  4152. from greater proximity. The five character pairs that most commonly benefit 
  4153. from kerning are Yo, We, To Tr, and Ta. 
  4154.  
  4155. Kerning is not available in the system-provided image fonts. The Helvetica and 
  4156. Times New Roman outline fonts provided with the system do include kerning 
  4157. information. You can specify kerning as a requirement on the GpiCreateLogFont. 
  4158. Selecting a kerned font lets kerning take place whenever it is defined. 
  4159.  
  4160. The a-space is the area of the character cell before the character; the b-space 
  4161. is the area of the character cell occupied by the character; the c-space is the 
  4162. area of the character cell after the character. The a-space and c-space are 
  4163. shown in the following figure. 
  4164.  
  4165. a-Space, b-Space, and c-Space 
  4166.  
  4167. The best way to implement kerning is to use a kerning-pair table. The kerning 
  4168. table will exist only for certain pairs of characters for which adjustments are 
  4169. desirable. 
  4170.  
  4171. Each of the entries in a kerning-pair table contains the code points of a pair 
  4172. of kerned characters and an adjustment that should be applied to the character 
  4173. width of the first character of the pair. A negative value means that the space 
  4174. is decreased, and a positive value means it is increased, whenever the two 
  4175. characters in a kerning pair are produced together. A kerning-pair table might 
  4176. be provided with a purchased font. If so, it will be recorded in the font 
  4177. header. 
  4178.  
  4179. If kerning is specified on a character-pair basis (that is, if the font has a 
  4180. kerning-pair table), the font has a specific number of kerned pairs. 
  4181. GpiQueryKerningPairs returns kerning-pair information from the current logical 
  4182. font. For each pair of kerned characters, you are given the characters 
  4183. themselves and an adjustment in world coordinates that must be applied to the 
  4184. character width of the first character of the pair. 
  4185.  
  4186. When you specify negative a- and c-space values, the values affect any 
  4187. character paired with the kerned character. Because this form of kerning cannot 
  4188. be applied selectively, you have to choose the kerned characters carefully. For 
  4189. example, an italic letter f ( ╨» ) is a good candidate for this sort of kerning, 
  4190. because it can overhang most of the characters that precede and follow it. 
  4191.  
  4192. An application can adjust the amount of space between all characters in a font 
  4193. with GpiSetCharExtra. Any extra space is added to font kerning values. An 
  4194. application also can adjust the width of a font's break character (space) with 
  4195. GpiSetCharBreakExtra. 
  4196.  
  4197. Kerning is not available on all devices. On devices that support kerning, 
  4198. kerning is enabled by default. When kerning is not supported on a device, 
  4199. kerning support is switched off by default. When kerning support is switched 
  4200. off, the kerning information supplied with a font is ignored. To determine 
  4201. whether a device supports kerning, use DevQueryCaps. 
  4202.  
  4203. The kerning information can be implemented by your application when a character 
  4204. string primitive is written to an output device. This is called rendering the 
  4205. text. GpiCharStringPos and GpiCharStringPosAt, permit specification of the 
  4206. starting position for each character. The entire character string can be 
  4207. searched for character pairs that also are kerning pairs for the kerning 
  4208. information to be applied. 
  4209.  
  4210.  
  4211. ΓòÉΓòÉΓòÉ 4.1.8. FATTRS Data Structure ΓòÉΓòÉΓòÉ
  4212.  
  4213. The FATTRS structure is used to identify the characteristics of a requested 
  4214. font. Certain attributes of a font that govern many individual character string 
  4215. primitives are contained in FATTRS, as follows: 
  4216.  
  4217.      Record length 
  4218.      Selection indicators 
  4219.      Match value 
  4220.      Face name 
  4221.      Registry identifier 
  4222.      Code page 
  4223.      Maximum baseline extent 
  4224.      Average character width 
  4225.      Type indicator 
  4226.      Font use indicator 
  4227.  
  4228.  
  4229. ΓòÉΓòÉΓòÉ 4.1.8.1. Record Length ΓòÉΓòÉΓòÉ
  4230.  
  4231. Record length determines the length of the FATTRS structure. An application 
  4232. normally specifies this with the sizeof operator. 
  4233.  
  4234.  
  4235. ΓòÉΓòÉΓòÉ 4.1.8.2. Selection Indicators ΓòÉΓòÉΓòÉ
  4236.  
  4237. There are five selection indicators: 
  4238.  
  4239.  Indicator                   If set ON, selects... 
  4240.  
  4241.  FATTR_SEL_ITALIC            A font with an italic appearance. This is intended 
  4242.                              for use with an image font and results in a 
  4243.                              simulation of an italic font. 
  4244.  
  4245.  FATTR_SEL_BOLD              A boldface version of the font. This is intended 
  4246.                              for use with an image font and results in a 
  4247.                              simulation of a boldface font. 
  4248.  
  4249.  FATTR_SEL_OUTLINE           Hollow characters when using an outline font. This 
  4250.                              only can be used with outline fonts. 
  4251.  
  4252.                              This indicator is less important than the others 
  4253.                              because improved performance is now available 
  4254.                              (from Adobe Type Manager) on filled outline fonts 
  4255.                              than was originally available when this option 
  4256.                              (FATTR_SEL_OUTLINE) was introduced. 
  4257.  
  4258.  FATTR_SEL_STRIKEOUT         A font in which the characters are struck through. 
  4259.                              This option also might be selected on the 
  4260.                              character string primitive. 
  4261.  
  4262.  FATTR_SEL_UNDERSCORE        A font in which the characters are underscored. 
  4263.                              This option also might be selected on the 
  4264.                              character string primitive. 
  4265.  
  4266.  Any combination of these indicators can be set. When set, they cause a 
  4267.  simulation of the selected feature. For example, if you require a bold, 
  4268.  italicized version of a PM image font, PM simulates that feature because bold, 
  4269.  italic image fonts are not supplied. 
  4270.  
  4271.  
  4272. ΓòÉΓòÉΓòÉ 4.1.8.3. Match Value ΓòÉΓòÉΓòÉ
  4273.  
  4274. The match value is a number that identifies a physical font. It is allocated to 
  4275. the font when the font is loaded. If the match value is less than 0, the font 
  4276. is a device font; and, if the match value is greater than 0, the font is a 
  4277. generic font. 
  4278.  
  4279. A device font is exclusive to the device with which it is associated, and its 
  4280. match number is guaranteed to be unique only within the device driver. If an 
  4281. application prints on a different printer, the application cannot guarantee 
  4282. that the font will be identical just by specifying the match value. A generic 
  4283. font is available on more than one device. The PM-supplied fonts, for example, 
  4284. are generic fonts. Printer fonts always are device fonts, but you also can and 
  4285. should use generic fonts with printers. 
  4286.  
  4287. You can choose whether or not to use the match value to specify the font when 
  4288. calling GpiCreateLogFont. Specifying the match value is easier but less 
  4289. flexible than the alternative, which is to specify the font name and outline 
  4290. characteristics. For an image font, the alternative is to specify the maximum 
  4291. baseline extent and average character width of the required font. 
  4292.  
  4293.  
  4294. ΓòÉΓòÉΓòÉ 4.1.8.4. Face Name ΓòÉΓòÉΓòÉ
  4295.  
  4296. The face name value in the FATTRS data structure is identical to the face name 
  4297. of the FONTMETRICS data structure when describing a specific font. 
  4298.  
  4299.  
  4300. ΓòÉΓòÉΓòÉ 4.1.8.5. Registry Identifier ΓòÉΓòÉΓòÉ
  4301.  
  4302. The registry identifier is a unique number by which the font is registered with 
  4303. IBM. The registry identifier of a particular font can be retrieved by calling 
  4304. GpiQueryFonts. If you do not have a registry number, set this value to 0. 
  4305.  
  4306.  
  4307. ΓòÉΓòÉΓòÉ 4.1.8.6. Code Page ΓòÉΓòÉΓòÉ
  4308.  
  4309. The code page is the identifier of the code page to be associated with the 
  4310. font. You can default the code page in GpiCreateLogFont by specifying 0. Like 
  4311. the face name, the code page in the FATTRS data structure is identical to the 
  4312. code page in the FONTMETRICS data structure when describing a specific font. 
  4313.  
  4314.  
  4315. ΓòÉΓòÉΓòÉ 4.1.8.7. Maximum Baseline Extent ΓòÉΓòÉΓòÉ
  4316.  
  4317. The maximum baseline extent is the vertical space occupied by characters in the 
  4318. font. If you are setting the font-use indicator FATTR_FONTUSE_OUTLINE, you 
  4319. should set the maximum baseline extent to 0. Outline fonts take an equivalent 
  4320. value from the character cell attribute that is current when text is written to 
  4321. an output device. 
  4322.  
  4323. The maximum baseline extent value is required to select an image font and must 
  4324. be specified in world coordinates. For image fonts, this is the vertical height 
  4325. in world coordinates of character images in the font. This field must be 
  4326. specified when requesting an image font with GpiCreateLogFont. 
  4327.  
  4328. The maximum baseline extent measurement is shown in a previous figure. The 
  4329. maximum baseline extent in the FATTRS data structure is used for programming, 
  4330. unlike the maximum baseline extent in the FONTMETRICS data structure, which is 
  4331. only measurement as recommended by the font's designer. 
  4332.  
  4333.  
  4334. ΓòÉΓòÉΓòÉ 4.1.8.8. Average Character Width ΓòÉΓòÉΓòÉ
  4335.  
  4336. The average character width of a font is the average character increment in 
  4337. world coordinates. The character increment is the sum of the a-space, b-space, 
  4338. and c-space of a character. If you are setting the font-use indicator 
  4339. FATTR_FONTUSE_OUTLINE, you can set the average character width to 0 because the 
  4340. outline fonts take an equivalent value from the character cell attribute that 
  4341. is current when text is written to an output device. 
  4342.  
  4343. This field should be specified when requesting an image font using 
  4344. GpiCreateLogFont. It must be specified in world coordinates. 
  4345.  
  4346.  
  4347. ΓòÉΓòÉΓòÉ 4.1.8.9. Type Indicator ΓòÉΓòÉΓòÉ
  4348.  
  4349. PM provides a type indicator to allow the further specification of font most 
  4350. appropriate to your application. The type indicators found in the FATTR data 
  4351. structure are not interchangeable with the type indicators in the FONTMETRICS 
  4352. data structure. 
  4353.  
  4354. The most commonly used type indicator, FATTR_TYPE_KERNING, causes kerning to 
  4355. take effect for those fonts that contain kerning-pair information. 
  4356. FATTR_TYPE_KERNING is supported only for PostScript** devices. 
  4357.  
  4358. There are three other type indicators provided: 
  4359.  
  4360.  Indicator                   When... 
  4361.  FATTR_TYPE_ANTIALIASED      An anti-aliased font is required 
  4362.  FATTR_TYPE_MBCS             A mixed single- or double-byte code page is 
  4363.                              required 
  4364.  FATTR_TYPE_DBCS             A double-byte code page is required. 
  4365.  
  4366.  
  4367. ΓòÉΓòÉΓòÉ 4.1.8.10. Font-Use Indicators ΓòÉΓòÉΓòÉ
  4368.  
  4369. The font-use indicators tell the PM what you intend to do with the font, and 
  4370. determine whether you get an image font or an outline font. There are three 
  4371. font-use indicators: 
  4372.  
  4373.  Indicator                   If set ON... 
  4374.  
  4375.  FATTR_FONTUSE_OUTLINE       Forces selection of an outline font. This value 
  4376.                              must be set if you intend to use graphics 
  4377.                              characters in a path definition. 
  4378.  
  4379.  FATTR_FONTUSE_TRANSFORMABLE Allows the scaling, rotating, or shearing of font 
  4380.                              characters. Set this value ON if the current 
  4381.                              character mode is CM_MODE3. 
  4382.  
  4383.  FATTR_FONTUSE_NOMIX         Allows the PM to ignore current mix-mode values. 
  4384.                              Set this value ON if the graphics text is not 
  4385.                              going to be written over or underneath other 
  4386.                              graphics, because it improves the performance of 
  4387.                              text drawing. 
  4388.  
  4389.  FATTR_FONTUSE_TRANSFORMABLE and FATTR_FONTUSE_OUTLINE normally are both 
  4390.  specified to select an outline font. Specify neither if you want to select an 
  4391.  image font. 
  4392.  
  4393.  
  4394. ΓòÉΓòÉΓòÉ 4.1.9. Public and Private Fonts ΓòÉΓòÉΓòÉ
  4395.  
  4396. The fonts supplied by PM are loaded automatically when the system is started 
  4397. and are available to any application at any time. They are said to be public 
  4398. fonts. Any font that you define locally has to be loaded before you can use it. 
  4399. If you load a locally defined font using the Install option of the Workplace 
  4400. Font Palette, that font is available to any application in the system, and, 
  4401. therefore is a public font. Some devices provide their own fonts. All device 
  4402. fonts are public fonts. 
  4403.  
  4404. Any font loaded using GpiLoadFonts from within an application is a private 
  4405. font. A private font is available only to the application that loads it. The 
  4406. file in which you store a locally created font definition can contain more than 
  4407. one font definition. GpiLoadFonts loads a named font file and, therefore, loads 
  4408. all fonts defined in that file. GpiQueryFontFileDescriptions provides the 
  4409. family name and the face name of each font in a locally defined font file. Use 
  4410. this function to determine if a particular file contains the font you want to 
  4411. use before you load it. 
  4412.  
  4413. To unload a previously loaded private font file, call GpiUnloadFonts. You 
  4414. cannot unload public fonts with this function. 
  4415.  
  4416. You cannot use private fonts in a document that you want to print using the 
  4417. spooler. If you want to print the document from a printer server, using the 
  4418. PM_Q_STD format, all the fonts used in the document must be installed as public 
  4419. fonts on the server. You can use either public or private fonts if you specify 
  4420. the data format PM_Q_RAW or if you want to print without the spooler. 
  4421.  
  4422.  
  4423. ΓòÉΓòÉΓòÉ 4.1.10. Drawing a Character String Primitive ΓòÉΓòÉΓòÉ
  4424.  
  4425. To draw a string of one or more graphics characters from the current font, call 
  4426. GpiCharString. The string starts at the current position and, when it has been 
  4427. drawn, the new current position is the point at which the next character would 
  4428. be, had there been one. 
  4429.  
  4430. To draw the string starting at a position other than the current position, call 
  4431. GpiCharStringAt. This is equivalent to calling GpiSetCurrentPosition or 
  4432. GpiMove, followed by GpiCharString. You supply the text of the character string 
  4433. as a parameter to the appropriate GPI function. 
  4434.  
  4435. Note:  You also can call WinDrawText, which draws text to the screen a line at 
  4436.        a time. WinDrawText differs from the GpiCharString... functions in that 
  4437.        WinDrawText ignores the DM_RETAIN drawing mode and can only be used to 
  4438.        draw to a window device context. 
  4439.  
  4440.  The following figure shows some examples of a character string primitive. 
  4441.  
  4442.  The Character String Primitive 
  4443.  
  4444.  This example shows the string Presentation Manager drawn from different 
  4445.  logical fonts. 
  4446.  
  4447.  
  4448. ΓòÉΓòÉΓòÉ 4.1.11. Font Files and Dynamic-Link Libraries ΓòÉΓòÉΓòÉ
  4449.  
  4450. You can use the Font Editor to alter and customize image-font files. Files 
  4451. created with the Font Editor have a .FNT extension. After you create a custom 
  4452. font, put it into a dynamic-link library (DLL) that the application can load. 
  4453. Once the application loads this library, it can use any of the custom fonts the 
  4454. library contains. 
  4455.  
  4456. DLLs that contain fonts are unique; they contain data segments and empty (or 
  4457. useless) code segments. They are unique because they contain no executable 
  4458. code, unlike normal DLLs. Also you are able to install the font file as a 
  4459. public font if desired; GpiLoadFonts will make it available only as a private 
  4460. font. The operating system naming convention for a DLL that contains font 
  4461. information end with a .FON extension. 
  4462.  
  4463. To create a DLL, you must use an assembler, a linker, and the operating system 
  4464. Resource Compiler. For this example, assume that your custom font file is named 
  4465. NEWFONT.FNT. 
  4466.  
  4467. After creating your custom font file, you need to create a special assembler 
  4468. language file with your editor. Call this file MYFONT.ASM, for example. The 
  4469. following figure shows an example of the source code for this file. 
  4470.  
  4471.  
  4472.    code segment word      ;Makes dummy code segment aligned on word boundary
  4473.    db "empty_segment"     ;Initializes a string in dummy segment
  4474.    code ends              ;Dummy segment ends here
  4475.    end                    ;Terminates source file
  4476.  
  4477. After you have created MYFONT.ASM, assemble it by using the following command: 
  4478.  
  4479.     masm myfont
  4480.  
  4481. After assembling the MYFONT.ASM file, create a module-definition file. Call 
  4482. this file MYFONT.DEF, for example. It should contain the statements in the 
  4483. following figure. 
  4484.  
  4485.  
  4486.     LIBRARY myfont
  4487.     SEGMENTS CODE MOVEABLE
  4488.  
  4489. The first statement tells the linker that you are creating a library with the 
  4490. module name, MYFONT. The second statement tells the linker that the segments in 
  4491. this library are movable code segments. 
  4492.  
  4493. After creating MYFONT.DEF, start the linker with the command in the following 
  4494. figure. 
  4495.  
  4496.     link myfont,,,,myfont.def
  4497.  
  4498. This command creates an empty executable file called MYFONT.EXE. 
  4499.  
  4500. After creating the empty executable file, which is the template for a DLL, 
  4501. create a resource file and call it MYFONT.RC. For example, if your font file is 
  4502. called NEWFONT.FNT, you would place the statement in the following figure in 
  4503. MYFONT.RC. 
  4504.  
  4505.     FONT    200     NEWFONT.FNT
  4506.  
  4507. This statement assigns the identifier, 200, to the font resource NEWFONT.FNT. 
  4508.  
  4509. Finally, use the Resource Compiler to add the font file (NEWFONT.FNT) to the 
  4510. empty DLL as in the following figure. 
  4511.  
  4512.     rc  myfont.rc
  4513.  
  4514. The executable file, MYFONT.EXE, now contains your custom fonts. After you have 
  4515. renamed this file, MYFONT.FON, you can load the fonts into your application 
  4516. using GpiLoadFonts and pass it a pointer to the path and library name as the 
  4517. second argument-for example, c:\os2\dll\myfont.fon. 
  4518.  
  4519.  
  4520. ΓòÉΓòÉΓòÉ 4.2. Using Fonts ΓòÉΓòÉΓòÉ
  4521.  
  4522. You can use the font functions to: 
  4523.  
  4524.      Determine the characteristics of available fonts 
  4525.      Select a font for text output 
  4526.      Delete or unload a font when finished 
  4527.      Create a font 
  4528.      Create marker sets and pattern sets 
  4529.      Use a bit map as a fill pattern 
  4530.      Use a clip path as a fill pattern 
  4531.  
  4532.  
  4533. ΓòÉΓòÉΓòÉ 4.2.1. Selecting a Font ΓòÉΓòÉΓòÉ
  4534.  
  4535. Every presentation space has a current font, and graphics characters must be 
  4536. drawn in that font. By default, the current font is the system font. Before an 
  4537. application can use any font other than the system font, it has to identify the 
  4538. other font as the new current font. 
  4539.  
  4540. There are two distinct ways to identify the other font: 
  4541.  
  4542.      Call GpiQueryFonts to request information about the available physical 
  4543.       fonts, and then explicitly select one of those fonts by supplying its 
  4544.       identifier as input to GpiCreateLogFont. 
  4545.  
  4546.       This process has 11 steps and is covered in the topic "Explicit Font 
  4547.       Selection." This method of selecting a font is most useful for selecting 
  4548.       image fonts. 
  4549.  
  4550.       If you must have an image font, you are urged to use this "explicit 
  4551.       selection"method, because you need to specify a maximum baseline extent 
  4552.       and an average character width in the FATTRS structure. These values can 
  4553.       be determined only by calling GpiQueryFonts. If you specify values that 
  4554.       are not valid, you are likely to be given an outline font. 
  4555.  
  4556.      Use GpiCreateLogFont to specify the features you require in a font, and 
  4557.       permit the PM programming interface to make an appropriate font available 
  4558.       to you. 
  4559.  
  4560.       This process has two steps and is covered in the topic "Closest Matching 
  4561.       Font Selection." 
  4562.  
  4563.  
  4564. ΓòÉΓòÉΓòÉ 4.2.1.1. Explicit Font Selection ΓòÉΓòÉΓòÉ
  4565.  
  4566. An application can select either a public or a private font with 
  4567. GpiCreateLogFont. A public font is available to all applications. A private 
  4568. font is loaded by an application for its exclusive use. 
  4569.  
  4570. Use the Presentation Manager Control Panel to load a public font. Four DLLs 
  4571. contain the Times Roman, Helvetica, Courier, and System Monospaced image fonts. 
  4572. The names of these libraries are: 
  4573.  
  4574.      TIMES.FON 
  4575.      HELV.FON 
  4576.      COURIER.FON 
  4577.      SYSMONO.FON 
  4578.  
  4579.  Unlike most DLLs, font libraries typically use the file name extension .FON. 
  4580.  If the user loads all four libraries, a total of 76 public fonts are 
  4581.  available. An application can use both outline and image formats of these 
  4582.  fonts. Characters in the image format are available in sizes ranging from 8 to 
  4583.  24 points. Characters in the outline format can be any size. 
  4584.  
  4585.  Call GpiLoadFonts to load a private font. Pass the function the path and name 
  4586.  of the DLL that contains the font. After the application loads the DLL of 
  4587.  fonts, it can determine the characteristics of the fonts in that library by 
  4588.  calling GpiQueryFonts. 
  4589.  
  4590.  To select a public font from all of the available public fonts, do the 
  4591.  following: 
  4592.  
  4593.    1. Call GpiQueryFonts. passing the QF_PUBLIC flag, a NULL pointer to the 
  4594.       font's face name, and a count of 0 to determine the number of available 
  4595.       public fonts, as shown in the following figure. 
  4596.  
  4597.             #define INCL_GPILCIDS
  4598.             #include <os2.h>
  4599.             void fncFONT06(void){
  4600.  
  4601.                 FONTMETRICS fm, afm[80];
  4602.                 LONG cFonts = 0, cPublicFonts;
  4603.                 HPS hps;
  4604.  
  4605.                 cPublicFonts = GpiQueryFonts(hps,      /* Queries all public fonts */
  4606.                 QF_PUBLIC,
  4607.                 (PSZ) NULL,
  4608.                 &cFonts,
  4609.                 sizeof(fm),
  4610.                 (PFONTMETRICS) NULL);
  4611.             } /* fncFONT06 */
  4612.  
  4613.       Note:  To load and use a private font, follow the same procedure, but 
  4614.       specify QF_PRIVATE, instead of QF_PUBLIC, in the calls to GpiQueryFonts. 
  4615.  
  4616.    2. Copy the value returned by GpiQueryFonts into a LONG integer variable. 
  4617.  
  4618.    3. Allocate memory for the FONTMETRICS data structures. 
  4619.  
  4620.    4. Call GpiQueryFonts again, passing the QF_PUBLIC flag, a NULL pointer to 
  4621.       the font's face name, the count returned by the previous call, and the 
  4622.       address of an array of FONTMETRICS structures. 
  4623.  
  4624.       GpiQueryFonts the font metrics of every font available the array of 
  4625.       FONTMETRICS structures. The font metrics define in detail the physical 
  4626.       characteristics of a font. 
  4627.  
  4628.       Because the font metrics are so detailed, the amount of information 
  4629.       returned to you from GpiQueryFonts can be extensive. You can restrict the 
  4630.       amount of information returned by this function by: 
  4631.  
  4632.           Specifying an absolute number of fonts about which you require 
  4633.            information. 
  4634.           Asking for information about fonts of a specific face name only. 
  4635.           Limiting the length of the font-metrics buffer. 
  4636.  
  4637.       If you request information for more fonts than are available on the 
  4638.       system, GpiQueryFonts returns all the information about the available 
  4639.       fonts and a value indicating how many fonts it has returned. 
  4640.  
  4641.       If you request information for fewer fonts than are available on the 
  4642.       system (that match the specified face name, and so forth), GpiQueryFonts 
  4643.       returns a value indicating the number of fonts that it was unable to 
  4644.       return. 
  4645.  
  4646.       The following figure is an example of this technique of selecting a font. 
  4647.  
  4648.             #define INCL_GPILCIDS
  4649.             #include <os2.h>
  4650.  
  4651.             PFONTMETRICS fncFONT07 (HPS hps, PLONG pcPublicFonts) {
  4652.                PFONTMETRICS afm = NULL;
  4653.                LONG         fonts = 1000;
  4654.  
  4655.                *pcPublicFonts = GpiQueryFonts(hps,
  4656.                                               QF_PUBLIC,
  4657.                                               (PSZ) NULL,
  4658.                                               &fonts,
  4659.                                               sizeof(*afm),
  4660.                                               (PFONTMETRICS) NULL);
  4661.  
  4662.                if (!DosAllocMem(&afm,
  4663.                                 sizeof(*afm)*(*pcPublicFonts),
  4664.                                 PAG_COMMIT | PAGWRITE )) {
  4665.                    GpiQueryFonts(hps,
  4666.                                 QF_PUBLIC,
  4667.                                 (PSZ) NULL,
  4668.                                 pcPublicFonts,
  4669.                                 sizeof(*afm),
  4670.                                 afm);
  4671.                } /* endif */
  4672.                return afm;
  4673.             }
  4674.  
  4675.    5. Examine the array of FONTMETRICS structures. 
  4676.  
  4677.         a. For an outline font, examine the face name and other attributes of 
  4678.            the font your application requires. 
  4679.  
  4680.         b. For an image font, examine the device resolution fields. These 
  4681.            fields are the ones that determine if a particular font and its 
  4682.            metrics match the device with which you wish to use it. 
  4683.  
  4684.       Note:  If your application is interactive, organize the face names and 
  4685.       other information relevant to those fonts (such as point sizes) in a 
  4686.       menu. When the operator has selected a font, supply the relevant 
  4687.       information from the font metrics of that font in the FATTRS structure of 
  4688.       GpiCreateLogFont. 
  4689.  
  4690.    6. After determining which font to use, your application must fill in the 
  4691.       fields of the FATTRS structure. Some of the data for these fields will be 
  4692.       copied (explicitly) from the FONTMETRICS structure. Then call 
  4693.       GpiCreateLogFont. 
  4694.  
  4695.       If you do not supply a face name, the default font is used.  If you 
  4696.       supply a face name, and the presentation driver cannot find a matching 
  4697.       font, a default font is selected. 
  4698.  
  4699.       The FATTRS structure describes a logical font. An application can have up 
  4700.       to 254 logical fonts defined at any one time in a single presentation 
  4701.       space. A logical font is a list of font attributes, whereas a physical 
  4702.       font is the bit-map or vector information that the system uses to draw 
  4703.       characters. 
  4704.  
  4705.    7. The fonts supplied by the PM programming interface, the fonts you load 
  4706.       using the Control Panel, and any fonts you load with GpiLoadFonts are all 
  4707.       physical fonts. 
  4708.  
  4709.       Copying the entries in the FATTRS structure ensures that, if a particular 
  4710.       font is unavailable, an attempt is made to find the most suitable 
  4711.       substitute. Without the FATTRS information, PM is less likely to locate a 
  4712.       suitable font. 
  4713.  
  4714.    8. Initialize a local identifier (lcid) for the new font. 
  4715.  
  4716.    9. Call GpiCreateLogFont and pass as input parameters: 
  4717.  
  4718.           The lcid for the font 
  4719.  
  4720.           The address of an 8-character array containing the name you want to 
  4721.            give to the logical font, (or, if you do not want to specify a name, 
  4722.            the value NULL) 
  4723.  
  4724.           The address of the FATTRS structure 
  4725.  
  4726.   10. Examine the return value from GpiCreateLogFont. The value will be 2 if 
  4727.       the function is successful; 1, if the default font was used. 
  4728.  
  4729.   11. Pass the lcid to GpiSetCharSet, assigning the font to your application's 
  4730.       presentation space. Then the application can use it for text output. 
  4731.       (This step identifies a logical font as the current font.) 
  4732.  
  4733.  The following figure shows how to select an image font at least 14 device 
  4734.  coordinate units high. 
  4735.  
  4736.   #define INCL_GPILCIDS
  4737.   #include <os2.h>
  4738.  
  4739.   LONG fncFONT08(HPS hps, LONG lcid, LONG xres, LONG yres) {
  4740.      FATTRS       fat;
  4741.      PFONTMETRICS afm;
  4742.      LONG         cFonts;
  4743.      LONG         i;
  4744.      LONG         rc = 0;
  4745.  
  4746.      afm = fncFONT07(hps, &cfonts);
  4747.      if (amf) {
  4748.         for (i=0; 1<cfonts; i++) {
  4749.            if (!(afm[i].fsDefn & FM_DEFN_OUTLINE)
  4750.               afm[i].sXDeviceRes == xres &&
  4751.               afm[i].sYDeviceRes == yres &&
  4752.               afm[i].lMaxBaselineExt >= 14)  {
  4753.              fat.usRecordLength = sizeof(fat);
  4754.              fat.fsSelection = 0;
  4755.              fat.lMatch = 0;
  4756.              strcpy(fat.szFacename, afm[i].szFacename);
  4757.              fat.idRegistry = afm[i].idRegistry;
  4758.              fat.usCodePage = 0;
  4759.              fat.lMaxBaselineExt = afm[i].lMaxBaselineExt;
  4760.              fat.lAveCharWidth = afm[i].lAveCharWidth;
  4761.              fat.fsType = 0;
  4762.              fat.fsFontUse = 0;
  4763.  
  4764.              rc = GpiCreateLogFont(hps, (PSTR8) NULL, lcid, &fat);
  4765.              if (rc) {
  4766.                 GpiSetCharSet(hps, lcid);
  4767.              } /* endif */
  4768.           } /* endfor */
  4769.  
  4770.        } /* endif */
  4771.  
  4772.        return rc;
  4773.   }
  4774.  
  4775.  GpiQueryFonts returns device coordinates for image fonts. For outline fonts, 
  4776.  it returns notional coordinates. Notional coordinates are the coordinate in 
  4777.  which the font was defined. Usually outline fonts are defined over a 
  4778.  1000-by-1000 matrix, with the unit of the matrix a 1/1000 of the em height. 
  4779.  
  4780.  
  4781. ΓòÉΓòÉΓòÉ 4.2.1.2. Reassociating the Presentation Space ΓòÉΓòÉΓòÉ
  4782.  
  4783. The match value of any device font is guaranteed to be unique only for the 
  4784. current device. If you associate the presentation space with a different device 
  4785. context, any logical fonts that also are device fonts are no longer available. 
  4786. On the new device, the match number could identify a different device font 
  4787. (which may not be suitable) or no font at all. Therefore, you should redefine a 
  4788. logical font and select it as the current font if you reassociate the 
  4789. presentation space when the current font is a device font. Otherwise, the 
  4790. default font is used. 
  4791.  
  4792. If you do not intend to use the font on the new device, however, you need not 
  4793. redefine it. You will be able to continue using the font if you reassociate the 
  4794. presentation space with the original device context. 
  4795.  
  4796. Any generic fonts can continue to be used after the presentation space is 
  4797. reassociated if they are suitable for the new device. An image font, for 
  4798. example, can be used only on devices that are all-points addressable. 
  4799.  
  4800.  
  4801. ΓòÉΓòÉΓòÉ 4.2.1.3. Font Resolution ΓòÉΓòÉΓòÉ
  4802.  
  4803. Device fonts, particularly printer fonts, usually are designed for a specific 
  4804. resolution, namely the resolution of the device on which they are to be used. 
  4805. By contrast, generic outline fonts are not device-specific. Generic image fonts 
  4806. are designed for a particular resolution value and, therefore, are really 
  4807. applicable only to devices with a matching resolution value. 
  4808.  
  4809. The horizontal and vertical font resolution values for the device are returned 
  4810. by DevQueryCaps. The desired horizontal and vertical device resolution values 
  4811. in the font metrics of the font concerned are returned by GpiQueryFonts. 
  4812. Compare these the device and the desired resolution values only for an image 
  4813. font. If they are identical then this image font is designed for use with this 
  4814. device (for example, the point size in the font metrics will be accurate for 
  4815. this device). To select a font, do the following: 
  4816.  
  4817.    1. Query the available fonts using GpiQueryFonts. 
  4818.  
  4819.    2. If you want an outline font, search the metrics of fonts returned by 
  4820.       GpiQueryFonts for a font that is an outline font and that has the 
  4821.       required face name. 
  4822.  
  4823.    3. If you want an image font, search the metrics of the fonts returned by 
  4824.       GpiQueryFonts for a font that is an image font and that has the 
  4825.       following: 
  4826.  
  4827.           Required face name 
  4828.           Required point size 
  4829.           Horizontal device resolution font metric that matches the horizontal 
  4830.            resolution for the device 
  4831.           Vertical device resolution font metric that matches the vertical 
  4832.            resolution for the device. 
  4833.  
  4834.    4. As an alternative to the above for an image font, search the metrics of 
  4835.       the fonts returned by GpiQueryFonts for a font that is an image font and 
  4836.       that has the following: 
  4837.  
  4838.           Required face name 
  4839.           Required em height in world coordinates. 
  4840.  
  4841.  Before you define a logical font, determine the resolution of the current 
  4842.  device by using DevQueryCaps with the CAPS_VERTICAL_FONT_RES and 
  4843.  CAPS_HORIZONTAL_FONT_RES parameters. 
  4844.  
  4845.  Compare the values returned from this function with the xDeviceRes and 
  4846.  yDeviceRes values in the font metrics of the available fonts. These two values 
  4847.  contain the resolution of the device for which the font was designed. All 
  4848.  measurements are in pels per inch. By comparing the font resolution with the 
  4849.  device resolution, you can identify the image font best suited to the current 
  4850.  device. 
  4851.  
  4852.  
  4853. ΓòÉΓòÉΓòÉ 4.2.1.4. Closest-Matching Font Selection ΓòÉΓòÉΓòÉ
  4854.  
  4855. The alternative to selecting a specific font is to set the match value to 0. To 
  4856. have the Presentation Manager programming interface select the closest-matching 
  4857. font available, do the following: 
  4858.  
  4859.    1. Define a logical font with GpiCreateLogFont. This function establishes a 
  4860.       link between the calling application and an appropriate physical font. 
  4861.       GpiCreateLogFont accepts a number of options as input, including the font 
  4862.       attributes, which describe the physical features and capabilities of the 
  4863.       font. 
  4864.  
  4865.    2. Complete the FATTRS structure of GpiCreateLogFont. The FATTRS structure 
  4866.       describes a logical font, which the system uses to find the closest 
  4867.       matching physical font. Depending on whether you are selecting a font 
  4868.       using a match number, fill in the FATTRS structure, observing the rules 
  4869.       listed in the following table. 
  4870.  
  4871.       Filling in the FATTRS Structure 
  4872.  
  4873.             ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  4874.             ΓöéIf using a match number       ΓöéIf not using a match number   Γöé
  4875.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4876.             ΓöéSet the match number to the   ΓöéSet the match number to zero. Γöé
  4877.             Γöérequired FONTMETRICS value.   Γöé                              Γöé
  4878.             ΓöéThe FONTMETRICS value is the  ΓöéIf your font is an image font:Γöé
  4879.             Γöévalue in the FONTMETRICS      Γöé                              Γöé
  4880.             Γöéstructure for the required    ΓöéSet the maximum baseline      Γöé
  4881.             Γöéfont returned by GpiQueryFontsΓöéextent to the required        Γöé
  4882.             Γöé.                             ΓöéFONTMETRICS value.            Γöé
  4883.             Γöé                              Γöé                              Γöé
  4884.             ΓöéSet the maximum baseline      ΓöéSet the average character     Γöé
  4885.             Γöéextent to zero.               Γöéwidth to the required         Γöé
  4886.             Γöé                              ΓöéFONTMETRICS value.            Γöé
  4887.             ΓöéSet the average character     Γöé                              Γöé
  4888.             Γöéwidth to zero.                Γöé                              Γöé
  4889.             Γöé                              Γöé                              Γöé
  4890.             ΓöéNote:  A negative lMatch is   Γöé                              Γöé
  4891.             Γöéonly unique for a device. A   Γöé                              Γöé
  4892.             Γöépositive lMatch is only uniqueΓöé                              Γöé
  4893.             Γöéon a particular system at a   Γöé                              Γöé
  4894.             Γöéparticular time.              Γöé                              Γöé
  4895.             ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  4896.  
  4897.       Also observe the rules concerning the font-use indicator that are listed 
  4898.       in the following table. 
  4899.  
  4900.       Font-Use Indicator Considerations 
  4901.  
  4902.             ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  4903.             ΓöéIf you have not set the       ΓöéIf you have set the           Γöé
  4904.             ΓöéFATTR_FONTUSE_OUTLINE         ΓöéFATTR_FONTUSE_OUTLINE         Γöé
  4905.             Γöéindicator:                    Γöéindicator:                    Γöé
  4906.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4907.             ΓöéPM looks for an image font    ΓöéPM looks for a suitable       Γöé
  4908.             Γöéthat has the required         Γöéoutline font whose selection  Γöé
  4909.             Γöéselection indicators and whoseΓöéindicators match those you    Γöé
  4910.             Γöémaximum baseline extent and   Γöéhave specified.               Γöé
  4911.             Γöéaverage character width match Γöé                              Γöé
  4912.             Γöéthose you have specified.     ΓöéIf no suitable outline font isΓöé
  4913.             Γöé                              Γöéfound, the default font is    Γöé
  4914.             ΓöéIf no suitable image font is  Γöéused. No attempt is made to   Γöé
  4915.             Γöéfound, PM looks for an outlineΓöésubstitute an image font.     Γöé
  4916.             Γöéfont with the required face   Γöé                              Γöé
  4917.             Γöéname and selection indicators.Γöé                              Γöé
  4918.             Γöé                              Γöé                              Γöé
  4919.             ΓöéIf no suitable outline font isΓöé                              Γöé
  4920.             Γöéfound, the default font is    Γöé                              Γöé
  4921.             Γöémade available to you.        Γöé                              Γöé
  4922.             ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  4923.  
  4924.  Outline fonts are affected by the current character attributes (for example, 
  4925.  character box, shear, and angle). Because an outline font might be made 
  4926.  available to you, even when you requested an image font, call 
  4927.  GpiQueryFontMetrics to determine whether the font is an image font or an 
  4928.  outline font. GpiQueryFontMetrics returns the metrics of the current logical 
  4929.  font in world coordinates. 
  4930.  
  4931.  The setting of the definition indicators in the FONTMETRICS structure tell you 
  4932.  whether the font is either an image or outline font, or a device or generic 
  4933.  font. If the font is an outline font, specify values for the character 
  4934.  attributes before using the font. Outline fonts are unaffected by the maximum 
  4935.  baseline extent and average character width values specified in 
  4936.  GpiCreateLogFont. 
  4937.  
  4938.  If the default font provided is an image font, and you also have specified 
  4939.  FATTR_FONTUSE_TRANSFORMABLE, any attempt to draw graphics characters in 
  4940.  CM_MODE3 raises an error condition. This is an exception to the general rule 
  4941.  that a FATTR_FONTUSE_TRANSFORMABLE font must be used in CM_MODE3 only. 
  4942.  
  4943.  
  4944. ΓòÉΓòÉΓòÉ 4.2.2. Selecting the New Current Font ΓòÉΓòÉΓòÉ
  4945.  
  4946. In addition to completing the FATTRS structure, you must supply as input to 
  4947. GpiCreateLogFont a unique lcid for the font. The identifier is a number in the 
  4948. range of 1 through 254. Because you can have more than one logical font 
  4949. definition in a presentation space, you must select the current font by 
  4950. supplying the font's lcid as input to GpiSetCharSet. 
  4951.  
  4952. You do not have to call GpiSetCharSet to use the default font. When you want to 
  4953. reset the current font to its default value, however, call GpiSetCharSet with 
  4954. the value LCID_DEFAULT. The current font, like other modal attributes, reverts 
  4955. automatically to its default value when specific GPI functions are called. 
  4956.  
  4957.  
  4958. ΓòÉΓòÉΓòÉ 4.2.3. Deleting Logical Fonts and Unloading Physical Fonts ΓòÉΓòÉΓòÉ
  4959.  
  4960. A logical font can be used only by the application that defines it. The logical 
  4961. font definition is stored in the presentation space and is saved on the LIFO 
  4962. stack with its lcid when GpiSavePS is called. Unlike a physical font 
  4963. definition, a logical font definition is temporary and is lost when the 
  4964. presentation space is deleted. 
  4965.  
  4966. To specifically delete a logical font, call GpiDeleteSetId, which deletes the 
  4967. logical font, and makes its lcid available for reuse. Sometimes this is 
  4968. necessary because there are only 255 lcids available. The logical font must not 
  4969. be the current font when you call GpiDeleteSetId. 
  4970.  
  4971. Logical fonts are deleted to release the lcid and free memory. Unload private 
  4972. fonts using GpiUnloadFonts to free memory and to make them no longer available. 
  4973. Uninstall public fonts using the Control Panel to free memory and to make them 
  4974. no longer available. 
  4975.  
  4976. You must end the association between physical and logical fonts before calling 
  4977. GpiUnloadFonts. 
  4978.  
  4979. If you call GpiUnloadFonts to unload a private font file, you must end the 
  4980. association between the physical fonts in that file and the logical fonts 
  4981. defined by the application. Do the following: 
  4982.  
  4983.      Call GpiSetCharSet to select a current font (such as the default font) 
  4984.       that is not linked to the physical fonts you are unloading 
  4985.  
  4986.      Call GpiDeleteSetId to delete each logical font that refers to any of the 
  4987.       physical fonts in the font resource file. If you fail to do this, an 
  4988.       error is returned to your application from GpiUnloadFonts. 
  4989.       *GpiUnloadFonts. 
  4990.  
  4991.  
  4992. ΓòÉΓòÉΓòÉ 4.2.4. Creating Fonts ΓòÉΓòÉΓòÉ
  4993.  
  4994. You cannot edit the definitions of any of the PM-provided fonts, although you 
  4995. can create and edit image-font files using the Font Editor. A font file 
  4996. contains a header, that describes the font in general terms and a section 
  4997. containing bit maps of the characters themselves. The font definition is stored 
  4998. in a resource file. 
  4999.  
  5000.  
  5001. ΓòÉΓòÉΓòÉ 4.2.5. Creating Marker Sets and Pattern Sets ΓòÉΓòÉΓòÉ
  5002.  
  5003. Like character sets, marker sets and pattern sets are defined in fonts. For 
  5004. both marker sets and pattern sets, there are system-provided defaults. You also 
  5005. can create your own image markers or patterns, but not outline markers or 
  5006. patterns, using the Font Editor. The font definition containing the image or 
  5007. pattern can be loaded either as a public font (using the Install selection from 
  5008. the Control Panel) or as a private font (using GpiLoadFonts). The current 
  5009. character mode has no effect on marker sets and pattern sets. Any character 
  5010. from a font can be used as a marker or as an area-fill pattern. 
  5011.  
  5012. Before you can use a locally defined marker set or pattern set, you must call 
  5013. GpiCreateLogFont to define a logical font and to give it an lcid, just as you 
  5014. would for a character font. Most of the values you can specify with 
  5015. GpiCreateLogFont are not applicable to marker sets and pattern sets. 
  5016. Furthermore, in the instance of marker sets and pattern sets, you usually know 
  5017. that you want to use a particular font. 
  5018.  
  5019. To select a locally defined marker set or pattern set: 
  5020.  
  5021.    1. Call GpiQueryFonts to obtain a match value for the font. 
  5022.  
  5023.    2. Call GpiCreateLogFont, specifying the face name, match value, and lcid 
  5024.       for the font. 
  5025.  
  5026.    3. Select the logical font as the current marker set or pattern set by 
  5027.       calling GpiSetMarkerSet or GpiSetPatternSet, as appropriate. 
  5028.  
  5029.  To revert to using the default pattern or marker sets, call GpiSetPatternSet 
  5030.  or GpiSetMarkerSet with the value LCID_DEFAULT. 
  5031.  
  5032.  
  5033. ΓòÉΓòÉΓòÉ 4.2.6. Using Bit Maps as Area-Fill Patterns ΓòÉΓòÉΓòÉ
  5034.  
  5035. An alternative to using the Font Editor to create your own pattern sets is to 
  5036. use a bit map as an area-fill pattern. You must call GpiSetBitmapId to give the 
  5037. bit map an lcid, and then call GpiSetPatternSet, specifying the lcid of the bit 
  5038. map. The bit map becomes a pattern set containing one pattern, and the current 
  5039. pattern-symbol attribute is ignored. GpiQueryBitmapHandle returns the handle of 
  5040. the bit map currently known by the lcid that you supply as input. 
  5041.  
  5042. PM cannot distinguish among the lcids associated with a particular presentation 
  5043. space. Any lcid can identify a character set, marker set, pattern set, or bit 
  5044. map (that is being used as an area-fill pattern). For example, if you call 
  5045. GpiQueryNumberSetIds to determine how many lcids are currently assigned in the 
  5046. presentation space, the number returned to you includes all logical fonts 
  5047. defined for this presentation space. You also can use GpiDeleteSetId to remove 
  5048. lcids associated with the non-font entities. If you call this function to 
  5049. delete a bit map that is being used as an area-fill pattern, the bit map itself 
  5050. is not deleted. However, it is disassociated from its lcid, and the lcid can be 
  5051. reused. 
  5052.  
  5053.  
  5054. ΓòÉΓòÉΓòÉ 4.2.7. Using Paths with Fill Patterns ΓòÉΓòÉΓòÉ
  5055.  
  5056. Using paths lets you fill a character string with a complicated or nonrepeating 
  5057. pattern. The following sequence is recommended: 
  5058.  
  5059.      Select the required outline font, and set the required character 
  5060.       attributes. 
  5061.      Create a path by calling GpiBeginPath, GpiCharString, and GpiEndPath. 
  5062.      Set the required pattern symbol and other AREABUNDLE pattern attributes. 
  5063.      Fill the path using GpiFillPath. 
  5064.  
  5065.  The following figure provides an example of using paths with fill patterns to 
  5066.  create characters. 
  5067.  
  5068.  Using Clip Paths to Create Characters 
  5069.  
  5070.  
  5071. ΓòÉΓòÉΓòÉ 4.3. Font-File Format ΓòÉΓòÉΓòÉ
  5072.  
  5073. The OS/2 font-file format consists of two sections.  The first section contains 
  5074. the general attributes of the font, and describes features such as its 
  5075. typeface, style, and nominal size.  The second section contains the actual 
  5076. definitions of the characters belonging to the font. 
  5077.  
  5078. The font resource is a set of self-defining records of the form: 
  5079.  
  5080. typedef struct _RECORD {
  5081.         ULONG   ulIdentity;    /* structure identity code */
  5082.         ULONG   ulSize;        /* structure size in bytes */
  5083.          .                     /* data */
  5084.          .
  5085.          .
  5086. } RECORD;
  5087.  
  5088. A font starts with a special font-signature structure and ends with an ending 
  5089. structure.  The font signature has the form: 
  5090.  
  5091. typedef struct _FONTSIGNATURE {
  5092.         ULONG   ulIdentity;
  5093.         ULONG   ulSize;
  5094.         CHAR    achSignature [12]
  5095. } FONTSIGNATURE;
  5096.  
  5097. Where: 
  5098.  
  5099.  ulIdentity     0xFFFFFFFE 
  5100.  ulSize         20 
  5101.  achSignature   "OS/2 FONT" for an OS/2 1.x format font, or 
  5102.                 "OS/2 FONT 2" for an OS/2 2.x format font. 
  5103.  
  5104.  A 2.x format font includes additional font description information in the 
  5105.  PANOSE structure. This structure will be added to the end of the .FNT file 
  5106.  (prior to the ENDFONT record). 
  5107.  
  5108.  The font end structure has the form: 
  5109.  
  5110.   typedef struct _ENDFONT{
  5111.           ULONG   ulIdentity;
  5112.           ULONG   ulSize;
  5113.   }ENDFONT
  5114.  
  5115.  Where: 
  5116.  
  5117.  ulIdentity     0xFFFFFFFF 
  5118.  ulSize         8 
  5119.  
  5120.  All records should be in the order of their identity fields. 
  5121.  
  5122.  There are three or four records in a font resource between the font signature 
  5123.  and the font end: 
  5124.  
  5125.      The font metrics 
  5126.      The font character definitions 
  5127.      The pair kerning table. 
  5128.      The PANOSE description (for "OS/2 FONT 2" fonts). 
  5129.  
  5130.  Following compilation, the records in the resource are in the order defined 
  5131.  above. 
  5132.  
  5133.  
  5134. ΓòÉΓòÉΓòÉ 4.3.1. Metric Information Contained in Fonts ΓòÉΓòÉΓòÉ
  5135.  
  5136. This section gives an explanation of how to set the fields of the FOCAMETRICS 
  5137. structure when developing: 
  5138.  
  5139.      A bit map or outline font for general use by PM graphics applications 
  5140.  
  5141.      A description of a bit map or outline device font that is built in to a 
  5142.       device or can be downloaded to a device. 
  5143.  
  5144.  The following structure contains the physical font metrics used when creating 
  5145.  fonts. It is defined in the file \INCLUDE\PMFONT.H. 
  5146.  
  5147.   typedef struct _FOCAMETRICS {
  5148.           ULONG   ulIdentity;
  5149.           ULONG   ulSize;
  5150.           CHAR    szFamilyname[32];
  5151.           CHAR    szFacename[32];
  5152.           SHORT   usRegistryId;
  5153.           SHORT   usCodePage;
  5154.           SHORT   yEmHeight;
  5155.           SHORT   yXHeight;
  5156.           SHORT   yMaxAscender;
  5157.           SHORT   yMaxDescender;
  5158.           SHORT   yLowerCaseAscent;
  5159.           SHORT   yLowerCaseDescent;
  5160.           SHORT   yInternalLeading;
  5161.           SHORT   yExternalLeading;
  5162.           SHORT   xAveCharWidth;
  5163.           SHORT   xMaxCharInc;
  5164.           SHORT   xEmInc;
  5165.           SHORT   yMaxBaselineExt;
  5166.           SHORT   sCharSlope;
  5167.           SHORT   sInlineDir;
  5168.           SHORT   sCharRot;
  5169.           USHORT  usWeightClass;
  5170.           USHORT  usWidthClass;
  5171.           SHORT   xDeviceRes;
  5172.           SHORT   yDeviceRes;
  5173.           SHORT   usFirstChar;
  5174.           SHORT   usLastChar;
  5175.           SHORT   usDefaultChar;
  5176.           SHORT   usBreakChar;
  5177.           SHORT   usNominalPointSize;
  5178.           SHORT   usMinimumPointSize;
  5179.           SHORT   usMaximumPointSize;
  5180.           SHORT   fsTypeFlags;
  5181.           SHORT   fsDefn;
  5182.           SHORT   fsSelectionFlags;
  5183.           SHORT   fsCapabilities;
  5184.           SHORT   ySubscriptXSize;
  5185.           SHORT   ySubscriptYSize;
  5186.           SHORT   ySubscriptXOffset;
  5187.           SHORT   ySubscriptYOffset;
  5188.           SHORT   ySuperscriptXSize;
  5189.           SHORT   ySuperscriptYSize;
  5190.           SHORT   ySuperscriptXOffset;
  5191.           SHORT   ySuperscriptYOffset;
  5192.           SHORT   yUnderscoreSize;
  5193.           SHORT   yUnderscorePosition;
  5194.           SHORT   yStrikeoutSize;
  5195.           SHORT   yStrikeoutPosition;
  5196.           SHORT   usKerningPairs;
  5197.           SHORT   sFamilyClass;
  5198.           PSZ     pszDeviceNameOffset;
  5199.   } FOCAMETRICS;
  5200.  
  5201.  Note:  FOCAMETRICS is a parallel structure with FONTMETRICS as returned to 
  5202.         applications in the GpiQueryFonts and GpiQueryFontMetrics function 
  5203.         calls. 
  5204.  
  5205.  The FONTMETRICS fields are derived from FOCAMETRICS by the Presentation 
  5206.  Manager graphics engine. Most values are passed though unchanged. The 
  5207.  exceptions are: 
  5208.  
  5209.      The Identity field. This must be 1. This field is not a part of the 
  5210.       FONTMETRICS structure. 
  5211.  
  5212.      The Size field. This must be set to the size of the FOCAMETRICS 
  5213.       structure. This field is not a part of the FONTMETRICS structure. 
  5214.  
  5215.      The Codepage field. Ignore the description in FONTMETRICS, and use the 
  5216.       following: 
  5217.  
  5218.            Place 850 in this field if the font is intended to support any PM 
  5219.            supported code page. 
  5220.  
  5221.            Place 65400 in this field if the font has special glyphs, for 
  5222.            example if it is a Symbol font. 
  5223.  
  5224.            Place other valid code pages in this field if the font is specific 
  5225.            to this code page. 
  5226.  
  5227.            Do not place other values in this field. 
  5228.  
  5229.      FONTMETRICS fields which contain values in world coordinates. The 
  5230.       corresponding field in FOCAMETRICS should contain pel values for bit-map 
  5231.       fonts, and notional units for outline fonts. 
  5232.  
  5233.  See FONTMETRICS for a detailed explanation of the fields. 
  5234.  
  5235.  
  5236. ΓòÉΓòÉΓòÉ 4.3.2. Font Character Definitions ΓòÉΓòÉΓòÉ
  5237.  
  5238. Two formats of font character definition are supported. These are: 
  5239.  
  5240.  Image format     The character glyphs are represented as pel images. 
  5241.  
  5242.  Outline format   The character glyphs are represented by vector data that 
  5243.                   traces the outline of the character. 
  5244.  
  5245.                   Note:  Intelligent Font Technology fonts (such as ATM Type-1 
  5246.                          fonts) may be stored in a technology specific format, 
  5247.                          and thus will not conform to this definition for 
  5248.                          outline fonts. 
  5249.  The definition consists of a header portion and a portion carrying the 
  5250.  characters themselves. 
  5251.  
  5252.  The header portion contains information about the format of the character 
  5253.  definitions and data about each character including width data and the offset 
  5254.  into the definition section at which the character definition begins. (See 
  5255.  Definitions of Terms Used When Describing Fonts.) 
  5256.  
  5257.    1. Proportional characters (a+b+c = character increment) for each character: 
  5258.  
  5259.             a,b,c >= 0
  5260.  
  5261.    2. Characters where a, b, and c are definitions for all characters: 
  5262.  
  5263.             b >= 0
  5264.             a, c any integer
  5265.  
  5266.  Raster fonts contain a "null character". The character definition record for 
  5267.  this occurs after the one for the last character. Thus the format has 
  5268.  usLastChar+2 characters, although the null character is not counted in the 
  5269.  range returned. The null character is composed of zeros and is always eight 
  5270.  pels wide. 
  5271.  
  5272.  
  5273. ΓòÉΓòÉΓòÉ 4.3.2.1. Font Definition Header ΓòÉΓòÉΓòÉ
  5274.  
  5275. This structure defines the format or the character definition records that 
  5276. follow it: 
  5277.  
  5278. typedef struct_FONTDEFINITIONHEADER {
  5279.         ULONG        ulIdentity;
  5280.         ULONG        ulSize;
  5281.         SHORT        fsFontdef;
  5282.         SHORT        fsChardef;
  5283.         SHORT        usCellSize;
  5284.         SHORT        xCellWidth;
  5285.         SHORT        yCellHeight;
  5286.         SHORT        xCellIncrement;
  5287.         SHORT        xCellA;
  5288.         SHORT        xCellB;
  5289.         SHORT        xCellC;
  5290.         SHORT        pCellBaseOffset;
  5291. } FONTDEFINITIONHEADER;
  5292. typedef FONTDEFINITIONHEADER FAR *PFONTDEFINITIONHEADER;
  5293.  
  5294. Where: 
  5295.  
  5296.  ulIdentity 
  5297.     4 bytes. 
  5298.  
  5299.     Must be equal to 2. 
  5300.  
  5301.  ulSize 
  5302.     4 bytes. 
  5303.  
  5304.     Size of this structure in bytes. 
  5305.  
  5306.  fsFontdef 
  5307.     2 bytes of flags. 
  5308.  
  5309.     Indicates which fields are present in the font definition data in the 
  5310.     header. 
  5311.  
  5312.     Type 1 
  5313.  
  5314.     Bit 0         1 = width defined in header 
  5315.     Bit 1         1 = height defined in header 
  5316.     Bit 2         1 = char increment same as width, so that it is defined for 
  5317.                   the whole font 
  5318.     Bit 3         0 = a-space not defined 
  5319.     Bit 4         0 = b-space not defined 
  5320.     Bit 5         0 = c-space not defined 
  5321.     Bit 6         1 = base offset same for all characters. 
  5322.  
  5323.     Type 2 
  5324.  
  5325.     Bit 0         0 = width for each character unique 
  5326.     Bit 1         1 = height defined in header 
  5327.     Bit 2         0 = char increment same as width, so that it is unique for 
  5328.                   each character 
  5329.     Bit 3         0 = a-space not defined 
  5330.     Bit 4         0 = b-space not defined 
  5331.     Bit 5         0 = c-space not defined 
  5332.     Bit 6         1 = base offset same for all characters. 
  5333.  
  5334.     Type 3 
  5335.  
  5336.     Bit 0         0 = width for each character unique 
  5337.     Bit 1         1 = height defined in header 
  5338.     Bit 2         0 = char increment same as width, so that it is unique 
  5339.     Bit 3         0 = a-space not defined 
  5340.     Bit 4         0 = b-space not defined 
  5341.     Bit 5         0 = c-space not defined 
  5342.     Bit 6         1 = base offset same for all characters. 
  5343.  
  5344.  FsChardef 
  5345.     2 bytes of flags. 
  5346.  
  5347.     Indicates which fields are present on a per character basis. 
  5348.  
  5349.     Type 1 
  5350.  
  5351.     Bit 0         1 = width defined for each character (performance op) 
  5352.     Bit 1         0 = height is in header 
  5353.     Bit 2         0 = char increment is in header 
  5354.     Bit 3         0 = a-space not defined 
  5355.     Bit 4         0 = b-space not defined 
  5356.     Bit 5         0 = c-space not defined 
  5357.     Bit 6         0 = base offset defined in header 
  5358.     Bit 7         1 = offset to glyph defined. 
  5359.  
  5360.     Type 2 
  5361.  
  5362.     Bit 0         1 = width defined for each character 
  5363.     Bit 1         0 = height is in header 
  5364.     Bit 2         0 = char increment same as width 
  5365.     Bit 3         0 = a-space not defined 
  5366.     Bit 4         0 = b-space not defined 
  5367.     Bit 5         0 = c-space not defined 
  5368.     Bit 6         0 = base offset defined in header 
  5369.     Bit 7         1 = offset to glyph defined. 
  5370.  
  5371.     Type 3 
  5372.  
  5373.     Bit 0         1 = width not defined, use a, b, c 
  5374.     Bit 1         0 = height is in header 
  5375.     Bit 2         0 = char increment same as width 
  5376.     Bit 3         1 = a-space defined 
  5377.     Bit 4         1 = b-space defined 
  5378.     Bit 5         1 = c-space defined 
  5379.     Bit 6         0 = base offset defined in header 
  5380.     Bit 7         1 = offset to glyph defined. 
  5381.  
  5382.  usCellSize 
  5383.     2-byte integer. 
  5384.  
  5385.     Indicates the length in bytes of each character definition record (the per 
  5386.     character data). 
  5387.  
  5388.     Type 1        6 bytes 
  5389.     Type 2        6 bytes 
  5390.     Type 3        10 bytes. 
  5391.  
  5392.  xCellWidth 
  5393.     2-byte integer 
  5394.  
  5395.     The width of the characters, in pels for image fonts, and relative units 
  5396.     for outline fonts. 
  5397.  
  5398.     Type 1        Width of the characters 
  5399.     Type 2        Zero 
  5400.     Type 3        Zero. 
  5401.  
  5402.  yCellHeight 
  5403.     2-byte integer. 
  5404.  
  5405.     The height of the characters, in pels for image fonts, and relative units 
  5406.     for outline fonts. 
  5407.  
  5408.     Type 1        Height of the characters 
  5409.     Type 2        Height of the characters 
  5410.     Type 3        Height of the characters. 
  5411.  
  5412.  xCellIncrement 
  5413.     2-byte integer. 
  5414.  
  5415.     The distance along the character baseline required to step from one 
  5416.     character to the next (when forming a character string). 
  5417.  
  5418.     Type 1        Width of the characters 
  5419.     Type 2        Zero 
  5420.     Type 3        Zero. 
  5421.  
  5422.  xCellA 
  5423.     2-byte signed integer. 
  5424.  
  5425.     The width of the space before a character in the inline direction (the 
  5426.     a-space). 
  5427.  
  5428.     Type 1        Zero 
  5429.     Type 2        Zero 
  5430.     Type 3        a-space for all characters. 
  5431.  
  5432.  xCellB 
  5433.     2-byte integer. 
  5434.  
  5435.     The width of a character (inline direction). The b-space. 
  5436.  
  5437.     Type 1        Zero 
  5438.     Type 2        Zero 
  5439.     Type 3        b-space for all characters. 
  5440.  
  5441.  xCellC 
  5442.     2-byte signed integer. 
  5443.  
  5444.     The width of the space after a character in the inline direction (the 
  5445.     c-space). 
  5446.  
  5447.     Type 1        Zero 
  5448.     Type 2        Zero 
  5449.     Type 3        c-space for all characters. 
  5450.  
  5451.  pCellBaseOffset 
  5452.     2-byte signed integer. 
  5453.  
  5454.     The position of the top of a character definition relative to the baseline 
  5455.     in the direction perpendicular to the baseline. 
  5456.  
  5457.     Type 1        Baseline offset for all characters 
  5458.     Type 2        Baseline offset for all characters 
  5459.     Type 3        Baseline offset for all characters. 
  5460.  
  5461.  Character Definition Record 
  5462.     xCellSize bytes per record. 
  5463.  
  5464.     The following fields may or may not be present, according to the font 
  5465.     character definition fields flags. If a field is present, it is present for 
  5466.     each character and the value applies to that character only. 
  5467.  
  5468.     There are usLastChar+2 such records for raster fonts. The final one is for 
  5469.     the null character. 
  5470.  
  5471.         Character Definition Offset: 4-byte integer. 
  5472.  
  5473.          The offset into the Font File at which the character definition 
  5474.          begins. 
  5475.  
  5476.          Data for a single character raster or vector should not span two 
  5477.          segments; that is, if a character is too big to fit into a segment it 
  5478.          should be put in the next segment. 
  5479.  
  5480.          This field should be set to zero if the character being defined is a 
  5481.          blank character. 
  5482.  
  5483.         Character Cell Width: 2-byte integer. 
  5484.  
  5485.          The width of the character definition in pels. 
  5486.  
  5487.         Character Cell Height: 2-byte integer. 
  5488.  
  5489.          The height of the character definition in pels. 
  5490.  
  5491.         Character Increment: 2-byte integer. 
  5492.  
  5493.          The length along the character baseline required to step from this 
  5494.          character to the next (when forming a character string). 
  5495.  
  5496.         Character a-space: 2-byte signed integer. 
  5497.  
  5498.          The width of the space before the character in the inline direction. 
  5499.  
  5500.         Character b-space: 2-byte integer. 
  5501.  
  5502.          The width of the character shape (inline direction). 
  5503.  
  5504.         Character c-space: 2-byte signed integer. 
  5505.  
  5506.          The width of the space after the character in the inline direction. 
  5507.  
  5508.         Character Baseline Offset: 2-byte signed integer. 
  5509.  
  5510.          The position of the top of a character definition relative to the 
  5511.          baseline in the direction perpendicular to the baseline. 
  5512.  
  5513.  Note:  Type 1 fonts have offset/width pairs (like type 2); however, the 
  5514.         usCellSize and xCellIncrement are nonzero. In the fsType field of the 
  5515.         font metrics, the proportional-space flag, bit 0, is set. 
  5516.  
  5517.  
  5518. ΓòÉΓòÉΓòÉ 4.3.2.2. Image Data Format ΓòÉΓòÉΓòÉ
  5519.  
  5520. The bits for each character are stored separately, and start on a byte 
  5521. boundary. Sequential bytes represent vertical pieces of the character image. 
  5522. For example, a 15-bit-wide H is stored as follows: 
  5523.  
  5524. Byte                       Byte
  5525.     ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  5526.   1 Γöé 00000000 Γöé 0000000- Γöé 13      Bytes 1 through 12 are composed of
  5527.   2 Γöé 01100000 Γöé 0000110- Γöé 14      whole bytes of data stored row by row.
  5528.   3 Γöé 01100000 Γöé 0000110- Γöé 15
  5529.   4 Γöé 01100000 Γöé 0000110- Γöé 16      Bytes 13 through 24 are composed of
  5530.   5 Γöé 01100000 Γöé 0000110- Γöé 17      bytes stored row by row, where each byte
  5531.   6 Γöé 01111111 Γöé 1111110- Γöé 18      contains 7 bits of information and the
  5532.   7 Γöé 01111111 Γöé 1111110- Γöé 19      last bit is unused.
  5533.   8 Γöé 01100000 Γöé 0000110- Γöé 20
  5534.   9 Γöé 01100000 Γöé 0000110- Γöé 21      Thus the character is laid down in
  5535.  10 Γöé 01100000 Γöé 0000110- Γöé 22      byte-wide columns.
  5536.  11 Γöé 01100000 Γöé 0000110- Γöé 23
  5537.  12 Γöé 00000000 Γöé 0000000- Γöé 24
  5538.     ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  5539.  
  5540. Notes: 
  5541.  
  5542.    1. There is always an additional (null) character defined in an Image Font 
  5543.       (defined at character position LastChar+2) which is 8 bits wide, the 
  5544.       height of the font character, and set to all zeros. 
  5545.  
  5546.    2. The maximum size of each individual Image Font must not exceed 64KB. 
  5547.  
  5548.  
  5549. ΓòÉΓòÉΓòÉ 4.3.3. The Kerning Pair Table ΓòÉΓòÉΓòÉ
  5550.  
  5551. The kerning pair table record is not present if the _KerningPairs record in the 
  5552. metrics is zero. If it is present, the code points are words, not bytes. This 
  5553. table should be sorted by kpChar1 and kpChar2 order to allow binary searches. 
  5554.  
  5555. typedef struct _KERNPAIRTABLE {
  5556.         ULONG   ulIdentity;
  5557.         ULONG   ulSize;
  5558.         CHAR    cFirstpair;
  5559. }KERNPAIRTABLE;
  5560.  
  5561. typedef struct _KERNPAIRS {
  5562.         SHORT   sFirstChar;
  5563.         SHORT   sSecondChar;
  5564.         SHORT   sKerningAmount;
  5565. }KERNINGPAIRS;
  5566.  
  5567. Where: 
  5568.  
  5569.  ulIdentity       3 
  5570.  ulSize           10 
  5571.  sFirstChar       First character of the kerning pair. 
  5572.  sSecondChar      Second character of the kerning pair. 
  5573.  sKerningAmount   Kerning value. Positive values increase the inter-character 
  5574.                   spacing while negative values bring the characters closer 
  5575.                   together. 
  5576.  
  5577.  Outline Data Format 
  5578.  
  5579.  Fonts defined by outlines (vectors) may contain any of these graphics orders: 
  5580.  
  5581.      Line at given position (GLINE) 
  5582.      Line at current position (GCLINE) 
  5583.      Relative line at given position (GRLINE) 
  5584.      Relative line at current position (GCRLINE) 
  5585.      Fillet at given position (GFLT) 
  5586.      Fillet at current position (GCFLT) 
  5587.      Sharp fillet at given position (GSFLT) 
  5588.      Sharp fillet at current position (GCSFLT) 
  5589.      Bezier curve at given position (GBEZ) 
  5590.      Bezier curve at current position (GCBEZ) 
  5591.      No operation (GNOP1) 
  5592.      Comment (GCOMT) 
  5593.      End of symbol definition (GESD). 
  5594.  
  5595.  The maximum length of the data in these orders is 255 bytes. The drawing order 
  5596.  code and the length fields are not included in the length count. 
  5597.  
  5598.  The size of each outline font definition must not be longer than 64KB. 
  5599.  
  5600.  
  5601. ΓòÉΓòÉΓòÉ 4.3.4. Additional Metrics ΓòÉΓòÉΓòÉ
  5602.  
  5603. The additional metrics structure extends the metrics describing the font to 
  5604. include the PANOSE fields. The fields allow for quantitative descriptions of 
  5605. the visual properties of font faces. The format of the ADDITIONALMETRICS 
  5606. structure is: 
  5607.  
  5608. typedef struct {
  5609.         ULONG       ulIdentity;
  5610.         ULONG       ulSize;
  5611.         PANOSE      panose;
  5612. } ADDITIONALMETRICS;
  5613.  
  5614. Where: 
  5615.  
  5616.  ulIdentity  4 
  5617.  ulSize      20 
  5618.  panose      The ten digit PANOSE number with two bytes of padding. 
  5619.  
  5620.  The PANOSE definition consists of ten digits, each of which describes one of 
  5621.  up to sixteen variations. The current digits are: 
  5622.  
  5623.    1. Family Kind (6 variations) 
  5624.  
  5625.       0        = Any 
  5626.       1        = No Fit 
  5627.       2        = Text and Display 
  5628.       3        = Script 
  5629.       4        = Decorative 
  5630.       5        = Pictorial 
  5631.  
  5632.    2. Serif Style (16 variations) 
  5633.  
  5634.       0        = Any 
  5635.       1        = No Fit 
  5636.       2        = Cove 
  5637.       3        = Obtuse Cove 
  5638.       4        = Square Cove 
  5639.       5        = Obtuse Square Cove 
  5640.       6        = Square 
  5641.       7        = Thin 
  5642.       8        = Bone 
  5643.       9        = Exaggerated 
  5644.       10       = Triangle 
  5645.       11       = Normal Sans 
  5646.       12       = Obtuse Sans 
  5647.       13       = Perp Sans 
  5648.       14       = Flared 
  5649.       15       = Rounded 
  5650.  
  5651.    3. Weight (12 variations) 
  5652.  
  5653.       0        = Any 
  5654.       1        = No Fit 
  5655.       2        = Very Light 
  5656.       3        = Light 
  5657.       4        = Thin 
  5658.       5        = Book 
  5659.       6        = Medium 
  5660.       7        = Demi 
  5661.       8        = Bold 
  5662.       9        = Heavy 
  5663.       10       = Black 
  5664.       11       = Nord 
  5665.  
  5666.    4. Proportion (10 variations) 
  5667.  
  5668.       0        = Any 
  5669.       1        = No Fit 
  5670.       2        = Old Style 
  5671.       3        = Modern 
  5672.       4        = Even Width 
  5673.       5        = Expanded 
  5674.       6        = Condensed 
  5675.       7        = Very Expanded 
  5676.       8        = Very Condensed 
  5677.       9        = Monospaced 
  5678.  
  5679.    5. Contrast (10 variations) 
  5680.  
  5681.       0        = Any 
  5682.       1        = No Fit 
  5683.       2        = None 
  5684.       3        = Very Low 
  5685.       4        = Low 
  5686.       5        = Medium Low 
  5687.       6        = Medium 
  5688.       7        = Medium High 
  5689.       8        = High 
  5690.       9        = Very High 
  5691.  
  5692.    6. Stroke Variation (9 variations) 
  5693.  
  5694.       0        = Any 
  5695.       1        = No Fit 
  5696.       2        = Gradual/Diagonal 
  5697.       3        = Gradual/Transitional 
  5698.       4        = Gradual/Vertical 
  5699.       5        = Gradual/Horizontal 
  5700.       6        = Rapid/Vertical 
  5701.       7        = Rapid/Horizontal 
  5702.       8        = Instant/Vertical 
  5703.  
  5704.    7. Arm Style (12 variations) 
  5705.  
  5706.       0        = Any 
  5707.       1        = No Fit 
  5708.       2        = Straight Arms/Horizontal 
  5709.       3        = Straight Arms/Wedge 
  5710.       4        = Straight Arms/Vertical 
  5711.       5        = Straight Arms/Single Serif 
  5712.       6        = Straight Arms/Double Serif 
  5713.       7        = Non-Straight Arms/Horizontal 
  5714.       8        = Non-Straight Arms/Wedge 
  5715.       9        = Non-Straight Arms/Vertical 
  5716.       10       = Non-Straight Arms/Single Serif 
  5717.       11       = Non-Straight Arms/Double Serif 
  5718.  
  5719.    8. Letterform (16 variations) 
  5720.  
  5721.       0        = Any 
  5722.       1        = No Fit 
  5723.       2        = Normal/Contact 
  5724.       3        = Normal/Weighted 
  5725.       4        = Normal/Boxed 
  5726.       5        = Normal/Flattened 
  5727.       6        = Normal/Rounded 
  5728.       7        = Normal/Off Center 
  5729.       8        = Normal/Square 
  5730.       9        = Oblique/Contact 
  5731.       10       = Oblique/Weighted 
  5732.       11       = Oblique/Boxed 
  5733.       12       = Oblique/Flattened 
  5734.       13       = Oblique/Rounded 
  5735.       14       = Oblique/Off Center 
  5736.       15       = Oblique/Square 
  5737.  
  5738.    9. Midline (14 variations) 
  5739.  
  5740.       0        = Any 
  5741.       1        = No Fit 
  5742.       2        = Standard/Trimmed 
  5743.       3        = Standard/Pointed 
  5744.       4        = Standard/Serifed 
  5745.       5        = High/Trimmed 
  5746.       6        = High/Pointed 
  5747.       7        = High/Serifed 
  5748.       8        = Constant/Trimmed 
  5749.       9        = Constant/Pointed 
  5750.       10       = Constant/Serifed 
  5751.       11       = Low/Trimmed 
  5752.       12       = Low/Pointed 
  5753.       13       = Low/Serifed 
  5754.  
  5755.   10. X-height (8 variations) 
  5756.  
  5757.       0        = Any 
  5758.       1        = No Fit 
  5759.       2        = Constant/Small 
  5760.       3        = Constant/Standard 
  5761.       4        = Constant/Large 
  5762.       5        = Ducking/Small 
  5763.       6        = Ducking/Standard 
  5764.       7        = Ducking/Large 
  5765.  
  5766.  When using the PANOSE number to match fonts, the ordering of the PANOSE digit 
  5767.  is the key to finding the closest match. The most significant digit is the 
  5768.  first digit, and the least significant digit is number ten. To find matches, 
  5769.  the digits need to be compared, in the order given. A font mapper may want to 
  5770.  change the precedence of the digits, to give higher weightings to other font 
  5771.  features. 
  5772.  
  5773.  
  5774. ΓòÉΓòÉΓòÉ 4.3.5. Font Directory ΓòÉΓòÉΓòÉ
  5775.  
  5776. This section describes the directory section of a font resource. A font 
  5777. resource contains a directory consisting of a set of structures each containing 
  5778. the metrics of a font and a pointer to the font itself. This font directory is 
  5779. generated by the resource compiler. 
  5780.  
  5781. The format of the font directory is: 
  5782.  
  5783. typedef struct {
  5784.         USHORT      usHeaderSize;
  5785.         USHORT      usnFonts;
  5786.         USHORT      usiMETRICS;
  5787.         FONTENTRY   fntEntry[1];
  5788. } FONTDIRECTORY;
  5789.  
  5790. typedef struct {
  5791.         USHORT          usIndex;
  5792.         FONTFILEMETRICS metrics;
  5793. } FONTENTRY;
  5794.  
  5795. Where: 
  5796.  
  5797.  usHeaderSize  The size of the header, in bytes. 
  5798.  
  5799.  usnFonts      The number of fonts in the resource. 
  5800.  
  5801.  usiMetrics    The size of the FOCAMETRICS structures that follow the header. 
  5802.                Note that the set of metrics for all the fonts in the resource 
  5803.                follow the header. 
  5804.  
  5805.  usIndex       The index of a particular font; an identifier assigned to the 
  5806.                font when the resource was created (defined in the .RC file). 
  5807.  
  5808.  metrics       The font metrics structure for the font. This is identical to a 
  5809.                FOCAMETRICS structure with the addition of the PANOSE fields to 
  5810.                the end. 
  5811.  
  5812.  
  5813. ΓòÉΓòÉΓòÉ 4.3.6. Definitions of Terms Used When Describing Fonts ΓòÉΓòÉΓòÉ
  5814.  
  5815.  a-space, b-space, c-space - The a-space is the distance from the left of the 
  5816.    character frame to the left edge of the character. The b-space is the width 
  5817.    of the character. The c-space is the distance from the right edge of the 
  5818.    character to the right of the character frame. Negative values of a and c 
  5819.    allow adjacent character frames to overlap. See also character increment, 
  5820.    and space default values. 
  5821.  
  5822.  average char width - The average horizontal distance from the left edge of one 
  5823.    character to the left edge of the next. Contrast with max char increment. 
  5824.  
  5825.  baseline - The line on which the bottom of a character rests, and below which 
  5826.    a descender extends. 
  5827.  
  5828.  beak char code point - The code point of the space or break character. 
  5829.    Contrast with default char code point, first char code point, and last char 
  5830.    code point. 
  5831.  
  5832.  character increment - A set of three values (a-space, b-space, and c-space) 
  5833.    that define the proportions of a character. The sum of the three values 
  5834.    (a+b+c) specifies only one value for the entire character increment. See 
  5835.    also font width and space default values. 
  5836.  
  5837.  character rotation - The angle by which each character is rotated around its 
  5838.    own center, increasing clockwise from vertical. Contrast with character 
  5839.    slope and inline direction. 
  5840.  
  5841.  character slope - The angle by which a character is slanted, increasing 
  5842.    clockwise from vertical. Contrast with character rotation and inline 
  5843.    direction. 
  5844.  
  5845.  default char code point - The code point of the character to be used if a code 
  5846.    point outside the range of a font is passed to an application using that 
  5847.    font. Contrast with break char code point, first char code point, and last 
  5848.    char code point. 
  5849.  
  5850.  em height - The maximum distance above the baseline reached by an uppercase 
  5851.    symbol.  Contrast with x height. 
  5852.  
  5853.  external leading - The vertical distance from the bottom of one character to 
  5854.    the top of the character below it. Contrast with internal leading and max 
  5855.    baseline extent. 
  5856.  
  5857.  first char code point - The code point of the first character. All numbers 
  5858.    between the first char code point and the last char code point must 
  5859.    represent a character in the font. Contrast with break char code point, 
  5860.    default char code point, and last char code point. 
  5861.  
  5862.  fixed spacing - The same amount of space separates each character. Contrast 
  5863.    with proportional spacing. 
  5864.  
  5865.  font weight - The line-thickness of a character relative to its size. Contrast 
  5866.    with font width. 
  5867.  
  5868.  font width - The relative width of a character to its height; condensed fonts 
  5869.    are very narrow while expanded fonts are very wide. See also character 
  5870.    increment. Contrast with font weight. 
  5871.  
  5872.  inline direction - The angle of a line of type, increasing clockwise from 
  5873.    horizontal. Contrast with character rotation and character slope. 
  5874.  
  5875.  internal leading - The vertical distance from the top or bottom of a character 
  5876.    to any accent marks that may appear with it. Contrast with external leading. 
  5877.  
  5878.  last char code point - The code point of the last character. All numbers 
  5879.    between the first char code point and the last char code point must 
  5880.    represent a character in the font. Contrast with break char code point, 
  5881.    default char code point, and first char code point. 
  5882.  
  5883.  lowercase ascent - The maximum distance above the baseline reached by any part 
  5884.    of any lowercase character. Contrast with maximum ascender and x height. 
  5885.  
  5886.  lowercase descent - The maximum distance below the baseline reached by any 
  5887.    part of any lowercase character. Contrast with maximum descender. 
  5888.  
  5889.  max baseline extent - The maximum space occupied by the font (typically, the 
  5890.    sum of the maximum ascender and maximum descender). Contrast with external 
  5891.    leading and max char increment. 
  5892.  
  5893.  max char increment - The maximum horizontal distance from the left edge of one 
  5894.    character to the left edge of the next character to the right. Contrast with 
  5895.    average char width and max baseline extent. 
  5896.  
  5897.  maximum ascender - The maximum distance that any part of any character may 
  5898.    extend above the x height of a font. Contrast with lowercase ascent and 
  5899.    maximum descender. 
  5900.  
  5901.  maximum descender - The maximum distance that any part of any character may 
  5902.    extend below the x height of a font. Contrast with lowercase descent and 
  5903.    maximum ascender. 
  5904.  
  5905.  maximum vert point size - The maximum vertical dimensions to which a font can 
  5906.    be resized. Contrast with minimum vert point size and nominal vert point 
  5907.    size. 
  5908.  
  5909.  minimum vert point size - The minimum vertical dimensions to which a font can 
  5910.    be resized. Contrast with maximum vert point size and nominal vert point 
  5911.    size. 
  5912.  
  5913.  nominal vert point size - The normal display size of a font. Contrast with 
  5914.    maximum vert point size and minimum vert point size. 
  5915.  
  5916.  pel - The smallest element of a display surface that can be independently 
  5917.    assigned color and density. 
  5918.  
  5919.  point - Printer's unit of measurement. There are 72 points to an inch 
  5920.    (approximately 3.5 points to a millimeter). 
  5921.  
  5922.  proportional spacing - The space that each character occupies is in proportion 
  5923.    to its width. See also font width. Contrast with fixed spacing. 
  5924.  
  5925.  Registry ID - A code number that Presentation Manager uses to register a font 
  5926.    file as a resource. 
  5927.  
  5928.  space default values - Values that specify the space to be left between 
  5929.    characters. Once defined, they are used for the entire font, and do not have 
  5930.    to be specified for each character. However, they can be changed for 
  5931.    characters that require more or less spacing than the defaults provide, by 
  5932.    giving values for the a Space and the c Space. See also character increment. 
  5933.  
  5934.  strikeout position - The distance of the strikeout character above the 
  5935.    baseline (in pels). See also strikeout size and underscore position. 
  5936.  
  5937.  strikeout size - The size of the strikeout character (in points). See also 
  5938.    strikeout position and underscore size. 
  5939.  
  5940.  subscript position - The distance of a subscript character of a font below the 
  5941.    baseline (in pels). See also subscript size and superscript position. 
  5942.  
  5943.  subscript size - The size of a subscript character (in points). See also 
  5944.    subscript position and superscript size. 
  5945.  
  5946.  superscript position - The distance of a superscript character above the 
  5947.    baseline (in pels). See also subscript position and superscript size. 
  5948.  
  5949.  superscript size - The size of a superscript character (in points). See also 
  5950.    subscript size and superscript position. 
  5951.  
  5952.  target dev resolution X - The number of pels per inch in the horizontal axis 
  5953.    of a display device on which a font is to be displayed. Contrast with target 
  5954.    dev resolution Y. 
  5955.  
  5956.  target dev resolution Y - The number of pels per inch in the vertical axis of 
  5957.    a display device on which a font is to be displayed. Contrast with target 
  5958.    dev resolution X. 
  5959.  
  5960.  underscore position - The distance in pels of the first underscore stroke from 
  5961.    the baseline of a font. Successive strokes below this create a heavier 
  5962.    underscore. See also strikeout position and underscore size. 
  5963.  
  5964.  underscore size - The size of the underscore character measured in single 
  5965.    strikeout strokes. See also strikeout size and underscore position. 
  5966.  
  5967.  x height - The maximum distance above the baseline reached by a lowercase 
  5968.    character. Contrast with em height and lowercase ascent. 
  5969.  
  5970.  
  5971. ΓòÉΓòÉΓòÉ 5. Graphics Attributes ΓòÉΓòÉΓòÉ
  5972.  
  5973. Every graphics presentation space has a set of graphics attributes. A normal 
  5974. presentation space has a larger set of graphics attributes than a micro or 
  5975. cached micro presentation space. (Segment-related attributes, for example, do 
  5976. not apply in micro presentation spaces.) These attributes all have default 
  5977. values, which means that they always have an effect on graphics, even if you 
  5978. have not explicitly specified their values. The attributes can be broken into 
  5979. two general groups. The first group comprises those attributes that form a part 
  5980. of the picture and that can vary as the picture is drawn. These are: 
  5981.  
  5982.      All primitive attributes 
  5983.      The segment attributes 
  5984.      The primitive tag 
  5985.      The current position 
  5986.      The viewing window 
  5987.      The clipping path 
  5988.      The model and segment transformations 
  5989.      The viewing transformation. 
  5990.  
  5991.  With the exception of the segment attributes and the viewing transformation, 
  5992.  these attributes are reset to their default values at the start of a root 
  5993.  segment, unless the fast-chaining attribute is set. If the fast-chaining 
  5994.  attribute is set, their values cannot be guaranteed. You should, therefore, 
  5995.  explicitly set any attribute values required in the segment. Similarly, the 
  5996.  values of these attributes cannot be guaranteed following a call to: 
  5997.  
  5998.       Any GpiDraw... function 
  5999.       Any GpiCorrelate... function 
  6000.       GpiCallSegmentMatrix 
  6001.       GpiCloseSegment 
  6002.  
  6003.  Therefore, if any of these functions is followed by primitives outside a 
  6004.  segment, you should explicitly set required attribute values. When 
  6005.  GpiCloseSegment is followed by GpiOpenSegment (and also between any two 
  6006.  segments in the chain), the fast-chaining attribute determines what happens to 
  6007.  the current values of these attributes. The viewing transformation and the 
  6008.  segment attributes are unaffected by fast-chaining. 
  6009.  
  6010.  These attributes take effect when graphics are sent to an output device, not 
  6011.  when graphics are defined. For this reason, the calls to GpiQuery... that 
  6012.  retrieve the current values of these attributes are invalid in retain mode. 
  6013.  The majority of the group-one attribute-setting functions cause graphics 
  6014.  orders to be added to the current segment. 
  6015.  
  6016.  The second group of attributes defines the environment in which the picture is 
  6017.  drawn. These attributes do not normally vary as the picture is drawn, but have 
  6018.  an overall effect on the result of any drawing or correlation operation. This 
  6019.  group includes: 
  6020.  
  6021.      The default viewing transformation 
  6022.      The page viewport 
  6023.      The graphics field 
  6024.      The clipping region 
  6025.      The pick-aperture size 
  6026.      The drawing controls. 
  6027.  
  6028.  The functions to GpiQuery... that retrieve the current values of these 
  6029.  attribute are valid in all drawing modes. None of the group-two 
  6030.  attribute-setting functions causes graphics orders to be added to the current 
  6031.  segment. 
  6032.  
  6033.  The following table lists the graphics attributes, identifies the GPI function 
  6034.  or functions that you use to change current settings, and lists the default 
  6035.  value of each one. Note that these default values are the initial settings. 
  6036.  The table also indicates whether the attribute is a group-one or a group-two 
  6037.  attribute. 
  6038.  
  6039.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  6040.   ΓöéGraphics      ΓöéGPI Function                  ΓöéDefault Value                ΓöéGroupΓöéGroupΓöé
  6041.   ΓöéAttribute     Γöé                              Γöé                             ΓöéOne  ΓöéTwo  Γöé
  6042.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6043.   ΓöéArc parametersΓöéGpiSetArcParams               Γöé(1,1,0,0)                    ΓöéYes  Γöé     Γöé
  6044.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6045.   ΓöéForeground    ΓöéGpiSetColor(1)                ΓöéCLR_DEFAULT                  ΓöéYes  Γöé     Γöé
  6046.   Γöécolor         Γöé                              Γöé(device-dependent)           Γöé     Γöé     Γöé
  6047.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6048.   ΓöéForeground mixΓöéGpiSetMix(1)                  ΓöéFM_DEFAULT (overpaint)       ΓöéYes  Γöé     Γöé
  6049.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6050.   ΓöéBackground    ΓöéGpiSetBackColor(1)            ΓöéCLR_DEFAULT                  ΓöéYes  Γöé     Γöé
  6051.   Γöécolor         Γöé                              Γöé(device-dependent)           Γöé     Γöé     Γöé
  6052.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6053.   ΓöéBackground mixΓöéGpiSetBackMix(1)              ΓöéBM_DEFAULT (leave-alone)     ΓöéYes  Γöé     Γöé
  6054.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6055.   ΓöéCharacter     ΓöéGpiSetCharAngle(1)            Γöé(1,0)                        ΓöéYes  Γöé     Γöé
  6056.   Γöéangle         Γöé                              Γöé                             Γöé     Γöé     Γöé
  6057.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6058.   ΓöéCharacter box ΓöéGpiSetCharBox(1)              ΓöéDevice-dependent             ΓöéYes  Γöé     Γöé
  6059.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6060.   ΓöéCharacter     ΓöéGpiSetCharDirection(1)        ΓöéCHDIRN_DEFAULT (left to      ΓöéYes  Γöé     Γöé
  6061.   ΓöéDirection     Γöé                              Γöéright)                       Γöé     Γöé     Γöé
  6062.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6063.   ΓöéCharacter modeΓöéGpiSetCharMode(1)             ΓöéCM_DEFAULT (mode 1)          ΓöéYes  Γöé     Γöé
  6064.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6065.   ΓöéCharacter set ΓöéGpiSetCharSet(1)              ΓöéLCID_DEFAULT (system font)   ΓöéYes  Γöé     Γöé
  6066.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6067.   ΓöéCharacter     ΓöéGpiSetCharShear(1)            Γöé(0,1)                        ΓöéYes  Γöé     Γöé
  6068.   Γöéshear         Γöé                              Γöé                             Γöé     Γöé     Γöé
  6069.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6070.   ΓöéLine end      ΓöéGpiSetLineEnd(1)              ΓöéLINEEND_DEFAULT (flat)       ΓöéYes  Γöé     Γöé
  6071.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6072.   ΓöéLine join     ΓöéGpiSetLineJoin(1)             ΓöéLINEJOIN_DEFAULT (beveled)   ΓöéYes  Γöé     Γöé
  6073.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6074.   ΓöéLine type     ΓöéGpiSetLineType(1)             ΓöéLINETYPE_DEFAULT (solid)     ΓöéYes  Γöé     Γöé
  6075.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6076.   ΓöéLine width    ΓöéGpiSetLineWidth(1)            ΓöéLINEWIDTH_DEFAULT (1.0)      ΓöéYes  Γöé     Γöé
  6077.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6078.   ΓöéGeometric lineΓöéGpiSetLineWidthGeom(1)        Γöé1                            ΓöéYes  Γöé     Γöé
  6079.   Γöéwidth         Γöé                              Γöé                             Γöé     Γöé     Γöé
  6080.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6081.   ΓöéMarker        ΓöéGpiSetMarker(1)               ΓöéMARKSYM_DEFAULT (cross)      ΓöéYes  Γöé     Γöé
  6082.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6083.   ΓöéMarker box    ΓöéGpiSetMarkerBox(1)            ΓöéDevice-dependent             ΓöéYes  Γöé     Γöé
  6084.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6085.   ΓöéMarker set    ΓöéGpiSetMarkerSet(1)            ΓöéLCID_DEFAULT (system marker  ΓöéYes  Γöé     Γöé
  6086.   Γöé              Γöé                              Γöéset)                         Γöé     Γöé     Γöé
  6087.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6088.   ΓöéPattern       ΓöéGpiSetPattern(1)              ΓöéPATSYM_DEFAULT (solid)       ΓöéYes  Γöé     Γöé
  6089.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6090.   ΓöéPattern       ΓöéGpiSetPatternRefPoint(1)      Γöé(0,0)                        ΓöéYes  Γöé     Γöé
  6091.   Γöéreference     Γöé                              Γöé                             Γöé     Γöé     Γöé
  6092.   Γöépoint         Γöé                              Γöé                             Γöé     Γöé     Γöé
  6093.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6094.   ΓöéPattern set   ΓöéGpiSetPatternSet(1)           ΓöéLCID_DEFAULT (system pattern ΓöéYes  Γöé     Γöé
  6095.   Γöé              Γöé                              Γöéset)                         Γöé     Γöé     Γöé
  6096.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6097.   ΓöéModel         ΓöéGpiSetModelTransformMatrix    ΓöéIdentity                     ΓöéYes  Γöé     Γöé
  6098.   ΓöétransformationΓöé                              Γöé                             Γöé     Γöé     Γöé
  6099.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6100.   ΓöéInstance      ΓöéGpiCallSegmentMatrix          ΓöéIdentity                     ΓöéYes  Γöé     Γöé
  6101.   ΓöétransformationΓöé                              Γöé                             Γöé     Γöé     Γöé
  6102.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6103.   ΓöéSegment       ΓöéGpiSetSegmentTransformMatrix  ΓöéIdentity                     ΓöéYes  Γöé     Γöé
  6104.   ΓöétransformationΓöé                              Γöé                             Γöé     Γöé     Γöé
  6105.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6106.   ΓöéViewing       ΓöéGpiSetViewingTransformMatrix  ΓöéIdentity                     ΓöéYes  Γöé     Γöé
  6107.   ΓöétransformationΓöé                              Γöé                             Γöé     Γöé     Γöé
  6108.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6109.   ΓöéDefault       ΓöéGpiSetDefaultViewMatrix       ΓöéIdentity                     Γöé     ΓöéYes  Γöé
  6110.   Γöéviewing       Γöé                              Γöé                             Γöé     Γöé     Γöé
  6111.   ΓöétransformationΓöé                              Γöé                             Γöé     Γöé     Γöé
  6112.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6113.   ΓöéPage viewport ΓöéGpiSetPageViewport            ΓöéDevice-dependent             Γöé     ΓöéYes  Γöé
  6114.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6115.   ΓöéClipping path ΓöéGpiSetClipPath                ΓöéNo clipping                  ΓöéYes  Γöé     Γöé
  6116.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6117.   ΓöéViewing windowΓöéGpiSetViewingLimits           ΓöéNo clipping                  ΓöéYes  Γöé     Γöé
  6118.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6119.   ΓöéGraphics fieldΓöéGpiSetGraphicsField           ΓöéNo clipping                  Γöé     ΓöéYes  Γöé
  6120.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6121.   ΓöéClipping      ΓöéGpiSetClipRegion              ΓöéNo clipping                  Γöé     ΓöéYes  Γöé
  6122.   Γöéregion        Γöé                              Γöé                             Γöé     Γöé     Γöé
  6123.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6124.   ΓöéTag           ΓöéGpiSetTag                     Γöé0                            ΓöéYes  Γöé     Γöé
  6125.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6126.   ΓöéSegment       ΓöéGpiSetInitialSegmentAttrs     ΓöéATTR_DETECTABLE      - OFF   ΓöéYes  Γöé     Γöé
  6127.   Γöéattributes    ΓöéGpiSetSegmentAttrs            ΓöéATTR_VISIBLE         - ON    Γöé     Γöé     Γöé
  6128.   Γöé              Γöé                              ΓöéATTR_CHAINED         - ON    Γöé     Γöé     Γöé
  6129.   Γöé              Γöé                              ΓöéATTR_DYNAMIC         - OFF   Γöé     Γöé     Γöé
  6130.   Γöé              Γöé                              ΓöéATTR_FASTCHAIN       - ON    Γöé     Γöé     Γöé
  6131.   Γöé              Γöé                              ΓöéATTR_PROP_DETECTABLE - ON    Γöé     Γöé     Γöé
  6132.   Γöé              Γöé                              ΓöéATTR_PROP_VISIBLE    - ON    Γöé     Γöé     Γöé
  6133.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6134.   ΓöéPick-aperture ΓöéGpiSetPickAperturePosition    ΓöéDevice-dependent             Γöé     ΓöéYes  Γöé
  6135.   Γöésize          Γöé                              Γöé                             Γöé     Γöé     Γöé
  6136.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6137.   ΓöéCurrent       ΓöéGpiSetCurrentPosition GpiMove┬ñΓöé(0,0)                        ΓöéYes  Γöé     Γöé
  6138.   Γöéposition      Γöé                              Γöé                             Γöé     Γöé     Γöé
  6139.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6140.   ΓöéDrawing       ΓöéGpiSetDrawControl             ΓöéDCTL_ERASE     - OFF         Γöé     ΓöéYes  Γöé
  6141.   Γöécontrols      Γöé                              ΓöéDCTL_DISPLAY   - ON          Γöé     Γöé     Γöé
  6142.   Γöé              Γöé                              ΓöéDCTL_BOUNDARY  - OFF         Γöé     Γöé     Γöé
  6143.   Γöé              Γöé                              ΓöéDCTL_DYNAMIC   - OFF         Γöé     Γöé     Γöé
  6144.   Γöé              Γöé                              ΓöéDCTL_CORRELATE - OFF         Γöé     Γöé     Γöé
  6145.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  6146.  
  6147.  Notes: 
  6148.  
  6149.   (1).  Can also be set using GpiSetAttrs.
  6150.   (2).  Is also updated indirectly by most primitive-drawing functions.
  6151.  
  6152.  Each of the following functions causes all group-one and group-two graphics 
  6153.  attributes to be set to their default values: 
  6154.  
  6155.      GpiCreatePS 
  6156.      GpiSetPS 
  6157.      GpiResetPS, if GRES_ALL or GRES_SEGMENTS is specified 
  6158.      WinGetPS 
  6159.      WinGetScreenPS 
  6160.      WinBeginPaint, with a NULL presentation space handle. 
  6161.  
  6162.  In specific circumstances, some of the GPI functions modify the group-one 
  6163.  attributes and thus make their values unpredictable. Therefore, when you call 
  6164.  any of these functions, you should respecify attribute values that have a 
  6165.  particular importance to your application. For example, if the current 
  6166.  foreground color is CLR_RED before you call GpiDrawChain you cannot always 
  6167.  rely on the current color remaining CLR_RED when GpiDrawChain completes. If 
  6168.  you want to continue working in red, respecify the color when GpiDrawChain 
  6169.  completes. In general, the functions that affect group-one-attribute values 
  6170.  are those related to the drawing and correlation of retained graphics, and to 
  6171.  the creation, closing, and deletion of graphics segments. 
  6172.  
  6173.  With the exception of the viewing transformation and the segment attributes, 
  6174.  the default values of these attributes apply to all primitive-drawing that 
  6175.  occurs outside a segment bracket. 
  6176.  
  6177.      The following function sets the group-one attributes to their default 
  6178.       values, and in addition sets the current clipping region and page 
  6179.       viewport to their default values. 
  6180.  
  6181.         -  GpiAssociate. 
  6182.  
  6183.      Each of the following functions makes the group-one-attribute values 
  6184.       unpredictable: 
  6185.  
  6186.         -  GpiCloseSegment 
  6187.         -  GpiCorrelateChain 
  6188.         -  GpiCorrelateFrom 
  6189.         -  GpiCorrelateSegment 
  6190.         -  GpiErase 
  6191.         -  GpiCallSegmentMatrix 
  6192.         -  GpiDrawDynamics 
  6193.         -  GpiRemoveDynamics. 
  6194.  
  6195.            Note:  In the last two functions here, the foreground-mix value is 
  6196.                   always set to FM_XOR, and the background-mix value is always 
  6197.                   set to BM_LEAVEALONE. 
  6198.  
  6199.      Each of the following functions makes group-one-attribute values 
  6200.       unpredictable if a segment to be deleted is open when the function is 
  6201.       called: 
  6202.  
  6203.         -  GpiDeleteSegments 
  6204.         -  GpiDeleteSegment 
  6205.  
  6206.      Each of the following functions makes group-one-attribute values 
  6207.       unpredictable if there is no open segment when the function is called: 
  6208.  
  6209.         -  GpiDrawChain 
  6210.         -  GpiDrawFrom 
  6211.         -  GpiDrawSegment. 
  6212.  
  6213.       If there is an open segment when any of these functions is called, and 
  6214.       that segment was the last one drawn, then group-one-attribute values are 
  6215.       unaffected. If, however, dynamic segments were caused to be redrawn by 
  6216.       the same function, group-one-attribute values are made unpredictable. 
  6217.       This occurs because dynamic segments are always drawn after nondynamic 
  6218.       segments. 
  6219.  
  6220.  
  6221. ΓòÉΓòÉΓòÉ 6. Line and Arc Primitives ΓòÉΓòÉΓòÉ
  6222.  
  6223. Line and arc primitives are graphics building blocks for creating pictures that 
  6224. consist of objects such as polygons, circles, fillets, ellipses, and other 
  6225. geometric figures. 
  6226.  
  6227. The following topics are related to information in this chapter: 
  6228.  
  6229.      Presentation spaces and device contexts 
  6230.      Color and mix attributes 
  6231.      Area primitives 
  6232.  
  6233.  
  6234. ΓòÉΓòÉΓòÉ 6.1. About Line and Arc Primitives ΓòÉΓòÉΓòÉ
  6235.  
  6236. Simple drawing applications use line and arc primitives as drawing tools. They 
  6237. are useful, for example, in spreadsheet applications for constructing pie 
  6238. charts, bar charts, and graphs. 
  6239.  
  6240. Sample Pie Chart Created with Line and Arc Primitives 
  6241.  
  6242. Following are more illustrations that were drawn using line and arc primitives. 
  6243.  
  6244. Sample Bar Graph Created with Line and Arc Primitives 
  6245.  
  6246. Computer-aided-design (CAD) applications combine line and arc primitives to 
  6247. draw such complex pictures as schematic diagrams for electrical wiring, 
  6248. blueprints for building sites, and cross-sectional views of machinery. 
  6249.  
  6250. Sample Blueprint Created with Line and Arc Primitives 
  6251.  
  6252. Line and arc primitives are actually two families of primitives that contain 
  6253. many variations of straight lines and curved lines, respectively. They are 
  6254. presented together in this chapter because all the variations are governed by 
  6255. the attributes found in the data structure LINEBUNDLE. 
  6256.  
  6257. An application draws the line and arc primitives by first calling GpiMove or 
  6258. GpiSetCurrentPosition, either of which sets the current position to a specified 
  6259. starting point. GpiMove ignores the AM_PRESERVE mode, whereas 
  6260. GpiSetCurrentPosition saves the current position if the AM_PRESERVE mode is 
  6261. set. The more sophisticated function, GpiPolyLineDisjoint, contains its own 
  6262. starting point and does not need to be preceded by GpiMove, or 
  6263. GpiSetCurrentPosition. 
  6264.  
  6265. Prior to calling a line or arc function, the current position can be determined 
  6266. with GpiQueryCurrentPosition. 
  6267.  
  6268.  
  6269. ΓòÉΓòÉΓòÉ 6.1.1. Attributes of Line and Arc Primitives ΓòÉΓòÉΓòÉ
  6270.  
  6271. The attributes of the line and arc primitives contained in LINEBUNDLE are: 
  6272.  
  6273.      Line width 
  6274.      Geometric width 
  6275.      Line type 
  6276.      Line end 
  6277.      Line join 
  6278.      Line color 
  6279.      Line mix 
  6280.  
  6281.  The line end and line join attributes apply only to lines drawn in a primitive 
  6282.  called a path. 
  6283.  
  6284.  When an application creates a presentation space, the line and arc attributes 
  6285.  are set to the default values shown in the following table. 
  6286.  
  6287.  Line Attribute Default Values 
  6288.  
  6289.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  6290.   ΓöéAttribute      ΓöéDefault Value ΓöéFunction that Redefines        Γöé
  6291.   Γöé               Γöé              ΓöéAttribute                      Γöé
  6292.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6293.   ΓöéWidth          Γöé1.0           ΓöéGpiSetLineWidth                Γöé
  6294.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6295.   ΓöéGeometric widthΓöéNone          ΓöéGpiSetLineWidthGeom            Γöé
  6296.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6297.   ΓöéType           ΓöéLINETYPE_SOLIDΓöéGpiSetLineType                 Γöé
  6298.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6299.   ΓöéColor          ΓöéCLR_NEUTRAL   ΓöéGpiSetAttrs (LBB_COLOR)        Γöé
  6300.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6301.   ΓöéMix attribute  ΓöéFM_OVERPAINT  ΓöéGpiSetAttrs (LBB_MIX_MODE)     Γöé
  6302.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  6303.  
  6304.  
  6305. ΓòÉΓòÉΓòÉ 6.1.2. Line Width and Geometric Width ΓòÉΓòÉΓòÉ
  6306.  
  6307. The operating system defines two types of lines:  cosmetic and geometric, 
  6308. representing two separate concepts. 
  6309.  
  6310. Cosmetic lines represent the mathematical ideal of a line being an entity with 
  6311. only one dimension-length. When cosmetic lines are drawn, they usually are only 
  6312. one pel wide. 
  6313.  
  6314. The line width attribute provides a visual method of distinguishing different 
  6315. types of lines. For example, on a map, roads might be drawn thicker than 
  6316. railroad tracks. The line width attribute defines a multiplier to be applied to 
  6317. the normal (or default) line width. Your application can determine the cosmetic 
  6318. line width by calling GpiQueryLineWidth. 
  6319.  
  6320. There are certain devices that do not define the thickness of cosmetic lines in 
  6321. terms of a number of pels. The PM interface interprets the specified width for 
  6322. these devices as shown in the following table: 
  6323.  
  6324. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  6325. ΓöéIdentifer           ΓöéDescription                             Γöé
  6326. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6327. ΓöéLINEWIDTH_DEFAULT   ΓöéThe default width for the device.       Γöé
  6328. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6329. ΓöéLINEWIDTH_NORMAL    ΓöéThe line width equivalent to a          Γöé
  6330. Γöé                    Γöémultiplier of 1.  Identical to          Γöé
  6331. Γöé                    ΓöéLINEWIDTH_DEFAULT unless changed with   Γöé
  6332. Γöé                    ΓöéGpiSetDefAttrs.                         Γöé
  6333. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6334. ΓöéLINEWIDTH_THICK     ΓöéThe line width equivalent to a          Γöé
  6335. Γöé                    Γöémultiplier greater than 1.              Γöé
  6336. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  6337.  
  6338. Your application can set the cosmetic line width with either a multiplier or an 
  6339. identifier value using GpiSetLineWidth. Since the line represents a widthless 
  6340. ideal, the actual drawn width is a fixed value. The line width remains 
  6341. unchanged when you increase the size of, or zoom in on, a graphics object. The 
  6342. cosmetic line width is not subject to transformations. 
  6343.  
  6344. In contrast, geometric lines represent an area whose thickness is equal to the 
  6345. specified line width. Geometric lines are subject to changes in scale through 
  6346. transformations, in the same manner as geometric figures. 
  6347.  
  6348. The width of a geometric line does not have a default value. Width is treated 
  6349. as a line attribute for programming convenience, but it actually is a geometric 
  6350. property. A line width is set with GpiSetLineWidthGeom. If a width is already 
  6351. specified, that width can be determined with GpiQueryLineWidthGeom. 
  6352.  
  6353. To use geometric line width, the lines are assembled into a path. When you use 
  6354. a path to define wide lines, you can specify the following: 
  6355.  
  6356.      Geometric width for the lines, using the geometric line width attribute 
  6357.      Style of the line ends, using the line end attribute 
  6358.      Style of the junctions of the lines, using the line join attribute 
  6359.  
  6360.  These three attributes apply only to geometric lines drawn using paths. 
  6361.  
  6362.  
  6363. ΓòÉΓòÉΓòÉ 6.1.3. Line Types ΓòÉΓòÉΓòÉ
  6364.  
  6365. Line type, also called line style, defines the way a line or arc is drawn:  as 
  6366. a solid line, a series of dashes, a series of dots, or a combination of dashes 
  6367. and dots. 
  6368.  
  6369. The line type for all subsequent line primitives is selected using 
  6370. GpiSetLineType. If you want to change the line type to LINETYPE_DOT, for 
  6371. example, any line or arc primitive subsequently drawn is drawn as a dotted 
  6372. line. The following table illustrates the nine standard line types provided by 
  6373. PM. 
  6374.  
  6375. You cannot define other line types for PM applications. 
  6376.  
  6377. Standard Line Types 
  6378.  
  6379. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  6380. ΓöéType                    ΓöéIdentifer               ΓöéLong Value  Γöé
  6381. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6382. ΓöéDotted line             ΓöéLINETYPE_DOT            Γöé1L          Γöé
  6383. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6384. ΓöéShort-dashed line       ΓöéLINETYPE_SHORTDASH      Γöé2L          Γöé
  6385. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6386. ΓöéDash-dot line           ΓöéLINETYPE_DASHDOT        Γöé3L          Γöé
  6387. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6388. ΓöéDouble-dotted line      ΓöéLINETYPE_DOUBLEDOT      Γöé4L          Γöé
  6389. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6390. ΓöéLong-dashed line        ΓöéLINETYPE_LONGDASH       Γöé5L          Γöé
  6391. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6392. ΓöéDash-double-dot line    ΓöéLINETYPE_DASHDOUBLEDOT  Γöé6L          Γöé
  6393. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6394. ΓöéSolid line              ΓöéLINETYPE_SOLID          Γöé7L          Γöé
  6395. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6396. ΓöéInvisible line          ΓöéLINETYPE_INVISIBLE      Γöé8L          Γöé
  6397. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6398. ΓöéAlternate pels on       ΓöéLINETYPE_ALTERNATE      Γöé9L          Γöé
  6399. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  6400.  
  6401. The default line type (LINETYPE_DEFAULT) is identical to the LINETYPE_SOLID 
  6402. type, and has a long value of 0L. The error line type (LINETYPE_ERROR) has a 
  6403. long value of -1L. The following figure illustrates the nine line types. Your 
  6404. application can determine the current line type using GpiQueryLineType. 
  6405.  
  6406. The Nine Line Types 
  6407.  
  6408.  
  6409. ΓòÉΓòÉΓòÉ 6.1.4. Line Color and Mix Attributes ΓòÉΓòÉΓòÉ
  6410.  
  6411. The color attribute defines the color used to draw a primitive or an object. 
  6412. The mix attribute determines how the color of a primitive or an object is 
  6413. combined with the color of the drawing surface, or any other objects on the 
  6414. surface. 
  6415.  
  6416. The line color defines the color used to draw the output from any of the 
  6417. operating system's line functions. When a presentation space is created, the 
  6418. line color initial default is black. Unlike certain other primitives, the line 
  6419. and arc primitives do not have a background color. The current color of the 
  6420. drawing surface automatically plays a greater role in the appearance of line 
  6421. and arc primitives than in those primitives that do have a background color. 
  6422. Specifically, when an application draws a dotted or dashed line, the color that 
  6423. appears between the dots or dashes is the current drawing-surface color, as 
  6424. shown in the following figure. 
  6425.  
  6426. Line and arc primitives have only a color attribute for the actual line. The 
  6427. mix attribute controls the combination of line color with drawing surface 
  6428. color. 
  6429.  
  6430. Line and Arc Primitives 
  6431.  
  6432. When a presentation space is created, the line mix attribute initial default is 
  6433. FM_OVERPAINT. The overpaint mix attribute specifies that the line color is not 
  6434. modified by the color of the drawing surface. If the line mix attribute is 
  6435. changed, the line color is mixed with colors that are already on the drawing 
  6436. surface. 
  6437.  
  6438. To specify a new color or mix attribute use GpiSetAttrs. This function accepts 
  6439. as input the type of primitive, for example PRIM_LINE, a list of attributes 
  6440. that are to be changed, a list of attributes that are to be set to their 
  6441. default values, and the values for the attributes that are to be changed. 
  6442. GpiSetAttrs is useful for specifying colors and mix attributes just for a 
  6443. specific data structure (for example, the LINEBUNDLE structure). GpiSetAttrs 
  6444. also provides some protection against invalid colors. 
  6445.  
  6446. To determine the current line color and mix attribute, use GpiQueryAttrs. This 
  6447. function accepts as input the primitive type and the attributes in question. It 
  6448. returns as output an array of values for the specifically queried attributes. 
  6449.  
  6450. To reset the default line color and mix attribute, just as with any other 
  6451. attribute specified in the LINEBUNDLE data structure, use GpiSetDefAttrs. This 
  6452. function accepts as input the type of primitive, for example PRIM_LINE, the 
  6453. attributes to be changed, and the values that will become the new default 
  6454. values. The changing of default values is important when working with segments. 
  6455. Changing the default values during a series of drawing functions is not 
  6456. recommended. 
  6457.  
  6458. The line color and mix attribute also can be specified with GpiSetColor and 
  6459. GpiSetMix, respectively. However, those two functions have the disadvantage of 
  6460. specifying the color and mix attribute for all primitive BUNDLE data structures 
  6461. that have a component for foreground color and foreground mix attribute. The 
  6462. queries, GpiQueryColor and GpiQueryMix, determine the color and mix attribute 
  6463. as specified by GpiSetColor and GpiSetMix. If the line color or mix attribute 
  6464. is specified individually, the aforementioned queries can return a value 
  6465. inconsistent with the current line color or mix attribute. 
  6466.  
  6467.  
  6468. ΓòÉΓòÉΓòÉ 6.1.5. Line Primitive Family ΓòÉΓòÉΓòÉ
  6469.  
  6470. The following table describes the three variants of the basic line primitive 
  6471. and the functions that draw them. 
  6472.  
  6473. Functions that Draw Straight Lines 
  6474.  
  6475. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  6476. ΓöéVariants    ΓöéFunction                ΓöéDescription                       Γöé
  6477. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6478. ΓöéLines       ΓöéGpiLine                 ΓöéDraws a single line from the      Γöé
  6479. Γöé            Γöé                        Γöécurrent position to a specified   Γöé
  6480. Γöé            Γöé                        Γöépoint.                            Γöé
  6481. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6482. ΓöéPolylines   ΓöéGpiPolyLine             ΓöéDraws a series of connected lines,Γöé
  6483. Γöé            Γöé                        Γöéfrom the current position through Γöé
  6484. Γöé            Γöé                        Γöésuccessive points.                Γöé
  6485. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6486. Γöé(series of  ΓöéGpiPolyLineDisjoint     ΓöéDraws a series of unconnected     Γöé
  6487. Γöélines)      Γöé                        Γöélines.                            Γöé
  6488. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6489. ΓöéBoxes       ΓöéGpiBox                  ΓöéDraws a rectangular box with one  Γöé
  6490. Γöé            Γöé                        Γöécorner at the current position.   Γöé
  6491. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  6492.  
  6493. When the operating system draws a line, it includes the pels at the starting 
  6494. and ending points of the line. The algorithm used to draw the rest of the line 
  6495. depends on the device driver. For example, a driver for a raster device might 
  6496. use a modified Bresenham algorithm to draw a line, but a driver for a vector 
  6497. device, such as a plotter, simply would connect the starting and ending points 
  6498. of the line. In all cases, the result is a line primitive that looks the same 
  6499. from device to device. 
  6500.  
  6501.  
  6502. ΓòÉΓòÉΓòÉ 6.1.5.1. Lines ΓòÉΓòÉΓòÉ
  6503.  
  6504. GpiLine draws a line from the current position to a specified end point, as 
  6505. shown in the following figure. After drawing the line, the current position is 
  6506. at the end point specified by GpiLine. 
  6507.  
  6508. GpiLine 
  6509.  
  6510. The current position is (4,3), and the specified end point of GpiLine is (9,7). 
  6511. When the line has been drawn, (9,7) becomes the current position. 
  6512.  
  6513. To draw a single point, you can use GpiLine with an end point identical to the 
  6514. current position, as shown in the following figure. The current position can be 
  6515. determined using GpiQueryCurrentPosition. 
  6516.  
  6517. GpiLine Used to Draw a Single Point 
  6518.  
  6519.  
  6520. ΓòÉΓòÉΓòÉ 6.1.5.2. Polylines ΓòÉΓòÉΓòÉ
  6521.  
  6522. GpiPolyLine draws a sequence of connected lines, starting at the current 
  6523. position and passing through a series of specified coordinate positions, as 
  6524. shown in the following figure. After drawing the series of lines, the current 
  6525. position is at the end point of the last line specified by GpiPolyLine. 
  6526.  
  6527. If you are drawing a graph that has five connected lines, you can use 
  6528. GpiPolyLine once rather than GpiLine five times. GpiPolyLine accepts as input a 
  6529. number of points and an array of point coordinates. 
  6530.  
  6531. GpiPolyLine 
  6532.  
  6533. The starting position is (2,2), and the polyline is drawn through (4,4), (6,4), 
  6534. (8,6), and (10,3).  The new current position is (10,3). 
  6535.  
  6536. GpiPolyLineDisjoint is a new function that eliminates having to use a series of 
  6537. GpiMove and GpiLine functions to draw multiple lines that are not connected. 
  6538. GpiPolyLineDisjoint accepts as input an even number, the number of points, and 
  6539. an array of point coordinates. The first point in a point-pair is the starting 
  6540. point; the second, the end point of that line segment. Upon completion, the end 
  6541. point of the final line becomes the current position. The following figure 
  6542. shows the results of a GpiPolyLineDisjoint call. 
  6543.  
  6544. GpiPolyLineDisjoint 
  6545.  
  6546. A graph with discontinuities. 
  6547.  
  6548.  
  6549. ΓòÉΓòÉΓòÉ 6.1.5.3. Boxes ΓòÉΓòÉΓòÉ
  6550.  
  6551. At its simplest, GpiBox draws a rectangular box with one corner at the current 
  6552. position and the diagonally-opposite corner at a position that you specify. The 
  6553. sides of the box are parallel to the x- and y-axes. Like GpiPolyLine, GpiBox 
  6554. lets you draw a number of connected lines using a single function rather than 
  6555. four separate GpiLine, functions. The current position is unchanged by GpiBox. 
  6556.  
  6557. Note:  The start and end position of any closed shape are always the same. 
  6558. Therefore the current position is unchanged after drawing a closed figure. The 
  6559. GpiBox primitive is shown in the following figure. 
  6560.  
  6561. The Box 
  6562.  
  6563. The current position is (3,2) and the corner position is at (8,6).  When the 
  6564. box has been drawn, the current position remains at (3,2). 
  6565.  
  6566. In addition to the corner position, GpiBox accepts as input an option for 
  6567. rounded corners and for filled interior. The PM programming interface rounds 
  6568. the corners of a box by drawing an elliptical section in place of the square 
  6569. corner. Two GpiBox parameters, IHRound and IVRound, represent the horizontal 
  6570. and vertical length of the full axis of the ellipse used to round each corner. 
  6571. If the two values are equal, a quarter-circle is used for the rounding. If the 
  6572. two values are 0, no rounding is performed. The following figure shows an 
  6573. example of rounding corners using a quarter-circle. Quarter-Circle Box-Corner 
  6574. Rounding 
  6575.  
  6576. The current position is (20,20). GpiBox is called with a corner position of 
  6577. (65,60) and an identical vertical and horizontal rounding value of 26. 
  6578.  
  6579. The following figure shows the complete result. The intermediate steps are not 
  6580. visible to the user of your application. 
  6581.  
  6582. Box with Rounded Corners 
  6583.  
  6584. All four corners are rounded with identical values. 
  6585.  
  6586. Since GpiBox can be used to define a closed figure, it also accepts as input a 
  6587. long value signifying a filled interior. The long value lControl can be any of 
  6588. the following: 
  6589.  
  6590.  Value               Description 
  6591.  
  6592.  DRO_OUTLINE         Draw the box only. 
  6593.  
  6594.  DRO_FILL            Fill the box interior only. 
  6595.  
  6596.  DRO_OUTLINEFILL     Draw the box and fill its interior. 
  6597.  
  6598.  The pattern that fills the interior and other drawing options are controlled 
  6599.  by the data structure AREABUNDLE. GpiFullArc is the only other line and arc 
  6600.  primitive that can be used to define a closed figure. 
  6601.  
  6602.  
  6603. ΓòÉΓòÉΓòÉ 6.1.6. Attributes of Arc Primitives ΓòÉΓòÉΓòÉ
  6604.  
  6605. The arc primitive shares width, type, and color and mix attributes with line 
  6606. primitives. For example, if you use GpiSetLineType to change the line type to 
  6607. LINETYPE_DASHDOT, all subsequent arcs are drawn with a dash-dot line. In 
  6608. addition to the line attributes defined in the LINEBUNDLE data structure, arc 
  6609. primitives in the simple-arc family are influenced by the values in the 
  6610. ARCPARAMS data structure. Arc primitives in the multiple-arc family have a 
  6611. different method of construction and are not influenced by ARCPARAMS. 
  6612.  
  6613. In terms of geometrical pictures, the simple arcs contain full or partial: 
  6614.  
  6615.  Circles        Closed curves whose center is equidistant from every point on 
  6616.                 the curve. 
  6617.  
  6618.  Ellipses       Closed curves defined by two fixed points such that the sum of 
  6619.                 the distances from any point on the curve to the two fixed 
  6620.                 points is constant. 
  6621.  
  6622.  Multiple arcs contain: 
  6623.  
  6624.  Fillets        Curves that are tangential to the two lines defined by three 
  6625.                 control points. 
  6626.  
  6627.  Splines        Curves that, given four control points, are tangent to the 
  6628.                 first and last of three intersecting lines. 
  6629.  
  6630.  There are three simple arc operations that begin with a unit circle that lies 
  6631.  at the origin of world coordinate space. This unit circle defines the current 
  6632.  arc on which subsequent full, partial, and 3-point arcs are based. Your 
  6633.  application can define the following attributes of the current arc with 
  6634.  GpiSetArcParams: 
  6635.  
  6636.      Shape 
  6637.      Orientation 
  6638.      Size 
  6639.      Drawing direction 
  6640.  
  6641.  GpiSetArcParams accepts as input an ARCPARAMS data structure that has four 
  6642.  parameters (p, q, r, and s). Of the four: 
  6643.  
  6644.      p scales in the x-direction 
  6645.      q scales in the y-direction 
  6646.      r and s are shear components 
  6647.  
  6648.  The mathematical origins of the parameters are illustrated in the following 
  6649.  figure. 
  6650.  
  6651.  The ARCPARAMS Values in World Coordinates 
  6652.  
  6653.  The values were derived from the major and minor axis of an ellipse. 
  6654.  
  6655.  An application can determine the current arc parameters with 
  6656.  GpiSetDefArcParams which copies the current arc parameters to their 
  6657.  corresponding fields in the supplied ARCPARAMS structure. The application can 
  6658.  set the arc parameters with GpiSetArcParams. This function accepts as input a 
  6659.  copy of the ARCPARAMS structure that contains the new arc parameters. The 
  6660.  default values of p, q, r, and s, unless changed by GpiSetArcParams, define a 
  6661.  unit circle: 
  6662.  
  6663.      p and q are 1 
  6664.      r and s are 0. 
  6665.  
  6666.  The arc parameters define a transformation that is applied to each point on 
  6667.  the perimeter of the unit circle. For any point (x,y) on the perimeter of the 
  6668.  unit circle, there exists a new point (x',y'), as determined by the following 
  6669.  two linear equations: 
  6670.  
  6671.   x' = p x x + r x y
  6672.   y' = s x x + q x y
  6673.  
  6674.  These parameters form a 2-by-2 matrix, 
  6675.  
  6676.  
  6677.   Γöî      ΓöÉ
  6678.   Γöé p  r Γöé
  6679.   Γöé s  q Γöé
  6680.   Γöö      Γöÿ
  6681.  
  6682.  that scales and shears simple arcs. 
  6683.  
  6684.  This transformation matrix is not related to the general transformation 
  6685.  functions that move objects through coordinate spaces. It is a special purpose 
  6686.  matrix that transforms the shape and size of the imaginary unit circle. The 
  6687.  transformed unit circle, also called the current arc, is then used to define 
  6688.  the shape and size of the simple arc functions in world coordinates. 
  6689.  
  6690.  After an arc has been described in world coordinates, it can be transformed 
  6691.  with the transformation functions, just as any other primitive can. 
  6692.  
  6693.  A transformation is orthogonal when: 
  6694.  
  6695.   (p x r) + (s x q) = 0
  6696.  
  6697.  If orthogonal, the line from the origin (0,0) to the point (p,s) is either: 
  6698.  
  6699.      The radius of a circle 
  6700.      Half the major or minor axis of an ellipse; 
  6701.  
  6702.  and, the line from the origin to the point (r,q) is either: 
  6703.  
  6704.      The radius of a circle 
  6705.      Half the minor or major axis of an ellipse. 
  6706.  
  6707.  An orthogonal transformation does not guarantee that the shape of an object as 
  6708.  defined by an application will be the same as the shape of the object on the 
  6709.  output device. For example, if the page units in the application are PU_PELS, 
  6710.  and the pels on the device are rectangular (but not square), calling 
  6711.  GpiFullArc produces an ellipse-not a circle- even when the arc parameters are 
  6712.  set to their default values. 
  6713.  
  6714.  The product of the 2-by-2 matrix multiplication influences the direction of 
  6715.  any arc based on the current arc, except a 3-point arc. The following table 
  6716.  illustrates this directional influence. 
  6717.  
  6718.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  6719.   ΓöéIf...                         ΓöéGpiFullArc and GpiPartialArc  Γöé
  6720.   Γöé                              Γöé...                           Γöé
  6721.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6722.   Γöé(p x q) is greater than (r x  ΓöéDraw the ellipse              Γöé
  6723.   Γöés)                            Γöécounterclockwise.             Γöé
  6724.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6725.   Γöé(p x q) is less than (r x s)  ΓöéDraw the ellipse clockwise.   Γöé
  6726.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6727.   Γöé(p x q) equals (r x s)        ΓöéDraw a straight line rather   Γöé
  6728.   Γöé                              Γöéthan an ellipse.              Γöé
  6729.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  6730.  
  6731.  
  6732. ΓòÉΓòÉΓòÉ 6.1.7. Simple-Arc Primitive Family ΓòÉΓòÉΓòÉ
  6733.  
  6734. The following table describes the three variants of a simple-arc primitive and 
  6735. the functions that draw them. All are defined, to some extent, by the current 
  6736. arc parameters. As with line primitives, an application draws simple-arcs by 
  6737. first using GpiMove or GpiSetCurrentPosition to set the current position. 
  6738.  
  6739. Functions that Draw Simple Arcs 
  6740.  
  6741. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  6742. ΓöéVariants    ΓöéFunction      ΓöéDescription                       Γöé
  6743. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6744. ΓöéFull arcs   ΓöéGpiFullArc    ΓöéDraws a circle or an ellipse.     Γöé
  6745. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6746. ΓöéPartial arcsΓöéGpiPartialArc ΓöéDraws a straight line followed by Γöé
  6747. Γöé            Γöé              Γöéa section of a circle or ellipse. Γöé
  6748. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6749. Γöé3-point arcsΓöéGpiPointArc   ΓöéDraws an arc through three points.Γöé
  6750. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  6751.  
  6752.  
  6753. ΓòÉΓòÉΓòÉ 6.1.7.1. Full Arcs ΓòÉΓòÉΓòÉ
  6754.  
  6755. GpiFullArc draws a complete circle or ellipse with its center at the current 
  6756. position. The current position remains unchanged. Whether GpiFullArc draws a 
  6757. circle or an ellipse depends on the current arc parameters. When the current 
  6758. arc is a circle, GpiFullArc draws a circle; when it is an ellipse, GpiFullArc 
  6759. draws an ellipse. 
  6760.  
  6761.  
  6762. ΓòÉΓòÉΓòÉ 6.1.7.1.1. Defining an Ellipse ΓòÉΓòÉΓòÉ
  6763.  
  6764.  
  6765. To define an ellipse as the current arc, use GpiSetArcParams where the values 
  6766. (p,s) and (r,q) are the world coordinates of the end points of the major and 
  6767. minor axes of the ellipse. For example, current arc parameters of (18,0) and 
  6768. (0,10) define an ellipse with a major axis of 36 coordinate units and a minor 
  6769. axis of 20 coordinate units. The resultant ellipse is shown in the following 
  6770. figure. 
  6771.  
  6772. The Ellipse 
  6773.  
  6774. For maximum accuracy, create the axes of an ellipse so that they are at 
  6775. right-angles to each other. You can check this by ensuring that the following 
  6776. equation is always true: 
  6777.  
  6778. p x r + s x q = 0 
  6779.  
  6780. So, to check the above example: 
  6781.  
  6782. 0 x 18 + 10 x 0 = 0 
  6783.  
  6784. You also can define a tilted ellipse as the current arc. None of the current 
  6785. arc parameters for a tilted ellipse will be 0, though you should still ensure 
  6786. that the axes of the ellipse are at right-angles to each other. The following 
  6787. figure shows a tilted ellipse defined with current arc parameters of (8,6) and 
  6788. (-3,4). 
  6789.  
  6790. Tilted Ellipse 
  6791.  
  6792.  
  6793. ΓòÉΓòÉΓòÉ 6.1.7.1.2. Defining a Circle ΓòÉΓòÉΓòÉ
  6794.  
  6795.  
  6796. To define a circle as the current arc, (r,q) and (p,s) can be any such value 
  6797. that they lie on a circle. For example, if (r,q) and (p,s) are set to (-4, 3) 
  6798. (3,4), the current arc is a circle with a radius of 5 coordinate units. For 
  6799. simplicity, a circle can be defined by specifying current arc parameters where 
  6800. p is the radius of the circle, and p = q, r = 0, and s = 0. For example, to 
  6801. define a circle centered on the origin and with a radius of 10 world-coordinate 
  6802. units, use GpiSetArcParams with the values (0,10) (10,0). 
  6803.  
  6804. The default values of the current arc parameters are (0,1) (1,0), which define 
  6805. a circle with a radius of one world-coordinate unit (a unit circle). 
  6806.  
  6807. GpiFullArc Input Parameters 
  6808. GpiFullArc accepts as input a multiplier value, so that the size of the full 
  6809. arc is increased or decreased in relation to the current arc. For example, if 
  6810. the current arc parameters define an ellipse whose major axis is 20 coordinate 
  6811. units and whose minor axis is 8 coordinate units, a multiplier of 2 in 
  6812. GpiFullArc creates an ellipse whose major axis is 40 coordinate units and whose 
  6813. minor axis is 16 coordinate units. 
  6814.  
  6815. Because the arc parameters are integers when a fraction is required, for 
  6816. example when rotating an ellipse, greater precision can be obtained by scaling 
  6817. up the required arc parameter values as much as possible, then using a 
  6818. multiplier smaller than 1 to scale the ellipse back down to the required size. 
  6819.  
  6820. With the default arc parameters defining a circle of 1 world coordinate unit, 
  6821. you can draw a circle of any size by allowing the arc parameters to default, 
  6822. then specifying the radius of the circle with the GpiFullArc multiplier. For 
  6823. example, to draw a circle with a radius of 12 coordinate units, call GpiFullArc 
  6824. with a multiplier of 12 and allow the GpiSetArcParams to default. Since 
  6825. GpiFullArc, like GpiBox, can be used to define a closed figure, it also accepts 
  6826. as input a long value signifying a filled interior.  The long value, IControl, 
  6827. can be: 
  6828.  
  6829.  Value               Description 
  6830.  
  6831.  DRO_OUTLINE         Draw the arc only. 
  6832.  
  6833.  DRO_FILL            Fill the arc interior only. 
  6834.  
  6835.  DRO_OUTLINEFILL     Draw the arc and fill its interior. 
  6836.  
  6837.  The pattern that fills the interior and other drawing options are controlled 
  6838.  by the data structure AREABUNDLE. See Area and Polygon Primitives for detailed 
  6839.  information on using areas. 
  6840.  
  6841.  The Full Arc 
  6842.  
  6843.  (a) is a tilted ellipse that is defined by the current arc parameters.  (b) is 
  6844.  drawn using GpiFullArc with: 
  6845.  
  6846.      A multiplier value that reduces the size of the arc relative to the 
  6847.       current arc 
  6848.      An IControl value filling the interior with the current area-fill 
  6849.       pattern, but not drawing the arc's outline. 
  6850.  
  6851.  
  6852. ΓòÉΓòÉΓòÉ 6.1.7.2. Partial Arcs ΓòÉΓòÉΓòÉ
  6853.  
  6854. A partial arc is a section of a full arc defined by the current arc parameters. 
  6855. To draw a partial arc, use GpiPartialArc, which draws two separate figures. The 
  6856. first figure is a straight line from the current position to the starting point 
  6857. of a partial arc, and the second figure is the partial arc itself. When the arc 
  6858. has been drawn, the new current position is at the end point of the partial 
  6859. arc. 
  6860.  
  6861. GpiPartialArc accepts as input the center of the current full arc, of which the 
  6862. partial arc is a part, specified in world coordinates. You also can specify a 
  6863. multiplier value to increase or decrease the size of the partial arc in 
  6864. relation to the current full arc. 
  6865.  
  6866. You also must specify two positive fixed values: a start angle and a sweep 
  6867. angle. If the current full arc is a circle, the start angle is measured 
  6868. counterclockwise from the x-axis of the circle. The intersection of the start 
  6869. angle with the full arc, adjusted by the multiplier value, defines the starting 
  6870. point of the partial arc. 
  6871.  
  6872. The sweep angle continues the counterclockwise measurement, beginning where the 
  6873. start angle left off. The intersection of the sweep angle with the full arc, 
  6874. adjusted by the multiplier value, defines the partial arc. 
  6875.  
  6876. If the current arc is not a circle, the start and sweep angle are skewed to the 
  6877. same degree that the ellipse is a skewed circle. The following figure shows how 
  6878. the partial arc is constructed. 
  6879.  
  6880. The Partial Arc 
  6881.  
  6882. A is the start angle; B, the sweep angle.  C is the center point; D, the 
  6883. current position.  Arc.EF is the partial arc.  F is the new current position. 
  6884. The inner circle in the previous figure is the arc defined by the current arc 
  6885. parameters. A multiplier has been specified with GpiPartialArc, so the partial 
  6886. arc is based on the full arc described by the outer circle. Point C is the 
  6887. center point specified on GpiPartialArc. Angle A is the start angle, and angle 
  6888. B is the sweep angle. GpiPartialArc therefore, draws a line from the current 
  6889. position (point D) to the start of the partial arc (point E). It also draws arc 
  6890. EF. Point F is the new current position. The arc is drawn counterclockwise 
  6891. because the current arc parameters define a counterclockwise circle. You can 
  6892. join points F and D with GpiLine. This line is drawn automatically if you 
  6893. define the partial arc within a GpiBeginArea and GpiEndArea bracket. 
  6894.  
  6895.  
  6896. ΓòÉΓòÉΓòÉ 6.1.7.3. 3-Point Arcs ΓòÉΓòÉΓòÉ
  6897.  
  6898. GpiPointArc draws an arc from the current position through an intermediate 
  6899. point to an end point. When the arc is drawn, the current position is at the 
  6900. end point of the arc. You specify both the intermediate point and the end 
  6901. point, and these values determine both the size of the arc and the direction in 
  6902. which it is drawn. The shape and the orientation of a 3-point arc are 
  6903. determined by the current arc parameters. The following figure shows how a 
  6904. 3-point arc is constructed. 
  6905.  
  6906. The 3-Point Arc 
  6907.  
  6908. If the current arc parameters define an ellipse, that ellipse is scaled up or 
  6909. down to fit the three points of the arc. 
  6910.  
  6911. When you want the three points of the arc to be points on a circle, allow the 
  6912. current arc parameters to default so they define a unit circle. You do not need 
  6913. to use the values p and q to specify the radius of the circle, because the 
  6914. radius is determined by the relative positions of the three points of the arc. 
  6915.  
  6916.  
  6917. ΓòÉΓòÉΓòÉ 6.1.8. Multiple-Arc Primitive Family ΓòÉΓòÉΓòÉ
  6918.  
  6919. The following table describes the three variants of the simple-arc primitive 
  6920. and the functions that draw them. As with line primitives, an application draws 
  6921. simple arcs by first using GpiMove or GpiSetCurrentPosition to set the current 
  6922. position. The multiple arcs are the most sophisticated of the arc primitives 
  6923. and their construction does not depend on the current arc parameters. 
  6924.  
  6925. Functions that Draw Multiple Arcs 
  6926.  
  6927. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  6928. ΓöéVariants    ΓöéFunction                ΓöéDescription                       Γöé
  6929. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6930. ΓöéFillets     ΓöéGpiPolyFillet           ΓöéDraws one or more fillets.        Γöé
  6931. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6932. Γöé            ΓöéGpiPolyFilletSharp      ΓöéDraws one or more fillets with    Γöé
  6933. Γöé            Γöé                        Γöévarying degrees of sharpness.     Γöé
  6934. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6935. ΓöéSplines     ΓöéGpiPolySpline           ΓöéDraws one or more splines.        Γöé
  6936. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  6937.  
  6938.  
  6939. ΓòÉΓòÉΓòÉ 6.1.8.1. Fillets ΓòÉΓòÉΓòÉ
  6940.  
  6941. GpiPolyFillet constructs a fillet (a curved line) made up of one or more arcs, 
  6942. each of which touches a different straight line. You specify the end points of 
  6943. these straight lines with GpiPolyFillet. The lines are not drawn but are used 
  6944. to construct the curve. 
  6945.  
  6946. The fillet starts at the current position and finishes at the end point of the 
  6947. last line. On the way from the start point to the end point, the fillet is 
  6948. tangential to all intermediate lines at their midpoints. When the fillet is 
  6949. drawn, the current position is at the end point of the last construction line. 
  6950. The following figure is an example of how a fillet is constructed. 
  6951.  
  6952. The Fillet 
  6953.  
  6954. The fillet starts at (2,6) and ends at (5,1).  The fillet is tangential to the 
  6955. midpoints of the lines from (2,8) to (6,9), from (6,9) to (9,5), and from (9,5) 
  6956. to (5,3). 
  6957.  
  6958. When you supply only two points, the construction lines of the fillet are drawn 
  6959. from the current position to the first point, and from the first point to the 
  6960. second point. The fillet is drawn from the current position to the second 
  6961. point, and is tangential to the construction lines at those same points. 
  6962.  
  6963. GpiPolyFilletSharp creates a fillet on a series of connected construction 
  6964. lines. The first fillet in the series is built using two construction lines: 
  6965. one drawn from the current position to point 1 (the control point), and one 
  6966. drawn from point 1 to point 2 (the end point). The fillet is drawn from the 
  6967. current position to the end point, and is tangential to the two construction 
  6968. lines at those points. 
  6969.  
  6970. GpiPolyFilletSharp also accepts as input a sharpness value. Sharpness is a 
  6971. measure of the distance between the fillet and the control point. It is 
  6972. calculated as shown in the following figure. 
  6973.  
  6974. Fillet with Sharpness Specified 
  6975.  
  6976. Point A is the current position, point B is the control point, and point C is 
  6977. the end point. W is the midpoint of the notional line AC. D is the point at 
  6978. which the fillet crosses the notional line WB. 
  6979.  
  6980. The sharpness of the fillet is the value WD / DB. The line WD is 10 coordinate 
  6981. units, and the line DB is 5 coordinate units; therefore the sharpness value is 
  6982. 2. The sharpness value defines the type of arc. This is shown in the following 
  6983. table. 
  6984.  
  6985. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  6986. ΓöéA sharpness value of...       ΓöéDefines...                    Γöé
  6987. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6988. ΓöéGreater than 1.0              ΓöéA hyperbola                   Γöé
  6989. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6990. ΓöéEqual to 1.0                  ΓöéA parabola                    Γöé
  6991. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6992. ΓöéLess than 1.0                 ΓöéAn ellipse                    Γöé
  6993. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  6994.  
  6995. Subsequent fillets start from the end point of the previous fillet, and are 
  6996. constructed using the next two lines in the sequence in exactly the same way. 
  6997. For each fillet you define one control point, one end point, and one sharpness 
  6998. value. Upon completion, the current position is at the end point of the final 
  6999. construction line in the sequence. 
  7000.  
  7001. There might be discontinuity of gradient between multiple fillets drawn with 
  7002. GpiPolyFilletSharp. To avoid this, ensure that points B and C of one fillet are 
  7003. on the same construction line as points A and B of the next fillet in the 
  7004. sequence. This concept is illustrated in connection with the spline primitive 
  7005. in the figure that follows the next figure. Discontinuity of gradient between 
  7006. fillets does not occur when the fillets are drawn with GpiPolyFillet. 
  7007.  
  7008.  
  7009. ΓòÉΓòÉΓòÉ 6.1.8.2. Splines ΓòÉΓòÉΓòÉ
  7010.  
  7011. GpiPolySpline creates a succession of one or more Bezier splines. The spline 
  7012. also is a curve, but its construction method is different from that of the 
  7013. fillet. As input to this function, you supply three construction points for 
  7014. each spline. The first spline starts from the current position and ends at the 
  7015. third specified point. The two intermediate points are control points for the 
  7016. curve. Subsequent splines start at the end point of the previous spline, have 
  7017. two intermediary control points, and end at the third control point. The 
  7018. following figure shows the construction method for the spline. 
  7019.  
  7020. The Spline 
  7021.  
  7022. Points (1) and (2) are the control points of the spline, and point (3) is the 
  7023. end point. 
  7024.  
  7025. To avoid discontinuity of gradient between the end of one spline and the start 
  7026. of the next, ensure that the last two construction points of the first spline 
  7027. and the first two construction points of the second spline are positioned along 
  7028. a single construction line. This concept is shown in the following figure. 
  7029.  
  7030. Spline with No Discontinuity of Gradient 
  7031.  
  7032. The last two points of the first spline (points 2 and 3) are positioned along 
  7033. the same construction line as the first two points (current position and point 
  7034. 1) of the second spline. 
  7035.  
  7036.  
  7037. ΓòÉΓòÉΓòÉ 6.2. Using Line and Arc Primitives ΓòÉΓòÉΓòÉ
  7038.  
  7039. This section explains how to: 
  7040.  
  7041.      Draw a straight line 
  7042.      Create a "rubber-banding" effect with straight lines or arcs 
  7043.      Draw a circle, ellipse, fillet, or spline 
  7044.  
  7045.  
  7046. ΓòÉΓòÉΓòÉ 6.2.1. Drawing a Straight Line ΓòÉΓòÉΓòÉ
  7047.  
  7048. To draw a straight line, set the current position with GpiMove or 
  7049. GpiSetCurrentPosition. Set the end point of the line by filling in a POINTL 
  7050. structure, then draw the line with GpiLine. The following figure shows how to 
  7051. draw a straight line in a PM application. 
  7052.  
  7053.  
  7054. #include <os2.h>
  7055.  
  7056.     BOOL DrawLine(HPS hps, LONG xStart, LONG yStart, LONG xEnd, LONG yEnd){
  7057.         POINTL ptl;                       /* Point structure              */
  7058.  
  7059.         ptl.x = xStart;                   /* Loads starting x-coordinate  */
  7060.         ptl.y = yStart;                   /* Loads starting y-coordinate  */
  7061.         GpiMove(hps, &ptl);               /* Sets current position        */
  7062.         ptl.x = xEnd;                     /* Loads ending x-coordinate    */
  7063.         ptl.y = yEnd;                     /* Loads ending y-coordinate    */
  7064.         if (GpiLine(hps, &ptl) == GPI_OK){
  7065.             return TRUE;                  /* Draw Line.                   */
  7066.         } /* if */
  7067.         else return FALSE;
  7068.     } /* DrawLine */
  7069.  
  7070. The second argument of GpiMove is the address of a POINTL structure that 
  7071. contains coordinates of the line's starting point. The second argument of 
  7072. GpiLine is the address of another POINTL structure that contains the 
  7073. coordinates of the last point on the line. 
  7074.  
  7075.  
  7076. ΓòÉΓòÉΓòÉ 6.2.2. Creating a Rubber-Banding Effect with a Straight Line ΓòÉΓòÉΓòÉ
  7077.  
  7078. When lines are drawn with a rubber-banding effect, two things happen: the 
  7079. original line (if one exists) is erased, and a new line is drawn in its place. 
  7080. This process typically takes place each time the mouse is dragged and continues 
  7081. until the mouse button is released. The quickest way to erase the original line 
  7082. (having ensured that it was drawn using mix attribute FM_XOR) is to redraw it 
  7083. using mix attribute FM_XOR. The following figure shows how to create this 
  7084. effect. 
  7085.  
  7086. #define INCL_WININPUT
  7087. #define INCL_GPITRANSFORMS
  7088. #define INCL_GPIPRIMITIVES
  7089. #include <os2.h>
  7090.     HPS hps;                            /* Presentation-space handle  */
  7091.     LONG curr_color;
  7092.  
  7093. MRESULT EXPENTRY wpGeneric(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2){
  7094.     static POINTL ptlStart;             /* Starting point of line     */
  7095.     static POINTL ptlNew;               /* Ending point of line       */
  7096.     static POINTL ptlPrev;              /* Previous end point of line */
  7097.     static BOOL fDraw;                  /* Line-drawing flag          */
  7098.  
  7099.     switch (msg) {
  7100.         case WM_BUTTON1DOWN:            /* User begins drawing        */
  7101.            GpiSetColor(hps, CLR_GREEN);
  7102.            ptlStart.x = (LONG) (LOUSHORT(mp1));
  7103.            ptlStart.y = (LONG) (HIUSHORT(mp1));
  7104.            GpiConvert(hps, CVTC_DEVICE, CVTC_WORLD, 1L,
  7105.                     &ptlStart);
  7106.            ptlPrev.x = ptlStart.x;
  7107.            ptlPrev.y = ptlStart.y;
  7108.            GpiMove(hps, &ptlStart);
  7109.            fDraw = TRUE;
  7110.            return ((MRESULT) TRUE);
  7111.  
  7112.         case WM_MOUSEMOVE:              /* User draws line             */
  7113.             if (fDraw) {
  7114.                 ptlNew.x = (LONG) (LOUSHORT(mp1));
  7115.                 ptlNew.y = (LONG) (HIUSHORT(mp1));
  7116.                 GpiConvert(hps, CVTC_DEVICE, CVTC_WORLD, 1L,  &ptlNew);
  7117.                 curr_color = GpiQueryColor(hps);
  7118.                 GpiSetMix(hps, FM_XOR);
  7119.                 if ((ptlStart.x != ptlPrev.x)
  7120.                 || (ptlStart.y != ptlPrev.y)) {
  7121.                     GpiMove(hps, &ptlStart);
  7122.                     GpiLine(hps, &ptlPrev);
  7123.                 } /* if */
  7124.                 if ((ptlStart.x != ptlNew.x)
  7125.                 || (ptlStart.y != ptlNew.y)) {
  7126.                     GpiMove(hps, &ptlStart);
  7127.                     GpiLine(hps, &ptlNew);
  7128.                     ptlPrev.x = ptlNew.x;
  7129.                     ptlPrev.y = ptlNew.y;
  7130.                 } /* if */
  7131.                 GpiSetMix(hps, FM_OVERPAINT);
  7132.             } /* if */
  7133.             return ((MRESULT) TRUE);
  7134.  
  7135.          case WM_BUTTON1UP:              /* User stops drawing          */
  7136.             fDraw = FALSE;
  7137.             return ((MRESULT) TRUE);
  7138.     } /* switch */
  7139. } /* wpGeneric */
  7140.  
  7141.  
  7142. ΓòÉΓòÉΓòÉ 6.2.3. Drawing a Circle ΓòÉΓòÉΓòÉ
  7143.  
  7144. When drawing a circle, all the transformations between the world, model, page, 
  7145. and device spaces must maintain square units. This means that your application 
  7146. should select metric, English, or arbitrary page units instead of pels. On most 
  7147. devices, pels are rectangular, but not necessarily square. This also means that 
  7148. the Sx and Sy scaling factors should be equal. If the transformations maintain 
  7149. square units and the arc parameters are set to their default values, GpiFullArc 
  7150. produces a circle. 
  7151.  
  7152. In the example shown in the following figure, if the page units are 
  7153. PU_LOENGLISH and the default transformations are set, a circle with a radius of 
  7154. 1/2 inch is drawn. 
  7155.  
  7156.  
  7157. #define INCL_GPIPRIMITIVES
  7158. #include <os2.h>
  7159.     HPS hps;                                  /* Presentation-space handle      */
  7160.  
  7161. MRESULT EXPENTRY wpClient (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2){
  7162.     ARCPARAMS arcp;                           /* Structure for arc parameters   */
  7163.     POINTL ptlPos;                            /* Structure for current position */
  7164.     FIXED fxMult;                             /* Multiplier for circle          */
  7165.  
  7166.     arcp.lP = 1;
  7167.     arcp.lQ = 1;
  7168.     arcp.lR = 0;
  7169.     arcp.lS = 0;
  7170.     GpiSetArcParams(hps, &arcp);               /* Sets parameters to default    */
  7171.     ptlPos.x = 100;                            /* Loads x-coordinate            */
  7172.     ptlPos.y = 100;                            /* Loads y-coordinate            */
  7173.     GpiMove(hps, &ptlPos);                     /* Sets current position         */
  7174.     fxMult = MAKEFIXED(50, 0);                 /* Sets multiplier               */
  7175.     GpiFullArc(hps, DRO_OUTLINE, fxMult);      /* Draws circle                  */
  7176. } /* wpClient */
  7177.  
  7178. The second argument to GpiFullArc DRO_OUTLINE, specifies that the operating 
  7179. system should draw only the outline of the circle-rather than filling the 
  7180. interior with the current fill pattern. The third argument, fxMult, specifies 
  7181. that the operating system should multiply the size of the circle by 50 units. 
  7182. Because the page units are PU_LOENGLISH and the default transformations are 
  7183. set, 50 units is equivalent to 1/2 inch. 
  7184.  
  7185.  
  7186. ΓòÉΓòÉΓòÉ 6.2.4. Drawing an Ellipse ΓòÉΓòÉΓòÉ
  7187.  
  7188. If you set the world, model, page, and device transformations so that they 
  7189. maintain square units, you can use the arc parameters to transform the shape of 
  7190. the unit circle to an ellipse, and draw this with GpiFullArc. The example in 
  7191. the following figure alters the arc parameter, p, by doubling its value, making 
  7192. the ellipse twice as wide horizontally as it is vertically. 
  7193.  
  7194. In the example shown in the following figure, if the page units are 
  7195. PU_LOENGLISH and the default transformations are set, an ellipse with a 2-inch 
  7196. major axis (parallel to the x-axis) and a 1-inch minor axis (parallel to the 
  7197. y-axis) is drawn. 
  7198.  
  7199.  
  7200. #define INCL_GPIPRIMITIVES
  7201. #include <os2.h>
  7202.     HPS hps;                              /* Presentation-space handle      */
  7203.  
  7204. MRESULT EXPENTRY wpClient (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2){
  7205.     POINTL ptlPos;                        /* Structure for current position */
  7206.     FIXED fxMult;                         /* Multiplier for ellipse         */
  7207.     ARCPARAMS arcp;                       /* Structure for arc parameters   */
  7208.  
  7209.     arcp.lP = 2;
  7210.     arcp.lQ = 1;
  7211.     arcp.lR = 0;
  7212.     arcp.lS = 0;
  7213.     GpiSetArcParams(hps, &arcp);           /* Sets parameters to default */
  7214.     ptlPos.x = 200;                        /* Loads x-coordinate         */
  7215.     ptlPos.y = 100;                        /* Loads y-coordinate         */
  7216.     GpiMove(hps, &ptlPos);                 /* Sets current position      */
  7217.     fxMult = MAKEFIXED(50, 0);             /* Sets multiplier            */
  7218.     GpiFullArc(hps, DRO_OUTLINE, fxMult);  /* Draws circle               */
  7219. } /* wpClient */
  7220.  
  7221. Because the arc-parameter fields, lP and lQ, are set to 2 and 1, the operating 
  7222. system creates an ellipse with a major axis that is twice as long as the minor 
  7223. axis. 
  7224.  
  7225.  
  7226. ΓòÉΓòÉΓòÉ 6.2.5. Drawing a Pie Slice ΓòÉΓòÉΓòÉ
  7227.  
  7228. The following steps describe how to use GpiPartialArc to draw a closed shape 
  7229. bounded by a chord and an arc: 
  7230.  
  7231.    1. Set the current line type to LINETYPE_INVISIBLE with GpiSetLineType. 
  7232.  
  7233.    2. Call GpiPartialArc with the start angle equal to angle B, and the sweep 
  7234.       angle equal to 0.  This effectively moves the current position to a point 
  7235.       on the current arc, and thereby defines one end of the chord. 
  7236.  
  7237.    3. Select a visible line type with GpiSetLineType 
  7238.  
  7239.    4. Call GpiPartialArc with the start angle equal to angle A, and the sweep 
  7240.       angle equal to angle B - angle A.  Angle B must be greater than angle A. 
  7241.       The center point is the same on both GpiPartialArc calls. 
  7242.  
  7243.  To fill this partial arc with the current area-fill pattern, you can bracket 
  7244.  the GpiPartialArc call of step 4 with GpiBeginArea and GpiEndArea. You should 
  7245.  not call GpiBeginArea before step 2. 
  7246.  
  7247.  The effect of this sequence is shown in the following figure. 
  7248.  
  7249.  Closed Figure Bounded by Chord and Arc 
  7250.  
  7251.  The circle in the preceding figure is defined by the current arc parameters. 
  7252.  Point F is the current position, and point C is the center of the arc as 
  7253.  specified with the first GpiPartialArc call. The first GpiPartialArc call-with 
  7254.  the line type set to LINETYPE_INVISIBLE-moves the current position to point D. 
  7255.  The second GpiPartialArc call-with the line type set to LINETYPE_SOLID- draws 
  7256.  the chord from the current position (point D) to the start point of the arc 
  7257.  (point E), and draws arc ED. 
  7258.  
  7259.  The partial arc has been defined within an area and has been filled with the 
  7260.  current area-fill pattern. 
  7261.  
  7262.  The following figure shows how to draw a "pie slice". like the one drawn in 
  7263.  the previous figure. 
  7264.  
  7265.  
  7266.   #define INCL_GPIPRIMITIVES
  7267.   #include <os2.h>
  7268.  
  7269.   void Figure_516(){
  7270.      HPS hps;
  7271.      POINTL ptlCenter = {2L, 2L};       /*  Coordinates of the center point  */
  7272.      FIXED fxAngleA = 20L;              /*  Angle A in degrees               */
  7273.      FIXED fxAngleB = 130L;             /*  Angle B in degrees               */
  7274.  
  7275.      GpiSetLineType(hps, LINETYPE_INVISIBLE);
  7276.                       /*  Set position to start drawing the arc at angle B.  */
  7277.      GpiPartialArc(hps, &ptlCenter, MAKEFIXED(1, 0), fxAngleB, 0L);
  7278.      GpiSetLineType(hps, LINETYPE_ID);
  7279.      GpiBeginArea(hps, BA_BOUNDARY | BA_ALTERNATE);      /*  Fill the area   */
  7280.      GpiPartialArc(hps, &ptlCenter, MAKEFIXED(1, 0), fxAngleA, fxAngleB-fxAngleA);
  7281.      GpiEndArea(hps);                                    /* Cancel area-fill */
  7282.   }
  7283.  
  7284.  
  7285. ΓòÉΓòÉΓòÉ 6.2.6. Drawing a Fillet ΓòÉΓòÉΓòÉ
  7286.  
  7287. A fillet is tangential to two lines. The curve of the fillet is always 
  7288. tangential to a line drawn between its start and control points and a line 
  7289. drawn between its end and control points. 
  7290.  
  7291. The following figure shows an example of how to draw a single curve, using the 
  7292. current position and two control points. 
  7293.  
  7294.  
  7295. #include <os2.h>
  7296.     HPS hps;                                 /* Presentation-space handle    */
  7297.  
  7298. MRESULT EXPENTRY wpClient(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2){
  7299.     POINTL aptl[2];                /* Structure for control points           */
  7300.  
  7301.         aptl[0].x = 50;            /* Loads x-coord. of first control point  */
  7302.         aptl[0].y = 50;            /* Loads y-coord. of first control point  */
  7303.         GpiMove(hps, aptl);                  /* Sets current position        */
  7304.         aptl[0].x = 75;            /* Loads x-coord. of second control point */
  7305.         aptl[0].y = 75;            /* Loads y-coord. of second control point */
  7306.         aptl[1].x = 100;           /* Loads x-coord. of third control point  */
  7307.         aptl[1].y = 50;            /* Loads y-coord. of third control point  */
  7308.         GpiPolyFillet(hps, 2, aptl); /* Draws fillet                         */
  7309. } /* wpClient */
  7310.  
  7311. When you draw a sharp fillet, the sharpness value controls the shape of the 
  7312. curve, as shown in a previous table. 
  7313.  
  7314. The following figure shows an example of using a sharpness value of 3, which 
  7315. creates a hyperbolic curve. 
  7316.  
  7317.  
  7318. #include <os2.h>
  7319.     HPS hps;                        /* Presentation-space handle             */
  7320.  
  7321. MRESULT EXPENTRY wpClient(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2){
  7322.         POINTL aptl[2];            /* Structure for control points           */
  7323.         FIXED fxSharpness;         /* Sharpness value                        */
  7324.  
  7325.         aptl[0].x = 50;            /* Loads x-coord. of first control point  */
  7326.         aptl[0].y = 50;            /* Loads y-coord. of first control point  */
  7327.         GpiMove(hps, aptl);        /* Sets current position                  */
  7328.         aptl[0].x = 75;            /* Loads x-coord. of second control point */
  7329.         aptl[0].y = 75;            /* Loads y-coord. of second control point */
  7330.         aptl[1].x = 100;           /* Loads x-coord. of third control point  */
  7331.         aptl[1].y = 50;            /* Loads y-coord. of third control point  */
  7332.         fxSharpness = MAKEFIXED(3, 0);   /* Sets sharpness value             */
  7333.         GpiPolyFilletSharp(hps,    /* Draws fillet                           */
  7334.             2L, aptl, &fxSharpness);
  7335. } /* wpClient */
  7336.  
  7337.  
  7338. ΓòÉΓòÉΓòÉ 6.2.7. Drawing a Spline ΓòÉΓòÉΓòÉ
  7339.  
  7340. When you use GpiPolySpline to draw a spline, each curve is tangential to the 
  7341. first and last of three connected lines. The following figure shows how to draw 
  7342. a spline. 
  7343.  
  7344.  
  7345. #include <os2.h>
  7346.     HPS hps;                        /* Presentation-space handle              */
  7347.  
  7348. MRESULT EXPENTRY wpClient(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2){
  7349.         POINTL aptl[3];             /* Structure for control points           */
  7350.  
  7351.         aptl[0].x = 50;             /* Loads x-coord. of first control point  */
  7352.         aptl[0].y = 100;            /* Loads y-coord. of first control point  */
  7353.         GpiMove(hps, aptl);         /* Sets current position                  */
  7354.         aptl[0].x = 75;             /* Loads x-coord. of second control point */
  7355.         aptl[0].y = 200;            /* Loads y-coord. of second control point */
  7356.         aptl[1].x = 100;            /* Loads x-coord. of third control point  */
  7357.         aptl[1].y = 0;              /* Loads y-coord. of third control point  */
  7358.         aptl[2].x = 125;            /* Loads x-coord. of fourth control point */
  7359.         aptl[2].y = 100;            /* Loads y-coord. of fourth control point */
  7360.         GpiPolySpline(hps, 3L, aptl);   /* Draws spline                       */
  7361. } /* wpClient */
  7362.  
  7363.  
  7364. ΓòÉΓòÉΓòÉ 7. Marker Primitives ΓòÉΓòÉΓòÉ
  7365.  
  7366. Marker primitives are graphics objects-such as stars, dots, or crosses-that are 
  7367. used, for example, to indicate the plotted points on a line graph. The 
  7368. following topics are related to the information in this chapter: 
  7369.  
  7370.      Presentation spaces 
  7371.      Line and arc primitives 
  7372.      Color and mix attributes 
  7373.      Fonts 
  7374.  
  7375.  
  7376. ΓòÉΓòÉΓòÉ 7.1. About Marker Primitives ΓòÉΓòÉΓòÉ
  7377.  
  7378. Marker primitives always are drawn centered over a point. In a designated 
  7379. presentation space, GpiMarker draws a single marker primitive of the current 
  7380. marker symbol, with its center at a specified position. This position becomes 
  7381. the new current position when the marker is drawn. 
  7382.  
  7383. Another marker function, GpiPolyMarker, draws multiple marker primitives in the 
  7384. designated presentation space. Each marker primitive is centered over a 
  7385. position specified in an input array to GpiPolyMarker. All marker primitives 
  7386. drawn by a single call to GpiPolyMarker use the same (current) marker symbol. 
  7387. When a series of marker primitives is drawn, the current position is the center 
  7388. point of the last marker in the series. The following figure shows the use of 
  7389. marker primitives in a line graph. 
  7390.  
  7391. Marker Primitives 
  7392.  
  7393. This example shows a sequence of diamond-shaped marker primitives drawn on a 
  7394. line graph at (1,2), (3,4), (4,3), (7,5), (8,4), (9,8), (10,6), and (11,6). The 
  7395. new current position is at (11,6). The marker portion of this example could 
  7396. have been drawn with a single call to GpiPolyMarker or with eight separate 
  7397. GpiMarker calls. 
  7398.  
  7399.  
  7400. ΓòÉΓòÉΓòÉ 7.1.1. Attributes of Marker Primitives ΓòÉΓòÉΓòÉ
  7401.  
  7402. Marker primitive attributes are contained in a data structure called 
  7403. MARKERBUNDLE. Following is a list of these attributes: 
  7404.  
  7405.      Marker symbol 
  7406.      Marker box 
  7407.      Marker set 
  7408.      Foreground color 
  7409.      Background color 
  7410.      Foreground mix attribute 
  7411.      Background mix attribute 
  7412.  
  7413.  When an application creates a presentation space, the marker attributes are 
  7414.  set to the default values shown in the following table. 
  7415.  
  7416.  Marker Attribute Default Values 
  7417.  
  7418.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  7419.   ΓöéAttribute       ΓöéDefault Value     ΓöéFunction that Redefines   Γöé
  7420.   Γöé                Γöé                  ΓöéAttribute                 Γöé
  7421.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7422.   ΓöéMarker symbol   ΓöéCross             ΓöéGpiSetMarker              Γöé
  7423.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7424.   ΓöéMarker box      ΓöéDevice dependent; ΓöéGpiSetMarkerBox           Γöé
  7425.   Γöé                Γöéequal to the size Γöé                          Γöé
  7426.   Γöé                Γöéof one character  Γöé                          Γöé
  7427.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7428.   ΓöéMarker set      ΓöéLCID_DEFAULT      ΓöéGpiSetMarkerSet           Γöé
  7429.   Γöé                Γöé                  ΓöéNote:  If this default is Γöé
  7430.   Γöé                Γöé                  Γöéchanged, the base marker  Γöé
  7431.   Γöé                Γöé                  Γöéset cannot be reselected  Γöé
  7432.   Γöé                Γöé                  Γöéwith GpiSetMarkerSet.     Γöé
  7433.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7434.   ΓöéForeground colorΓöéBlack             ΓöéGpiSetAttrs (MBB_COLOR)   Γöé
  7435.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7436.   ΓöéBackground colorΓöéClear             ΓöéGpiSetAttrs               Γöé
  7437.   Γöé                Γöé                  Γöé(MBB_BACK_COLOR)          Γöé
  7438.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7439.   ΓöéForeground mix  ΓöéOverpaint         ΓöéGpiSetAttrs (MBB_MIX_MODE)Γöé
  7440.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7441.   ΓöéBackground mix  ΓöéLeave alone       ΓöéGpiSetAttrs               Γöé
  7442.   Γöé                Γöé                  Γöé(MBB_BACK_MIX_MODE)       Γöé
  7443.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  7444.  
  7445.  
  7446. ΓòÉΓòÉΓòÉ 7.1.2. Marker Symbols ΓòÉΓòÉΓòÉ
  7447.  
  7448. The current marker symbol is selected from the current marker set using 
  7449. GpiSetMarker. The marker symbol selected for the specified presentation space 
  7450. is used for all subsequent GpiMarker and GpiPolyMarker calls until a new symbol 
  7451. is selected. 
  7452.  
  7453. The following table describes the marker symbols provided by the PM in a base 
  7454. marker set. These symbols are not necessarily available from other marker sets. 
  7455.  
  7456. The Base Marker Set 
  7457.  
  7458. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  7459. ΓöéSymbol            ΓöéIdentifier                      ΓöéLong ValueΓöé
  7460. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7461. ΓöéCross             ΓöéMARKSYM_CROSS                   Γöé1L        Γöé
  7462. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7463. ΓöéPlus sign         ΓöéMARKSYM_PLUS                    Γöé2L        Γöé
  7464. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7465. ΓöéDiamond           ΓöéMARKSYM_DIAMOND                 Γöé3L        Γöé
  7466. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7467. ΓöéSquare            ΓöéMARKSYM_SQUARE                  Γöé4L        Γöé
  7468. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7469. ΓöéSix-point star    ΓöéMARKSYM_SIXPOINTSTAR            Γöé5L        Γöé
  7470. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7471. ΓöéEight-point star  ΓöéMARKSYM_EIGHTPOINTSTAR          Γöé6L        Γöé
  7472. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7473. ΓöéSolid diamond     ΓöéMARKSYM_SOLIDDIAMOND            Γöé7L        Γöé
  7474. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7475. ΓöéSolid square      ΓöéMARKSYM_SOLIDSQUARE             Γöé8L        Γöé
  7476. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7477. ΓöéDot               ΓöéMARKSYM_DOT                     Γöé9L        Γöé
  7478. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7479. ΓöéSmall circle      ΓöéMARKSYM_SMALLCIRCLE             Γöé10L       Γöé
  7480. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7481. ΓöéBlank, (Often     ΓöéMARKSYM_BLANK                   Γöé64L       Γöé
  7482. Γöécalled the        Γöé                                Γöé          Γöé
  7483. Γöéinvisible marker) Γöé                                Γöé          Γöé
  7484. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  7485. The default marker symbol (MARKSYM_DEFAULT) is identical to the MARKSYM_CROSS 
  7486. symbol and has a long value of 0L. The error marker symbol (MARKSYM_ERROR) has 
  7487. a long value of -1L. 
  7488.  
  7489. The following figure shows the visible marker symbols from the base marker set. 
  7490. Your application can determine the marker set with GpiQueryMarkerSet. 
  7491.  
  7492. The Base Marker Set 
  7493.  
  7494.  
  7495. ΓòÉΓòÉΓòÉ 7.1.3. Marker Box ΓòÉΓòÉΓòÉ
  7496.  
  7497. The marker box is a rectangular boundary that defines the horizontal and 
  7498. vertical space occupied by the marker symbol. The marker box is used to center 
  7499. the current marker symbol. 
  7500.  
  7501. If the current marker set contains vector marker primitives (characters 
  7502. outlined by using line and arc functions), changing the size of the marker box 
  7503. changes the size of the marker primitives also. When you change the size of the 
  7504. marker box, a vector marker symbol is scaled up or down automatically to fit 
  7505. the box. Image marker primitives, however, cannot be scaled. If the current 
  7506. marker set contains image characters, the marker box dimensions are fixed, 
  7507. because you cannot alter the size of image markers. 
  7508.  
  7509. You can use GpiSetMarkerBox to change the size of the marker box for a 
  7510. particular presentation space. Set the value of the appropriate SIZEF structure 
  7511. to the required size. The new size is expressed in world coordinates and should 
  7512. not contain any fractional values. 
  7513.  
  7514. The default size of the marker box can be determined using DevQueryCaps. The 
  7515. values, CAPS_MARKER_WIDTH and CAPS_MARKER_HEIGHT, depend on the currently 
  7516. associated device and the presentation page. Marker box values set with 
  7517. GpiSetMarkerBox can be determined using GpiQueryMarkerBox. 
  7518.  
  7519. GpiSetAttrs also can be used to change the size of the marker box. 
  7520. GpiSetDefAttrs can be used to change the default size of the marker box. 
  7521.  
  7522.  
  7523. ΓòÉΓòÉΓòÉ 7.1.4. Marker Set ΓòÉΓòÉΓòÉ
  7524.  
  7525. When you create a presentation space, the current marker set, along with other 
  7526. marker attributes, are set to default. The current marker symbol (the cross 
  7527. described earlier) is specified from the supplied marker set. The supplied set 
  7528. of marker primitives contains only image, or raster, marker primitives. 
  7529.  
  7530. The marker primitives in the default marker set are drawn by setting the color 
  7531. of the pels in the marker box. Within the marker box, the color of the set pels 
  7532. defines the foreground color. The default foreground color is neutral- black on 
  7533. the display screen and on printers. 
  7534.  
  7535. The color of the pels that are not set defines the background color. The 
  7536. default background color is the background color on the device-white on the 
  7537. display screen, and the loaded paper color on printers. The default background 
  7538. mix is LEAVE_ALONE, or transparent, which means the background color is 
  7539. irrelevant. 
  7540.  
  7541. If the default set is changed using GpiSetDefAttrs, its markers are not 
  7542. accessible. The markers from the default set can be recovered by calling 
  7543. GpiSetDefAttrs and specifying the value LCID_DEFAULT, (0). 
  7544.  
  7545.  
  7546. ΓòÉΓòÉΓòÉ 7.1.4.1. Customizing Marker Sets ΓòÉΓòÉΓòÉ
  7547.  
  7548. If the current marker set does not contain a symbol that suits your 
  7549. application, you can load a new marker set and select a marker symbol from that 
  7550. set. The only way to see the current marker set is to display it on the screen 
  7551. or view a hardcopy of the symbols. You load a new marker set for a specified 
  7552. presentation space by creating a logical font. Then you select the font as a 
  7553. marker set by specifying the logical font identifer (lcid) as an input 
  7554. parameter to GpiSetMarkerSet. After selecting the marker set, call GpiSetMarker 
  7555. to select a marker from the set. You can set both values simultaneously, with 
  7556. GpiSetAttrs. 
  7557.  
  7558. You can use any font's character set as a marker set and any character within 
  7559. that marker set as a marker. To determine the value that identifies the current 
  7560. marker set, call GpiQueryMarkerSet. To determine the value that identifies the 
  7561. current marker character, call GpiQueryMarker. You can retrieve both values 
  7562. simultaneously with GpiQueryAttrs. You also can create image marker symbols 
  7563. using the Font Editor. 
  7564.  
  7565.  
  7566. ΓòÉΓòÉΓòÉ 7.1.5. Marker Color and Mix Attributes ΓòÉΓòÉΓòÉ
  7567.  
  7568. The color attribute defines the color used to draw a primitive or an object. 
  7569. The mix attribute determines how the color of a primitive or an object is 
  7570. combined with the color of the drawing surface, or any other objects on the 
  7571. surface. 
  7572.  
  7573. The marker color defines the color used to draw the output from any of the IBM 
  7574. OS/2 marker functions. When a presentation space is created, the marker color 
  7575. initial default is black. Markers are one of the primitives that have a 
  7576. foreground and background color, as shown in the following figure. 
  7577.  
  7578. For image markers, the colors are determined by the setting of pels. For vector 
  7579. markers, the foreground consists of the arcs and lines that define the marker. 
  7580. The background color appears between the foreground lines. The marker can be 
  7581. solid, or filled, in which case the background color does not appear between 
  7582. the foreground lines. 
  7583.  
  7584. Marker Primitives 
  7585.  
  7586. Marker primitives have both a color and background color attribute. The mix 
  7587. attribute controls the combination of marker color with drawing-surface color, 
  7588. while the background mix attribute controls the combination of the marker box 
  7589. color with the drawing-surface color. 
  7590.  
  7591. When a presentation space is created, the marker mix attribute initial default 
  7592. is FM_OVERPAINT. The overpaint mix attribute specifies that the marker color is 
  7593. not to be modified by the color of the drawing surface. If the marker mix 
  7594. attribute is changed, the marker color is mixed with colors that are already on 
  7595. the drawing surface. 
  7596.  
  7597. The marker background color initial default is CLR_BACKGROUND. Usually this is 
  7598. defined by the application to the same color as the drawing surface. The marker 
  7599. background mix attribute initial default is BM_LEAVEALONE. The leave-alone mix 
  7600. background attribute specifies that the marker background color is not drawn. 
  7601. The box that effectively surrounds the marker appears only if the marker 
  7602. background mix attribute is changed. 
  7603.  
  7604. To specify a new color or mix attribute call GpiSetAttrs. This function accepts 
  7605. as input the type of primitive, for example PRIM_MARKER, a list of attributes 
  7606. that are to be changed, a list of attributes that are to be set to their 
  7607. default values, and the values for the attributes that are to be changed. 
  7608. GpiSetAttrs is useful to specify colors and mix attributes just for a specific 
  7609. data structure- MARKERBUNDLE, for example. GpiSetAttrs also provides some 
  7610. protection against invalid colors. 
  7611.  
  7612. To determine the current marker color and mix attribute call GpiQueryAttrs. 
  7613. This function accepts as input the primitive type and the attributes in 
  7614. question. It returns as output an array of values for the specifically queried 
  7615. attributes. 
  7616.  
  7617. To reset the default marker color and mix attribute, just as with any other 
  7618. attribute specified in the MARKERBUNDLE data structure, call GpiSetDefAttrs. 
  7619. This function accepts as input the type of primitive, for example PRIM_MARKER, 
  7620. the attributes to be changed, and the values that will become the new default 
  7621. values. The changing of default values is important when working with segments. 
  7622. Changing the default values during a series of drawing functions is not 
  7623. recommended. 
  7624.  
  7625. The marker color and mix attribute also can be specified with: 
  7626.  
  7627.      GpiSetColor 
  7628.      GpiSetMix 
  7629.      GpiSetBackColor 
  7630.      GpiSetBackMix 
  7631.  
  7632.  However, these functions have the disadvantage of specifying the foreground 
  7633.  and background color or mix attribute for all primitive BUNDLE data structures 
  7634.  that have the respective component. 
  7635.  
  7636.  There are four query functions that determine the color and mix attribute as 
  7637.  specified by GpiSet... functions: 
  7638.  
  7639.      GpiQueryColor 
  7640.      GpiQueryMix 
  7641.      GpiQueryBackColor 
  7642.      GpiQueryBackMix 
  7643.  
  7644.  If the marker color, marker background color, mix attribute, or background mix 
  7645.  attribute were specified individually, the queries can return a value 
  7646.  inconsistent with the current marker attribute. 
  7647.  
  7648.  
  7649. ΓòÉΓòÉΓòÉ 7.2. Using Marker Primitives ΓòÉΓòÉΓòÉ
  7650.  
  7651. You can use marker functions to: 
  7652.  
  7653.      Draw a single marker or a series of markers 
  7654.  
  7655.      Set or determine (query) any combination of the marker bundle attributes 
  7656.       including: 
  7657.  
  7658.         -  Determining the lcid for the current marker set 
  7659.         -  Selecting a character set as the new marker set 
  7660.         -  Determining the value that identifies the current marker 
  7661.         -  Selecting a character as the new marker 
  7662.         -  Setting or changing the size of the marker box 
  7663.         -  Setting or changing the color of a marker 
  7664.  
  7665.  
  7666. ΓòÉΓòÉΓòÉ 7.2.1. Drawing Marker Primitives ΓòÉΓòÉΓòÉ
  7667.  
  7668. You can draw either a single marker or a series of markers using the current 
  7669. marker symbol. To draw a single marker, set the fields in a POINTL structure to 
  7670. correspond to the desired position in world coordinates. Then call GpiMarker 
  7671. passing it the address of the POINTL structure as the second argument. 
  7672.  
  7673. To draw a series of markers, set the fields in an array of POINTL structures to 
  7674. correspond to the desired positions in world coordinates. Then call 
  7675. GpiPolyMarker, passing it the number of points in the array as the second 
  7676. argument and the name of the array as the third argument. 
  7677.  
  7678. The following figure shows how to draw a graph with GpiPolyLine and 
  7679. GpiPolyMarker. 
  7680.  
  7681.  
  7682. #include <os2.h>
  7683. void fncMARK01(void){
  7684.     HPS hps;                                  /* Presentation-space handle */
  7685.     POINTL aptl[6];                           /* Array of points           */
  7686.  
  7687.     aptl[0].x = 10; aptl[0].y = 15;           /* Assigns points            */
  7688.     aptl[1].x = 150; aptl[1].y = 30;
  7689.     aptl[2].x = 200; aptl[2].y = 32;
  7690.     aptl[3].x = 250; aptl[3].y = 70;
  7691.     aptl[4].x = 360; aptl[4].y = 120;
  7692.     aptl[5].x = 380; aptl[5].y = 98;
  7693.     GpiPolyMarker(hps, sizeof(aptl) / sizeof(POINTL),aptl);
  7694.                                               /* Plots points              */
  7695.     GpiMove(hps, aptl);                       /* Sets current position     */
  7696.     GpiPolyLine(hps, sizeof(aptl) / sizeof(POINTL),aptl);
  7697.                                               /* Draws lines               */
  7698. } /* fncMARK01 */
  7699.  
  7700.  
  7701. ΓòÉΓòÉΓòÉ 7.2.2. Selecting a New Marker ΓòÉΓòÉΓòÉ
  7702.  
  7703. The following figure shows how to check whether the default marker primitive 
  7704. from the default marker set is being used currently, and if so, how to replace 
  7705. the cross with the six-pointed star. 
  7706.  
  7707. #define INCL_GPIPRIMITIVES
  7708. #include <os2.h>
  7709. void fncMARK02(void){
  7710.     HPS hps;
  7711.  
  7712.     if ((GpiQueryMarker(hps) == MARKSYM_DEFAULT) &&
  7713.         (GpiQueryMarkerSet(hps) == LCID_DEFAULT))
  7714.     GpiSetMarker(hps, MARKSYM_SIXPOINTSTAR);
  7715.  
  7716.  
  7717. ΓòÉΓòÉΓòÉ 7.2.3. Selecting a New Marker Set ΓòÉΓòÉΓòÉ
  7718.  
  7719. The following figure is an example of how to load a Helvetica** vector font, 
  7720. select it as the new marker set, and select the uppercase A as the new marker 
  7721. primitive. 
  7722.  
  7723.  
  7724. #define INCL_GPILCIDS
  7725. #define INCL_GPIPRIMITIVES
  7726. #include <os2.h>
  7727. void fncMARK03(void){
  7728.     LONG cHelvFonts, cFonts, lcid, i, j;
  7729.     HPS hps;
  7730.     FATTRS fattrs;
  7731.     FONTMETRICS afm[80];
  7732.     MARKERBUNDLE mbnd;
  7733.  
  7734.     cHelvFonts = GpiQueryFonts(hps, QF_PUBLIC, "Helv",
  7735.    &cFonts, sizeof(FONTMETRICS), (PFONTMETRICS) NULL);
  7736.                                  /* Queries the number of Helvetica fonts.      */
  7737.  
  7738.     GpiQueryFonts(hps, QF_PUBLIC, "Helv", &cHelvFonts,
  7739.        sizeof(FONTMETRICS), afm);
  7740.                                  /* Loads the array of FONTMETRICS structures.  */
  7741.  
  7742.     for (i = 0; !(afm[i].fsDefn & FM_DEFN_OUTLINE)
  7743.                                    && i < cHelvFonts; i++);
  7744.                                  /* Finds outline font                          */
  7745.  
  7746.     fattrs.usRecordLength = sizeof(FATTRS);
  7747.     fattrs.fsSelection = 0;
  7748.     fattrs.lMatch = afm[i].lMatch;         /* Uses Helvetica outline font       */
  7749.     for (j = 0; j <= sizeof(afm[i].szFacename); j++)
  7750.     fattrs.szFacename[j] = afm[i].szFacename[j];
  7751.     fattrs.idRegistry = 0;
  7752.     fattrs.usCodePage = 850;     /* Uses international code page                */
  7753.     fattrs.lMaxBaselineExt = 0;
  7754.     fattrs.lAveCharWidth = 0;
  7755.     fattrs.fsType = 0;
  7756.     fattrs.fsFontUse = FATTR_FONTUSE_TRANSFORMABLE;
  7757.  
  7758.     GpiCreateLogFont(hps, (PSTR8) NULL, lcid, &fattrs);
  7759.     mbnd.usSet = lcid;           /* Uses font as marker set                     */
  7760.     mbnd.usSymbol = 'A';         /* Uses capital A as primitive                 */
  7761.     GpiSetAttrs(hps, PRIM_MARKER, MBB_SYMBOL | MBB_SET, 0, &mbnd);
  7762. } /* fncMARK03 */
  7763.  
  7764.  
  7765. ΓòÉΓòÉΓòÉ 7.2.4. Changing the Marker Color ΓòÉΓòÉΓòÉ
  7766.  
  7767. The following figure shows how to set the marker foreground color to green. 
  7768.  
  7769.  
  7770. #define INCL_GPIPRIMITIVES
  7771. #include <os2.h>
  7772. void fncMARK04(void){
  7773.     HPS hps;
  7774.     MARKERBUNDLE mbnd;
  7775.  
  7776.     mbnd.lColor = CLR_GREEN;
  7777.     GpiSetAttrs(hps, PRIM_MARKER, MBB_COLOR, 0L, &mbnd);
  7778. } /* fncMARK04 */
  7779.  
  7780.  
  7781. ΓòÉΓòÉΓòÉ 8. Matrix Multiplication ΓòÉΓòÉΓòÉ
  7782.  
  7783. To show how matrix multiplication is implemented, here are two matrixes: 
  7784.  
  7785.  
  7786.      Γöî         ΓöÉ         Γöî         ΓöÉ
  7787.      Γöé a  b  c Γöé         Γöé j  k  l Γöé
  7788.      Γöé d  e  f Γöé    *    Γöé m  n  o Γöé
  7789.      Γöé g  h  i Γöé         Γöé p  q  r Γöé
  7790.      Γöö         Γöÿ         Γöö         Γöÿ
  7791.  
  7792. The multiplication of these two matrixes produces a value for each of the nine 
  7793. elements of the resulting matrix: 
  7794.  
  7795.  
  7796.      Γöî                              ΓöÉ
  7797.      Γöé element1  element2  element3 Γöé
  7798.      Γöé element4  element5  element6 Γöé
  7799.      Γöé element7  element8  element9 Γöé
  7800.      Γöö                              Γöÿ
  7801.  
  7802. To produce element 1 of the matrix, element a is multiplied by element j, 
  7803. element b is multiplied by element m, and element c is multiplied by element p. 
  7804. That is: 
  7805.  
  7806. element1 = (a x j) + (b x m) + (c x p) 
  7807.  
  7808. To produce element 2 of the matrix, element a is multiplied by element k, 
  7809. element b is multiplied by element n, and element c is multiplied by element q. 
  7810. To produce element 3 of the matrix, elements a, b, and c are multiplied by 
  7811. their corresponding elements (l, o, and r) in the third vertical line of the 
  7812. second matrix. To produce element 4 of the matrix, you move down a row in the 
  7813. first matrix. That is, element d is multiplied by element j, element e is 
  7814. multiplied by element m, and element f is multiplied by element p. You continue 
  7815. the multiplication in this way until each of the nine elements has a value. The 
  7816. complete workings for this example are as follows: 
  7817.  
  7818. element1 = (a x j) + (b x m) + (c x p) 
  7819.  
  7820. element2 = (a x k) + (b x n) + (c x q) 
  7821.  
  7822. element3 = (a x l) + (b x o) + (c x r) 
  7823.  
  7824. element4 = (d x j) + (e x m) + (f x p) 
  7825.  
  7826. element5 = (d x k) + (e x n) + (f x q) 
  7827.  
  7828. element6 = (d x l) + (e  x o) + (f  x r) 
  7829.  
  7830. element7 = (g x j) + (h  x m) + (i  x p) 
  7831.  
  7832. element8 = (g x k) + (h  x n) + (i  x q) 
  7833.  
  7834. element9 = (g x l) + (h  x o) + (i  x r) 
  7835.  
  7836. Note that if the order of the two matrixes is reversed, the results of the 
  7837. multiplication are different. 
  7838.  
  7839. Here is a simple example in which an object is scaled by a factor of 3, and 
  7840. then translated by (5,4): 
  7841.  
  7842.  
  7843.      Γöî         ΓöÉ         Γöî         ΓöÉ          Γöî         ΓöÉ
  7844.      Γöé 3  0  0 Γöé         Γöé 1  0  0 Γöé          Γöé 3  0  0 Γöé
  7845.      Γöé 0  3  0 Γöé    *    Γöé 0  1  0 Γöé     =    Γöé 0  3  0 Γöé
  7846.      Γöé 0  0  1 Γöé         Γöé 5  4  1 Γöé          Γöé 5  4  1 Γöé
  7847.      Γöö         Γöÿ         Γöö         Γöÿ          Γöö         Γöÿ
  7848.  
  7849. You can multiply together as many transformation matrixes as you require. 
  7850.  
  7851.  
  7852. ΓòÉΓòÉΓòÉ 9. Metafiles ΓòÉΓòÉΓòÉ
  7853.  
  7854. A metafile is a graphics object that, like a segment, contains the GPI 
  7855. instructions that contribute to the final version of a picture. Unlike a 
  7856. segment, a metafile also contains a header, with state information, and all 
  7857. resources necessary to identically create the picture. Because pictures that 
  7858. are displayed when a graphics application is executed are lost when the 
  7859. application finishes, metafiles provide a method of retaining pictures beyond a 
  7860. single execution of an application. 
  7861.  
  7862. The following topics are related to the information in this chapter: 
  7863.  
  7864.      Presentation spaces and device contexts 
  7865.      Line primitives 
  7866.      Marker primitives 
  7867.      Area primitives 
  7868.      Character string primitives 
  7869.      Color and mix attributes 
  7870.      Paths 
  7871.      Regions 
  7872.      Fonts 
  7873.      Bit maps 
  7874.      Coordinate spaces and transformations 
  7875.      Print job submission and manipulation 
  7876.  
  7877.  
  7878. ΓòÉΓòÉΓòÉ 9.1. About Metafiles ΓòÉΓòÉΓòÉ
  7879.  
  7880. Metafiles can exist in three distinct forms. A metafile that has just been 
  7881. created is called a memory metafile because it exists in memory managed by the 
  7882. Presentation Manager on behalf of the application that created it. A metafile 
  7883. that is transferred to disk storage as a file with the default extension of 
  7884. .MET is called a disk metafile. A metafile that is loaded into an application's 
  7885. memory is editable by the application. 
  7886.  
  7887. Metafiles save resources in the following ways: 
  7888.  
  7889.      Metafiles can be created and used in draw mode by a single application. 
  7890.       Therefore, an application that is not retaining segments in a segment 
  7891.       store can retain graphics in a metafile. 
  7892.  
  7893.      Metafiles remain available while the owning application is running, 
  7894.       regardless of the number of presentation spaces the application obtains 
  7895.       or defines. 
  7896.  
  7897.      Given the same starting conditions in each presentation space, you can 
  7898.       produce an identical picture each time the metafile contents are 
  7899.       executed. 
  7900.  
  7901.      Different threads or processes within an application can display a 
  7902.       picture stored as a metafile without each having to own the metafile. 
  7903.  
  7904.      If your organization has common graphical resources, such as a company 
  7905.       logo, those resources can be stored in a metafile. This avoids the 
  7906.       overhead of re-creating the resources each time they are needed. 
  7907.  
  7908.      Because the metafile is a device-independent format, it is useful for 
  7909.       transferring pictures that are to be printed when the printer-type is 
  7910.       unknown. 
  7911.  
  7912.      PM applications can exchange graphical information by using metafiles, 
  7913.       either by using the clipboard or by transferring them over a network. 
  7914.  
  7915.      Your application can also exchange graphics data with non-PM applications 
  7916.       that support the Mixed Object Document Content Architecture (MO:DCA) 
  7917.       interchange standard. 
  7918.  
  7919.  
  7920.  Unlike bit-maps, metafiles offer some device-independence. Bit maps store 
  7921.  picture information on a pel-by-pel basis. Metafiles store picture information 
  7922.  in the form of low-level graphics commands that the operating system uses to 
  7923.  construct the pictures. 
  7924.  
  7925.  Note:  Metafiles can contain bit maps or other graphics information that is in 
  7926.  device-dependent format. 
  7927.  
  7928.  The graphics commands, called "graphics orders", represent graphics functions 
  7929.  that create a picture. These include drawing instructions, as well as 
  7930.  attribute-setting instructions (for example, color tables and logical fonts) 
  7931.  and anything that describes the structure of the picture. The contents of a 
  7932.  metafile, therefore, are similar to those of the graphics presentation space 
  7933.  in which the picture is drawn. The Presentation Manager automatically records 
  7934.  the environmental detail of the presentation space in which a picture is drawn 
  7935.  in the metafile. 
  7936.  
  7937.  Note:  A metafile can contain data generated from GPI functions only. Any 
  7938.  non-graphical data included in a metafile is ignored. 
  7939.  
  7940.  An application can re-create a picture from a metafile and display it in a 
  7941.  window on the screen or print it by "playing" the metafile. When an 
  7942.  application displays the contents of a metafile, it can use the color table, 
  7943.  font, fill pattern, and transformations that are stored in the metafile, or it 
  7944.  can use the logical color table, logical font, fill pattern, and 
  7945.  transformations that are set for the current presentation space. The 
  7946.  appearance of the picture stored in the metafile can, therefore, be changed by 
  7947.  editing the current presentation space before playing the metafile. 
  7948.  
  7949.  An application can save metafiles to a disk to be loaded later by any 
  7950.  application that chooses to access the metafile. Disk metafiles loaded into 
  7951.  application memory can also be edited in the same manner as elements in 
  7952.  graphics segments are edited. 
  7953.  
  7954.  They contain both primitives and attributes. 
  7955.  
  7956.  
  7957. ΓòÉΓòÉΓòÉ 9.1.1. Contents of a Metafile ΓòÉΓòÉΓòÉ
  7958.  
  7959. Every graphic function can be represented by one or more graphics orders. The 
  7960. operating system defines graphics orders for: 
  7961.  
  7962.      Areas 
  7963.      Bit maps (for fill patterns) and pattern-reference points 
  7964.      Character output and attribute 
  7965.      Colors and mix modes (foreground and background) 
  7966.      Lines and arcs and line and arc attributes (including GpiBox) 
  7967.      Paths (including clip paths) 
  7968.      Position (for example, GpiMove) 
  7969.      Saving and resetting attributes (including GpiPop) 
  7970.      Transformations (in model space) 
  7971.      Viewing Limits 
  7972.  
  7973.  Editing Retained Graphics and Graphics Segments also describes orders and how 
  7974.  to edit them. 
  7975.  
  7976.  When a picture is drawn in a presentation space associated with a metafile 
  7977.  device context, the operating system converts the primitive attributes and 
  7978.  drawing functions into graphics orders and stores them in the metafile. 
  7979.  
  7980.  The operating system stores the effects of region and other operations that 
  7981.  are not permitted as escape orders in the metafile. When an application 
  7982.  finishes playing a metafile, the system restores any regions that were defined 
  7983.  for the presentation space prior to calling GpiPlayMetaFile. 
  7984.  
  7985.  An application can use any of the query functions while creating a metafile, 
  7986.  but the system will not store those query functions in the metafile. 
  7987.  Similarly, an application can set a value by using a mathematical operator, 
  7988.  but the system will store only the result of the operation in the metafile. 
  7989.  For example, if an application determines the end point of a line by 
  7990.  subtracting 100 from the x- and y-coordinates of the upper-right corner of a 
  7991.  window, the system records the end point, not the relative distance, in the 
  7992.  metafile. 
  7993.  
  7994.  Because the output of bit map functions is dependent upon the capabilities of 
  7995.  the output device, Gpi bit map functions might produce unexpected results when 
  7996.  they are used in a metafile. If the pel dimensions of the output device are 
  7997.  different from the pel dimensions of the device on which the metafile was 
  7998.  created, the bit map will be distorted. If the output device is a plotter, the 
  7999.  bit map functions will not work at all. 
  8000.  
  8001.  Most of the escape functions used by the DevEscape function can be used in 
  8002.  metafiles. The escape functions that the system does not save in metafiles are 
  8003.  DEVESC_QUERYESCSUPPORT and DEVESC_GETSCALINGFACTOR. 
  8004.  
  8005.  
  8006. ΓòÉΓòÉΓòÉ 9.1.1.1. Metafile Content Restrictions ΓòÉΓòÉΓòÉ
  8007.  
  8008. Like areas and paths, not all functions and attributes can be represented in a 
  8009. metafile. Metafile content is mainly dependent upon the drawing mode in which 
  8010. the metafile is to be played. If the metafile is to be played when the current 
  8011. drawing-mode parameter is DM_DRAW (and in no other drawing mode), the metafile 
  8012. content is restricted as shown in Draw-Mode Restrictions. If the metafile is to 
  8013. be played when the current drawing-mode parameter is DM_RETAIN or 
  8014. DM_DRAWANDRETAIN, or if the file is to conform to SAA* guidelines, the metafile 
  8015. content is restricted as shown in Creating Metafiles for Interchange. 
  8016.  
  8017.  
  8018. ΓòÉΓòÉΓòÉ 9.1.1.1.1. Draw-Mode Restrictions ΓòÉΓòÉΓòÉ
  8019.  
  8020. The following restrictions apply if the metafile is to be played when the 
  8021. current drawing mode parameter is DM_DRAW: 
  8022.  
  8023.      If the DCTL_DISPLAY flag of GpiSetDrawControl is OFF when you are sending 
  8024.       graphics to a metafile, the graphics will not be visible when the 
  8025.       metafile is played.  Their effects on the current position and on current 
  8026.       attribute settings are recorded. 
  8027.  
  8028.      Region functions are not recorded in a metafile. The effects of the 
  8029.       following functions, however, are recorded: 
  8030.  
  8031.         -  GpiSetClipRegion 
  8032.         -  GpiIntersectClipRectangle 
  8033.         -  GpiExcludeClipRectangle 
  8034.         -  GpiOffsetClipRegion 
  8035.         -  GpiPaintRegion 
  8036.  
  8037.       When the metafile is played into a presentation space, temporary regions 
  8038.       are created. Upon completion of GpiPlayMetaFile, these temporary regions 
  8039.       are automatically deleted, and the clipping region that was current 
  8040.       before the metafile was played is restored. 
  8041.  
  8042.      In general, escape functions identified by reserved escape codes (that 
  8043.       is, escape codes in the range of 0 through 32767) are recorded in a 
  8044.       metafile. However, the DevEscape functions DEVESC_QUERYESCSUPPORT (escape 
  8045.       code 0) and DEVESC_GETSCALINGFACTOR (escape code 1) are not stored in the 
  8046.       metafile. 
  8047.  
  8048.      The effect of GpiErase, including close-segment processing, is recorded 
  8049.       in a metafile. 
  8050.  
  8051.      The following functions can produce unexpected effects if the metafile 
  8052.       contents are displayed on a different device from the one they were 
  8053.       created for: 
  8054.  
  8055.         -  GpiBitBlt 
  8056.         -  GpiSetPel 
  8057.         -  GpiSetClipRegion 
  8058.         -  GpiOffsetClipRegion 
  8059.         -  GpiPaintRegion 
  8060.         -  GpiIntersectClipRectangle 
  8061.         -  GpiExcludeClipRectangle 
  8062.  
  8063.       The reason for the unexpected effects is because the pel resolutions of 
  8064.       the devices might differ. Raster operations (for example, GpiBitBlt) do 
  8065.       not work on plotters. 
  8066.  
  8067.      You can associate the metafile device context with a different 
  8068.       presentation space while creating the metafile, but the new presentation 
  8069.       space must have the same format as the original. 
  8070.  
  8071.  
  8072. ΓòÉΓòÉΓòÉ 9.1.1.1.2. Creating Metafiles for Interchange ΓòÉΓòÉΓòÉ
  8073.  
  8074. The following restrictions apply if the metafile is to be played when the 
  8075. current drawing-mode parameter is DM_DRAWANDRETAIN or DM_RETAIN, or if the 
  8076. metafile is to conform to SAA guidelines: 
  8077.  
  8078.      Before you issue the first drawing instruction to a graphics presentation 
  8079.       space that has been associated with a metafile device context, you must 
  8080.       establish (or default) the following: 
  8081.  
  8082.         -  The graphics field (use GpiSetGraphicsField) 
  8083.  
  8084.         -  The color table (use GpiCreateLogColorTable) 
  8085.  
  8086.         -  The code page for the default character set (use GpiSetCp) 
  8087.  
  8088.         -  The default viewing transformation (use GpiSetDefaultViewMatrix) 
  8089.  
  8090.         -  The settings of the drawing controls (use GpiSetDrawControl; 
  8091.            DCTL_DISPLAY must be set on) 
  8092.  
  8093.         -  The default values of attributes (use GpiSetDefAttrs) 
  8094.  
  8095.         -  The default viewing limits (use GpiSetDefViewingLimits) 
  8096.  
  8097.         -  The primitive tag (use GpiSetDefTag) 
  8098.  
  8099.         -  The default arc parameters (use GpiSetDefArcParams) 
  8100.  
  8101.       You must not specify a graphics field if the metafile is to conform to 
  8102.       SAA guidelines. If a graphics field is specified, you can play the 
  8103.       metafile in DM_RETAIN or DM_DRAWANDRETAIN mode, but the graphics field 
  8104.       must be specified before the first drawing instruction is issued to the 
  8105.       metafile. The effect of the graphics field in the target presentation 
  8106.       space when playing the metafile is controlled by the PMF_LOADTYPE option 
  8107.       of GpiPlayMetaFile. 
  8108.  
  8109.      You can define logical fonts and identify bit maps to be used as 
  8110.       area-fill patterns at any time. You must not, however, issue 
  8111.       GpiDeleteSetId against these resources after they have been established. 
  8112.       Once assigned, therefore, lcids cannot be reused. 
  8113.  
  8114.      The size of the logical-color-table data must not exceed 31KB. 
  8115.  
  8116.      You must not use clipping regions. Therefore, none of the following 
  8117.       functions are supported: 
  8118.  
  8119.         -  GpiSetClipRegion 
  8120.         -  GpiExcludeClipRectangle 
  8121.         -  GpiIntersectClipRectangle 
  8122.         -  GpiOffsetClipRegion 
  8123.  
  8124.      You must not reassociate the metafile device context. 
  8125.  
  8126.      When you use a bit map as the source of a GpiWCBitBlt operation or as an 
  8127.       area-fill pattern, it must not be modified. 
  8128.  
  8129.      Only the following foreground mixes can be used: 
  8130.  
  8131.         -  FM_DEFAULT 
  8132.         -  FM_OR 
  8133.         -  FM_OVERPAINT 
  8134.         -  FM_LEAVEALONE 
  8135.  
  8136.      Only the following background mixes can be used: 
  8137.  
  8138.         -  BM_DEFAULT 
  8139.         -  BM_OVERPAINT 
  8140.         -  BM_LEAVEALONE 
  8141.  
  8142.      The following functions are not supported: 
  8143.  
  8144.         -  GpiBitBlt 
  8145.         -  GpiSetPel 
  8146.         -  GpiSetPS 
  8147.         -  GpiResetPS 
  8148.         -  GpiErase 
  8149.         -  GpiPaintRegion 
  8150.         -  DevEscape 
  8151.  
  8152.  
  8153. ΓòÉΓòÉΓòÉ 9.1.1.1.3. Micro Presentation Space Restrictions ΓòÉΓòÉΓòÉ
  8154.  
  8155. When you create a metafile from a micro presentation space, or play the 
  8156. metafile through a micro presentation space, the contents of the metafile are 
  8157. restricted to those GPI functions that are valid in a micro presentation space. 
  8158. In this case, the application must use GpiDestroyPS instead of GpiAssociate 
  8159. before issuing DevCloseDC. GpiAssociate is not permitted in a micro 
  8160. presentation space. 
  8161.  
  8162.  
  8163. ΓòÉΓòÉΓòÉ 9.1.1.1.4. Query Restrictions ΓòÉΓòÉΓòÉ
  8164.  
  8165. Query functions can be issued, with the usual restrictions, unless the metafile 
  8166. device context was created using the no query option, OD_METAFILE_NOQUERY. 
  8167.  
  8168.  
  8169. ΓòÉΓòÉΓòÉ 9.1.1.1.5. Segment Restrictions ΓòÉΓòÉΓòÉ
  8170.  
  8171. Chained and unchained segments invoked by any GpiDraw... command are written to 
  8172. the metafile. Primitives outside segments are recorded automatically as zero 
  8173. segments. If the metafile is subsequently played in DM_RETAIN mode, all 
  8174. graphics are directed to the segment store. 
  8175.  
  8176. Chained dynamic segments cannot be recorded in a metafile. GpiRemoveDynamics 
  8177. and GpiDrawDynamics cause an error condition to be raised when the presentation 
  8178. space is associated with a metafile device context. Unchained dynamic segments 
  8179. are recorded as zero segments. To draw an unchained dynamic segment, use 
  8180. GpiDrawSegment. 
  8181.  
  8182.  
  8183. ΓòÉΓòÉΓòÉ 9.1.1.1.6. Asynchronous Drawing Thread Restrictions ΓòÉΓòÉΓòÉ
  8184.  
  8185. If the metafile is being created on an asynchronous drawing thread and the 
  8186. thread is suspended by GpiSetStopDraw, an unusable metafile results. 
  8187.  
  8188.  
  8189. ΓòÉΓòÉΓòÉ 9.1.2. Metafile Functions ΓòÉΓòÉΓòÉ
  8190.  
  8191. The OS/2 operating system provides a set of functions that allow you to: 
  8192.  
  8193.      Create a metafile 
  8194.      Store pictures in a metafile 
  8195.      Play a metafile 
  8196.      Save a metafile 
  8197.      Load a metafile 
  8198.      Edit a metafile 
  8199.      Copy a metafile 
  8200.      Delete a metafile 
  8201.  
  8202.  How these functions are used to create and manipulate metafiles in 
  8203.  relationship to applications and components of the operating system is 
  8204.  illustrated in the following figure. 
  8205.  
  8206.  Metafile Functions 
  8207.  
  8208.  
  8209. ΓòÉΓòÉΓòÉ 9.1.2.1. Creating a Metafile ΓòÉΓòÉΓòÉ
  8210.  
  8211. Pictures are drawn in presentation spaces associated with device contexts. PM 
  8212. considers a metafile to be an output device or destination, in the same manner 
  8213. as a window or printer. This means that to record a picture in a metafile, a 
  8214. metafile device context must be created and associated with a presentation 
  8215. space. 
  8216.  
  8217. A metafile device context is created by calling DevOpenDC and specifying the 
  8218. type of device context as: 
  8219.  
  8220.      OD_METAFILE 
  8221.      OD_METAFILE_NOQUERY. 
  8222.  
  8223.  OD_METAFILE is generally used to specify a metafile device context, although 
  8224.  OD_METAFILE_NOQUERY provides better recording performance. OD_METAFILE_NOQUERY 
  8225.  does not support attribute queries, for example, GpiQueryCurrentPosition, or 
  8226.  GpiQueryColor. 
  8227.  
  8228.  The device driver for the device that the metafile device context is 
  8229.  associated with is specified in the DEVOPENSTRUC data structure required for 
  8230.  DevOpenDC. DEVOPENSTRUC is described in Print Job Submission and Manipulation. 
  8231.  
  8232.  A metafile device context can be associated with a newly-created presentation 
  8233.  space by calling GpiCreatePS and specifying the handle to the metafile device 
  8234.  context returned from the call to DevOpenDC. A metafile device context can 
  8235.  also be associated with an existing, normal presentation space by calling 
  8236.  GpiAssociate and specifying the handle to the metafile device context returned 
  8237.  from the call to DevOpenDC. 
  8238.  
  8239.  
  8240. ΓòÉΓòÉΓòÉ 9.1.2.2. Storing Pictures in a Metafile ΓòÉΓòÉΓòÉ
  8241.  
  8242. When a metafile device context is associated with a presentation space, 
  8243. presentation space resources (such as the current logical color table) and 
  8244. environmental settings (such as the presentation-page format) are copied 
  8245. automatically into the metafile. These items must be established before the 
  8246. presentation space is associated with the metafile device context. 
  8247.  
  8248. Loading of additional resources (such as fonts) and adjustments to the 
  8249. environment (such as modifying the default viewing transform) should be made 
  8250. before you begin drawing. Attribute settings, segment-creation requests, and 
  8251. primitive-drawing requests that contribute to the picture are directed to the 
  8252. metafile after its device context has been associated with a presentation 
  8253. space. 
  8254.  
  8255. If an application calls GpiSetDrawControl, specifying DCTL_DISPLAY and 
  8256. DCTL_OFF, before drawing graphics into a metafile, the graphics are not visible 
  8257. when the metafile is played. However, the metafile records any changes made to 
  8258. the current position or presentation-space attributes. 
  8259.  
  8260. When the metafile device context has been associated with a graphics 
  8261. presentation space, the metafile is ready to receive graphical data. Just as 
  8262. with any other output destination, whether the picture is sent directly to the 
  8263. metafile is controlled by the current drawing mode, as shown in the following 
  8264. table. 
  8265.  
  8266. Drawing Mode Dependencies When Recording Metafiles 
  8267.  
  8268. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  8269. ΓöéDrawing Mode          ΓöéEffect                                Γöé
  8270. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8271. ΓöéDraw mode             ΓöéGraphics go directly to the metafile. Γöé
  8272. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8273. ΓöéRetain mode           ΓöéGraphics go to the segment store of   Γöé
  8274. Γöé                      Γöéthe presentation space. They are not  Γöé
  8275. Γöé                      Γöédirected to the metafile until the    Γöé
  8276. Γöé                      Γöéapplication issues an appropriate     Γöé
  8277. Γöé                      ΓöéGpiDraw... request (GpiDrawChain,     Γöé
  8278. Γöé                      ΓöéGpiDrawFrom, GpiDrawSegment).         Γöé
  8279. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8280. ΓöéDraw-and-retain mode  ΓöéGraphics go directly to the metafile, Γöé
  8281. Γöé                      Γöéand also to the segment store of the  Γöé
  8282. Γöé                      Γöépresentation space.                   Γöé
  8283. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  8284.  
  8285. The drawing mode can be changed at any time while the metafile device context 
  8286. remains open by calling GpiSetDrawingMode. 
  8287.  
  8288. As long as the metafile device context remains open, you can continue drawing. 
  8289. A metafile can only contain data generated from GPI functions. Any nongraphical 
  8290. data included in a metafile is ignored. The following list describes items 
  8291. found in a metafile: 
  8292.  
  8293.      Picture 
  8294.      Logical color table 
  8295.      Logical font 
  8296.      Fill pattern 
  8297.      Viewing transformation 
  8298.      Page units 
  8299.      Page dimensions 
  8300.  
  8301.  When an application finishes drawing in a metafile, it must disassociate the 
  8302.  metafile device context from the presentation space by calling GpiAssociate. 
  8303.  If the metafile is associated with or through a micro presentation space, call 
  8304.  GpiDestroyPS to perform an implicit disassociation. 
  8305.  
  8306.  When you have finished drawing in the metafile, and the presentation space has 
  8307.  been disassociated, the application can close the metafile device context and 
  8308.  obtain a handle to the metafile by calling DevCloseDC. A closed metafile 
  8309.  cannot be reopened; therefore, additional drawing in the metafile is not 
  8310.  possible. A closed metafile can be referenced by the metafile handle. The 
  8311.  metafile handle is used to reference the metafile for subsequent operations on 
  8312.  the metafile. Use the metafile handle to: 
  8313.  
  8314.      Transfer a metafile to application memory 
  8315.      Transfer a metafile from application memory 
  8316.      Save a metafile on disk 
  8317.      Play a metafile into presentation space 
  8318.      Edit a metafile 
  8319.      Copy a metafile 
  8320.      Delete a metafile 
  8321.  
  8322.  Because each metafile can be distinctly identified, your application can work 
  8323.  with more than one metafile at a time. However, because metafiles can be very 
  8324.  large files, you must make maximum use of the metafile handles to avoid 
  8325.  duplicating the actual metafiles in memory. 
  8326.  
  8327.  
  8328. ΓòÉΓòÉΓòÉ 9.1.2.3. Playing a Metafile ΓòÉΓòÉΓòÉ
  8329.  
  8330. An application can redraw a picture stored in a metafile by executing the 
  8331. contents of metafile. This is known as playing a metafile into a graphics 
  8332. presentation space. How a picture is redrawn (that is, how the metafile is 
  8333. replayed) depends on the current drawing-mode of the target presentation space. 
  8334. The following table describes these dependencies. 
  8335.  
  8336. Drawing Mode Dependencies When Playing Metafiles 
  8337.  
  8338. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  8339. ΓöéDrawing Mode      ΓöéResult               ΓöéIf the metafile      Γöé
  8340. Γöé                  Γöé                     Γöécontains a segment   Γöé
  8341. Γöé                  Γöé                     Γöéchain...             Γöé
  8342. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8343. ΓöéDM_DRAW           ΓöéThe metafile contentsΓöéThe contents of the  Γöé
  8344. Γöé                  Γöéare executed, and theΓöésegments in the chainΓöé
  8345. Γöé                  Γöépicture is directed  Γöérepresent the pictureΓöé
  8346. Γöé                  Γöéto the current outputΓöéoutput that is       Γöé
  8347. Γöé                  Γöédevice.              Γöédirected at the      Γöé
  8348. Γöé                  Γöé                     Γöétarget output device.Γöé
  8349. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8350. ΓöéDM_RETAIN         ΓöéThe metafile contentsΓöéThe chain is added toΓöé
  8351. Γöé                  Γöéare retained in the  Γöéthe end of any chain Γöé
  8352. Γöé                  Γöéapplication's segmentΓöéthat may already be  Γöé
  8353. Γöé                  Γöéstore. The picture   Γöéin the segment store.Γöé
  8354. Γöé                  Γöédefined in the       ΓöéIf any segment in theΓöé
  8355. Γöé                  Γöémetafile is not      Γöémetafile has the sameΓöé
  8356. Γöé                  Γöédirected to an outputΓöénonzero name as a    Γöé
  8357. Γöé                  Γöédevice until the     Γöésegment already in   Γöé
  8358. Γöé                  Γöéapplication issues anΓöéthe segment store of Γöé
  8359. Γöé                  Γöéappropriate          Γöéthe presentation     Γöé
  8360. Γöé                  ΓöéGpiDraw... function. Γöéspace, an error      Γöé
  8361. Γöé                  Γöé                     Γöécondition is raised. Γöé
  8362. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8363. ΓöéDM_DRAWANDRETAIN  ΓöéThe metafile contentsΓöéSee above.           Γöé
  8364. Γöé                  Γöéare both stored and  Γöé                     Γöé
  8365. Γöé                  Γöéexecuted.            Γöé                     Γöé
  8366. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  8367.  
  8368. Note:  Unchained segments in the metafile are always retained, regardless of 
  8369. the current drawing-mode parameter. 
  8370.  
  8371. When the contents of a metafile are retained in the segment store of the target 
  8372. presentation space, they can be manipulated by the application as if the 
  8373. application had created them. For example, the segments can be edited, drawn, 
  8374. correlated, and deleted. 
  8375.  
  8376. A metafile is "played" by calling GpiPlayMetaFile. A metafile cannot, however, 
  8377. be "played" within a segment bracket. GpiPlayMetaFile requires a metafile 
  8378. handle, an option count, an options array, a byte count of a descriptive 
  8379. record, and the descriptive record. 
  8380.  
  8381. The GpiPlayMetaFile descriptive record is a natural-language description of the 
  8382. picture contents. For example, its value might be A House. This description is 
  8383. provided on input to the DevOpenDC function that defines the metafile device 
  8384. context. It can be used, for example, in a list box from which a user can 
  8385. select a picture. 
  8386.  
  8387. The GpiPlayMetaFile options array specifies how the operating system alters 
  8388. your application's presentation space before playing the metafile. The options 
  8389. array determines the display attributes of the metafile. The array fields and 
  8390. their respective attributes, as numbered consecutively in the array, are shown 
  8391. in the following table. 
  8392.  
  8393. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  8394. ΓöéOption                        ΓöéAttribute                     Γöé
  8395. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8396. ΓöéPMF_SEGBASE                   ΓöéReserved, must be 0.          Γöé
  8397. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8398. ΓöéPMF_LOADTYPE                  ΓöéViewing transform, graphics.  Γöé
  8399. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8400. ΓöéPMF_RESOLVE                   ΓöéReserved, must be 0.          Γöé
  8401. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8402. ΓöéPMF_LCIDS                     ΓöéFont and local bit map local  Γöé
  8403. Γöé                              Γöéidentifiers.                  Γöé
  8404. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8405. ΓöéPMF_RESET                     ΓöéDrawing attributes.           Γöé
  8406. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8407. ΓöéPMF_SUPPRESS                  ΓöéActual playing of the         Γöé
  8408. Γöé                              Γöémetafile.                     Γöé
  8409. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8410. ΓöéPMF_COLORTABLES               ΓöéColor tables, color palettes. Γöé
  8411. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8412. ΓöéPMF_COLORREALIZABLE           ΓöéRealization of metafile color Γöé
  8413. Γöé                              Γöétable.                        Γöé
  8414. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8415. ΓöéPMF_DEFAULTS                  ΓöéDrawing defaults values.      Γöé
  8416. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  8417.  
  8418.  
  8419. ΓòÉΓòÉΓòÉ 9.1.2.3.1. PMF_RESET Option ΓòÉΓòÉΓòÉ
  8420.  
  8421. The PMF_RESET option, more so than the other array options, controls the 
  8422. effects of other array options. This option allows a total reset of the 
  8423. presentation space and provides further control of the following presentation 
  8424. space environmental attributes: 
  8425.  
  8426.      Page units (device transform) 
  8427.      Page dimensions 
  8428.      Default viewing transform 
  8429.  
  8430.  Warning: If the metafile page units, page dimensions and page coordinate 
  8431.  format do not match those in the presentation space, playing the metafile will 
  8432.  cause an error. 
  8433.  
  8434.  The PMF_RESET option can have one of the values shown in the following table. 
  8435.  
  8436.  PMF_RESET Options for GpiPlayMetaFile 
  8437.  
  8438.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  8439.   ΓöéValue           ΓöéDescription                                 Γöé
  8440.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8441.   ΓöéRES_RESET       ΓöéAllows the presentation space to be         Γöé
  8442.   Γöé                Γöécompletely reset, just as if it were newly  Γöé
  8443.   Γöé                Γöécreated, and the values of the              Γöé
  8444.   Γöé                Γöéaforementioned environmental attributes to  Γöé
  8445.   Γöé                Γöébe specified from the metafile into the     Γöé
  8446.   Γöé                Γöépresentation space.                         Γöé
  8447.   Γöé                Γöé                                            Γöé
  8448.   Γöé                ΓöéThis option is equivalent to specifying     Γöé
  8449.   Γöé                ΓöéGRES_ALL on GpiResetPS. If this option is   Γöé
  8450.   Γöé                Γöéused, the target presentation page is       Γöé
  8451.   Γöé                Γöéredefined so that it is the same size, and  Γöé
  8452.   Γöé                Γöédefined in the same units, as the metafile. Γöé
  8453.   Γöé                ΓöéIt also ensures that the physical size of   Γöé
  8454.   Γöé                Γöéthe metafile picture is preserved if the    Γöé
  8455.   Γöé                Γöépresentation page is defined in units other Γöé
  8456.   Γöé                Γöéthan pels, or arbitrary units.              Γöé
  8457.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8458.   ΓöéRES_NORESET     ΓöéPrevents resetting of the presentation      Γöé
  8459.   ΓöéRES_DEFAULT     Γöéspace. The existing presentation space      Γöé
  8460.   Γöé                Γöévalues of the environmental attributes will Γöé
  8461.   Γöé                Γöébe preserved, and their values in the       Γöé
  8462.   Γöé                Γöémetafile will be discarded.                 Γöé
  8463.   Γöé                Γöé                                            Γöé
  8464.   Γöé                ΓöéIf this option is used, ensure that the     Γöé
  8465.   Γöé                Γöépresentation-page units of the target       Γöé
  8466.   Γöé                Γöépresentation space are the same as those    Γöé
  8467.   Γöé                Γöéwith which the metafile was generated,      Γöé
  8468.   Γöé                Γöébefore you play a metafile into the         Γöé
  8469.   Γöé                Γöépresentation space. For example, if the     Γöé
  8470.   Γöé                Γöéoriginal presentation page is defined in    Γöé
  8471.   Γöé                Γöéincrements of 0.1 mm, the target            Γöé
  8472.   Γöé                Γöépresentation page must be defined in the    Γöé
  8473.   Γöé                Γöésame way.                                   Γöé
  8474.   Γöé                Γöé                                            Γöé
  8475.   Γöé                ΓöéTo change the format of the target          Γöé
  8476.   Γöé                Γöépresentation page, if the presentation-page Γöé
  8477.   Γöé                Γöéformats do not match, issue GpiSetPS, but   Γöé
  8478.   Γöé                Γöéonly if you know the metafile               Γöé
  8479.   Γöé                Γöépresentation-page units.                    Γöé
  8480.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  8481.  
  8482.  If you are certain that the settings of the current presentation space are 
  8483.  appropriate for the metafile, then you can play the metafile with the NO_RESET 
  8484.  option. To reset some or all of the current values in the target presentation 
  8485.  space, without redefining the presentation page, call: 
  8486.  
  8487.    1. GpiResetPS, with the GRES_ATTRS or GRES_SEGMENTS option 
  8488.    2. GpiPlayMetaFile, with the NO_RESET option. 
  8489.  
  8490.  The PMF_LCID option may be used to append or replace fonts from the metafile 
  8491.  to the fonts in the presentation space. The PMF_COLORTABLES option may be used 
  8492.  to append or replace color table entries in the presentation space from the 
  8493.  metafile. Other options (PMF_LOADTYPE, PMF_DEFAULTS, and so on) can be used to 
  8494.  selectively replace settings in the presentation space from the metafile. 
  8495.  
  8496.  Like the PMF_RESET option, other options, except for PMF_SUPPRESS, either: 
  8497.  
  8498.      Allow the values in the presentation space to be preserved and those in 
  8499.       the metafile to be discarded, or 
  8500.  
  8501.      Allow the presentation space to be loaded using the values in the 
  8502.       metafile. 
  8503.  
  8504.  If the first choice is used with RES_RESET, then the items controlled by the 
  8505.  PMF_options will be left set to their default reset state, otherwise it will 
  8506.  occur as described in the first choice above. 
  8507.  
  8508.  If the second choice is used with RES_RESET, then the items controlled by the 
  8509.  PMF_options are as described above. If it is used with RES_NORESET, then the 
  8510.  fonts and color tables in the metafile can append to the existing color tables 
  8511.  and fonts in the presentation space. Existing presentation space color table 
  8512.  entries and fonts, such as viewing transform will be replaced if respecified 
  8513.  in the metafile. 
  8514.  
  8515.  Note:  If your application uses the attributes from the metafile, the 
  8516.  attributes that were specified in the presentation space before the metafile 
  8517.  was played are overwritten. 
  8518.  
  8519.  
  8520. ΓòÉΓòÉΓòÉ 9.1.2.3.2. PMF_SUPPRESS Option ΓòÉΓòÉΓòÉ
  8521.  
  8522. The PMF_SUPPRESS option allows you to control the playing of the metafile. The 
  8523. PMF_SUPPRESS option can have one of the values shown in the following table. 
  8524.  
  8525. PMF_SUPPRESS Options for GpiPlayMetaFile 
  8526.  
  8527. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  8528. ΓöéValue           ΓöéDescription                                 Γöé
  8529. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8530. ΓöéSUP_SUPPRESS    ΓöéThe operating system does not draw the      Γöé
  8531. Γöé                Γöémetafile on the device associated with the  Γöé
  8532. Γöé                Γöépresentation space. This option is useful ifΓöé
  8533. Γöé                Γöéyou need to alter the presentation space    Γöé
  8534. Γöé                Γöébefore drawing it on an output device.      Γöé
  8535. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8536. ΓöéSUP_NOSUPPRESS  ΓöéThe operating system draws the metafile on  Γöé
  8537. ΓöéSUP_DEFAULT     Γöéthe device associated with the presentation Γöé
  8538. Γöé                Γöéspace.                                      Γöé
  8539. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  8540.  
  8541. You can use the RES_RESET option to reinitialize the presentation space and 
  8542. modify certain resources or presentation space environmental attributes from 
  8543. the application before playing the remainder of the metafile by: 
  8544.  
  8545.    1. Saving the current state of the presentation space by calling GpiSavePS. 
  8546.  
  8547.       Use this function only if you wish to restore the previous state of the 
  8548.       presentation space after playing the metafile. 
  8549.  
  8550.    2. Calling GpiPlayMetaFile and specifying: 
  8551.  
  8552.           The PMF_RESET option with the value RES_RESET 
  8553.           The PMF_SUPPRESS option with the value SUP_SUPPRESS 
  8554.  
  8555.       This causes GpiPlayMetaFile to set the presentation space to the 
  8556.       specifications recorded in the metafile but not to play the picture in 
  8557.       the metafile. 
  8558.  
  8559.    3. Making any required changes to the presentation space. 
  8560.  
  8561.    4. Calling GpiPlayMetaFile and specifying: 
  8562.  
  8563.           The PMF_RESET option with the value RES_NORESET 
  8564.           The PMF_SUPPRESS option with the value SUP_NOSUPPRESS 
  8565.  
  8566.       This causes the picture to play. 
  8567.  
  8568.    5. Restoring the state of the presentation space after playing the metafile 
  8569.       by calling GpiRestorePS. 
  8570.  
  8571.  
  8572. ΓòÉΓòÉΓòÉ 9.1.2.3.3. PMF_LOADTYPE Option ΓòÉΓòÉΓòÉ
  8573.  
  8574. The PMF_LOADTYPE option of GpiPlayMetaFile determines which viewing 
  8575. transformations and graphics fields affect the metafile picture. The 
  8576. PMF_LOADTYPE option can have one of the values shown in the following table. 
  8577.  
  8578. PMF_LOADTYPE Options for GpiPlayMetaFile 
  8579.  
  8580. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  8581. ΓöéValue           ΓöéDescription                                 Γöé
  8582. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8583. ΓöéLT_ORIGINALVIEW ΓöéViewing transformations recorded in the     Γöé
  8584. Γöé                Γöémetafile are used in the target presentationΓöé
  8585. Γöé                Γöéspace.                                      Γöé
  8586. Γöé                Γöé                                            Γöé
  8587. Γöé                ΓöéIf changes to the graphics field are        Γöé
  8588. Γöé                Γöérecorded in the metafile, the graphics fieldΓöé
  8589. Γöé                Γöéin the target presentation space is updated,Γöé
  8590. Γöé                Γöéand the picture is clipped to that graphics Γöé
  8591. Γöé                Γöéfield.                                      Γöé
  8592. Γöé                Γöé                                            Γöé
  8593. Γöé                ΓöéChanges to the default viewing              Γöé
  8594. Γöé                Γöétransformation recorded in the metafile are Γöé
  8595. Γöé                Γöéused to update the default viewing          Γöé
  8596. Γöé                Γöétransformation in the target presentation   Γöé
  8597. Γöé                Γöéspace.                                      Γöé
  8598. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8599. ΓöéLT_NOMODIFY     ΓöéAny viewing transformations recorded in the Γöé
  8600. ΓöéLT_DEFAULT      Γöémetafile are ignored. The metafile contents Γöé
  8601. Γöé                Γöéare drawn in accordance with the current    Γöé
  8602. Γöé                Γöéviewing transformation in the target        Γöé
  8603. Γöé                Γöépresentation space. (Note that, if you also Γöé
  8604. Γöé                Γöéspecify RES_RESET, the current viewing      Γöé
  8605. Γöé                Γöétransformation is reset to its default      Γöé
  8606. Γöé                Γöévalue.)                                     Γöé
  8607. Γöé                Γöé                                            Γöé
  8608. Γöé                ΓöéThe picture is clipped to any graphics fieldΓöé
  8609. Γöé                Γöédefined in the target presentation space,   Γöé
  8610. Γöé                Γöéand any graphics field recorded in the      Γöé
  8611. Γöé                Γöémetafile is ignored.                        Γöé
  8612. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  8613.  
  8614. The PMF_RESET option RES_RESET changes values in the target presentation space. 
  8615. Therefore, the effect of the PMF_LOADTYPE option should always be considered in 
  8616. conjunction with the PMF_RESET option. For example, if you specify both 
  8617. RES_RESET and LT_NOMODIFY, the default viewing transformation in the target 
  8618. presentation space is updated with that from the metafile, even though 
  8619. LT_NOMODIFY means that such values should be ignored. 
  8620.  
  8621.  
  8622. ΓòÉΓòÉΓòÉ 9.1.2.3.4. PMF_LCIDS Option ΓòÉΓòÉΓòÉ
  8623.  
  8624. The PMF_LCIDS option of GpiPlayMetaFile controls whether logical resources 
  8625. referenced by a local identifier (lcid) are loaded from the metafile. Logical 
  8626. resources include logical fonts and bit maps used as area-fill patterns. The 
  8627. PMF_LCIDS option can have one of the values shown in the following table. 
  8628.  
  8629. PMF_LCIDS Options for GpiPlayMetaFile 
  8630.  
  8631. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  8632. ΓöéValue           ΓöéDescription                                 Γöé
  8633. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8634. ΓöéLC_LOADDISC     ΓöéLoads lcid-referenced resources from the    Γöé
  8635. Γöé                Γöémetafile.                                   Γöé
  8636. Γöé                Γöé                                            Γöé
  8637. Γöé                ΓöéIf the lcids of those resources are already Γöé
  8638. Γöé                Γöéin use in the target presentation space, theΓöé
  8639. Γöé                Γöéresources currently identified by those lcidΓöé
  8640. Γöé                Γöés are deleted and their lcids are freed     Γöé
  8641. Γöé                Γöébefore the metafile contents are loaded. TheΓöé
  8642. Γöé                Γöénew fonts and bit maps replace the existing Γöé
  8643. Γöé                Γöéones in the presentation space. (If the     Γöé
  8644. Γöé                Γöéoperating system uses a local identifier    Γöé
  8645. Γöé                Γöéthat the application has already defined,   Γöé
  8646. Γöé                ΓöéGpiPlayMetaFile deletes the existing        Γöé
  8647. Γöé                Γöéidentifier before using it for the metafile Γöé
  8648. Γöé                Γöéresource.)                                  Γöé
  8649. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8650. ΓöéLC_NOLOAD       ΓöéThe operating system uses the presentation  Γöé
  8651. ΓöéLC_DEFAULTS     Γöéspace's logical font and custom fill        Γöé
  8652. Γöé                Γöépattern; it will ignore any logical font or Γöé
  8653. Γöé                Γöécustom fill pattern in the metafile.        Γöé
  8654. Γöé                Γöé                                            Γöé
  8655. Γöé                ΓöéAn application can use GpiSavePS and        Γöé
  8656. Γöé                ΓöéGpiRestorePS to maintain the local          Γöé
  8657. Γöé                Γöéidentifiers it has already defined.         Γöé
  8658. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  8659.  
  8660.  
  8661. ΓòÉΓòÉΓòÉ 9.1.2.3.5. PMF_COLORTABLE Option ΓòÉΓòÉΓòÉ
  8662.  
  8663. The PMF_COLORTABLES option may be used to append or replace color table entries 
  8664. in the presentation space from the metafile. The PMF_COLORTABLES option can 
  8665. have one of the values shown in the following table. 
  8666.  
  8667. PMF_COLORTABLES Options for GpiPlayMetaFile 
  8668.  
  8669. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  8670. ΓöéValue               ΓöéDescription                             Γöé
  8671. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8672. ΓöéCTAB_REPLACE        ΓöéReplaces the logical color table in the Γöé
  8673. Γöé                    Γöépresentation space with the color table Γöé
  8674. Γöé                    Γöéin the metafile.                        Γöé
  8675. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8676. ΓöéCTAB_REPLACEPALETTE ΓöéReplaces the current palette, if it     Γöé
  8677. Γöé                    Γöéexists, in the presentation space with  Γöé
  8678. Γöé                    Γöéthe palette in the metafile.            Γöé
  8679. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8680. ΓöéCTAB_NOMODIFY       ΓöéMaintains the logical color table in theΓöé
  8681. ΓöéCTAB_DEFAULT        Γöépresentation space.                     Γöé
  8682. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  8683.  
  8684.  
  8685. ΓòÉΓòÉΓòÉ 9.1.2.3.6. PMF_COLORREALIZABLE Option ΓòÉΓòÉΓòÉ
  8686.  
  8687. The PMF_COLORREALIZABLE option may be used to select whether color table from 
  8688. the metafile is realized upon loading. The PMF_COLORREALIZEABLE option can have 
  8689. one of the values shown in the following table. 
  8690.  
  8691. PMF_COLORREALIZABLE Options for GpiPlayMetaFile 
  8692.  
  8693. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  8694. ΓöéValue               ΓöéDescription                             Γöé
  8695. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8696. ΓöéCREA_DOREALIZE      ΓöéSets the realizable option when loading Γöé
  8697. Γöé                    Γöéthe color table.                        Γöé
  8698. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8699. ΓöéCREA_NOREALIZE      ΓöéDoes not set the realizable option when Γöé
  8700. ΓöéCREA_DEFAULT        Γöéloading the color table.                Γöé
  8701. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  8702.  
  8703.  
  8704. ΓòÉΓòÉΓòÉ 9.1.2.3.7. PMF_DEFAULTS Option ΓòÉΓòÉΓòÉ
  8705.  
  8706. The PMF_DEFAULTS option can have one of the values shown in the following 
  8707. table. 
  8708.  
  8709. PMF_DEFAULTS Options for GpiPlayMetaFile 
  8710.  
  8711. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  8712. ΓöéValue               ΓöéDescription                             Γöé
  8713. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8714. ΓöéDDEF_LOADDISC       ΓöéReplaces the default attributes, defaultΓöé
  8715. Γöé                    Γöéviewing limits, and default arc         Γöé
  8716. Γöé                    Γöéparameters in the presentation space    Γöé
  8717. Γöé                    Γöéwith the values specified in the        Γöé
  8718. Γöé                    Γöémetafile.                               Γöé
  8719. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  8720. ΓöéDDEF_IGNORE         ΓöéMaintains the default attributes,       Γöé
  8721. ΓöéDDEF_DEFAULTS       Γöédefault viewing limits, and default arc Γöé
  8722. Γöé                    Γöéparameters in the presentation space.   Γöé
  8723. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  8724.  
  8725.  
  8726. ΓòÉΓòÉΓòÉ 9.1.2.4. Saving a Metafile ΓòÉΓòÉΓòÉ
  8727.  
  8728. A metafile is not a permanent object and, unless it is explicitly saved, 
  8729. disappears when the application that creates it ends. Metafiles are saved in 
  8730. disk files by calling GpiSaveMetaFile. 
  8731.  
  8732. This function accepts as input the metafile handle and the name of the disk 
  8733. file in which the metafile is to be saved. As the disk file is created by this 
  8734. function, an error condition is raised if a file with this name already exists. 
  8735. When you call GpiSaveMetaFile, the memory version of the metafile is deleted. 
  8736. Its handle is no longer valid, until the file is reloaded from disk. 
  8737.  
  8738.  
  8739. ΓòÉΓòÉΓòÉ 9.1.2.5. Loading a Metafile ΓòÉΓòÉΓòÉ
  8740.  
  8741. A metafile saved on disk has to be reloaded before it can be used. Any 
  8742. application with access to the disk file can transfer the file from disk 
  8743. storage to application storage by calling GpiLoadMetaFile. GpiLoadMetaFile 
  8744. returns a metafile handle, which identifies the metafile after it has been 
  8745. loaded. 
  8746.  
  8747.  
  8748. ΓòÉΓòÉΓòÉ 9.1.2.6. Editing a Metafile ΓòÉΓòÉΓòÉ
  8749.  
  8750. Metafiles can be edited in a manner similar to editing graphics segments. To 
  8751. edit graphics orders in a metafile, an application transfers them into 
  8752. application storage (an array of bytes) by calling GpiQueryMetaFileBits. The 
  8753. number of graphics orders copied depends on the size of the array that the 
  8754. application supplies. The application can determine the size of the metafile 
  8755. (in bytes) by calling GpiQueryMetaFileLength. When the application has finished 
  8756. editing the graphics orders, it can copy them back into the metafile by calling 
  8757. GpiSetMetaFileBits. 
  8758.  
  8759. Edited versions of metafiles can be saved by calling GpiSaveMetaFile. The disk 
  8760. file that contains the edited version of the metafile cannot have the same name 
  8761. as the file from which the metafile was originally loaded. GpiSaveMetaFile 
  8762. raises an error condition if the disk file already exists. 
  8763.  
  8764.  
  8765. ΓòÉΓòÉΓòÉ 9.1.2.7. Copying a Metafile ΓòÉΓòÉΓòÉ
  8766.  
  8767. A copy of a memory metafile can be made by calling GpiCopyMetaFile. PM makes a 
  8768. copy of the metafile and returns a new handle to the new metafile. 
  8769.  
  8770.  
  8771. ΓòÉΓòÉΓòÉ 9.1.2.8. Deleting a Metafile ΓòÉΓòÉΓòÉ
  8772.  
  8773. A memory metafile is deleted by calling GpiDeleteMetaFile. After the operation 
  8774. is complete, the handle to the metafile no longer points to a usable object. A 
  8775. disk file containing the metafile remains untouched by this operation. A disk 
  8776. metafile is deleted by using operating system commands that delete any other 
  8777. type of file. 
  8778.  
  8779.  
  8780. ΓòÉΓòÉΓòÉ 9.1.3. Metafiles and the System Clipboard ΓòÉΓòÉΓòÉ
  8781.  
  8782. A metafile that you have created or loaded can be made available to other 
  8783. applications at the same workstation by placing the handle to the metafile in 
  8784. the system clipboard. When a resource is passed to the clipboard, it  becomes 
  8785. the property of the system, and is not deleted when the owning application 
  8786. ends. Any application that can access the clipboard can retrieve the handle to 
  8787. the metafile. Using the handle to the metafile, the application should copy the 
  8788. metafile by calling GpiCopyMetaFile before closing the clipboard. The 
  8789. application can then perform any metafile operation on the metafile. 
  8790.  
  8791.  
  8792. ΓòÉΓòÉΓòÉ 9.2. Using Metafiles ΓòÉΓòÉΓòÉ
  8793.  
  8794. Use metafile functions to: 
  8795.  
  8796.      Create a metafile 
  8797.      Draw into a metafile 
  8798.      Load a metafile to disk 
  8799.      Load a metafile from disk into an application 
  8800.      Play a metafile 
  8801.      Edit a metafile 
  8802.      Copy a metafile 
  8803.      Transfer metafile contents to application memory 
  8804.      Transfer metafile contents from application memory 
  8805.  
  8806.  
  8807. ΓòÉΓòÉΓòÉ 9.2.1. Creating and Drawing into a Metafile ΓòÉΓòÉΓòÉ
  8808.  
  8809. To create a metafile, you must: 
  8810.  
  8811.    1. Create a metafile device context with DevOpenDC. 
  8812.  
  8813.    2. Create a presentation space with GpiCreatePS, and associate the 
  8814.       presentation space with the metafile device context. 
  8815.  
  8816.    3. Draw into the metafile with various Gpi drawing functions. 
  8817.  
  8818.    4. Disassociate the metafile device context from the presentation space with 
  8819.       GpiAssociate. 
  8820.  
  8821.    5. Close the metafile device context with DevCloseDC. 
  8822.  
  8823.  The following figure shows how to create a simple metafile that draws text 
  8824.  within the borders of a three-color box. 
  8825.  
  8826.   #include <os2.h>
  8827.   void fncMETA01(void){
  8828.       DEVOPENSTRUC dop;
  8829.       HDC hdcMeta;
  8830.       HPS hpsMeta;
  8831.       HMF hmf;
  8832.       HAB hab;
  8833.       SIZEL sizlPage;
  8834.       POINTL ptl;
  8835.  
  8836.       dop.pszLogAddress = (PSZ) NULL;
  8837.       dop.pszDriverName = "DISPLAY";
  8838.  
  8839.       hdcMeta = DevOpenDC(hab,
  8840.           OD_METAFILE,                 /* Metafile device context             */
  8841.           "*",                         /* Ignores OS2.INI                     */
  8842.           2L,                          /* Uses first two fields               */
  8843.           (PDEVOPENDATA) &dop,         /* Device information                  */
  8844.           (HDC) NULLHANDLE);           /* Compatible device context           */
  8845.  
  8846.       hpsMeta = GpiCreatePS(hab,
  8847.           hdcMeta,                     /* Metafile device context             */
  8848.           &sizlPage,                   /* Page viewport                       */
  8849.           PU_PELS | GPIA_ASSOC);       /* Device units and associated context */
  8850.  
  8851.       /* Draw a box in a metafile. */
  8852.  
  8853.       GpiSetColor(hpsMeta, CLR_CYAN);
  8854.  
  8855.       ptl.x = 150; ptl.y = 200;
  8856.       GpiMove(hpsMeta, &ptl);
  8857.  
  8858.  
  8859.       ptl.x = 300; ptl.y = 275;
  8860.       GpiBox(hpsMeta, DRO_FILL, &ptl, 0L, 0L);
  8861.  
  8862.       GpiSetColor(hpsMeta, CLR_GREEN);
  8863.  
  8864.       ptl.x = 300; ptl.y = 200;
  8865.       GpiMove(hpsMeta, &ptl);
  8866.  
  8867.       ptl.x = 390; ptl.y = 275;
  8868.       GpiBox(hpsMeta, DRO_FILL, &ptl, 0L, 0L);
  8869.  
  8870.  
  8871.       GpiSetColor(hpsMeta, CLR_YELLOW);
  8872.  
  8873.       ptl.x = 390; ptl.y = 200;
  8874.       GpiMove(hpsMeta, &ptl);
  8875.  
  8876.       ptl.x = 530; ptl.y = 275;
  8877.       GpiBox(hpsMeta, DRO_FILL, &ptl, 0L, 0L);
  8878.  
  8879.       ptl.x = 175; ptl.y = 230;
  8880.       GpiMove(hpsMeta, &ptl);
  8881.  
  8882.  
  8883.       GpiSetColor(hpsMeta, CLR_PINK);
  8884.  
  8885.       GpiCharString(hpsMeta, 41,
  8886.           "METAFILE COPY METAFILE COPY METAFILE COPY");
  8887.  
  8888.       GpiAssociate(hpsMeta, (HDC) NULLHANDLE);
  8889.       hmf = DevCloseDC(hdcMeta);
  8890.   } /* fncMETA01 */
  8891.  
  8892.  Creating a Metafile 
  8893.  
  8894.  
  8895. ΓòÉΓòÉΓòÉ 9.2.2. Drawing into a Metafile in Retain Mode ΓòÉΓòÉΓòÉ
  8896.  
  8897. To draw into a metafile, set the drawing mode to the appropriate value for your 
  8898. application and then perform the drawing operations. The following figure shows 
  8899. an example of how to copy the contents of a segment into a metafile. 
  8900.  
  8901. #define INCL_GPIMETAFILES
  8902. #define INCL_GPICONTROL
  8903. #include <os2.h>
  8904. void fncMETA02(void){
  8905.     HDC hdcMeta, hdc;
  8906.     POINTL ptl;
  8907.     HMF hmf;
  8908.     LONG alOpt[10];
  8909.     HPS hps;
  8910.  
  8911.     /*
  8912.      * Open a segment, assign it an identifier of 10,
  8913.      * and draw some text into it.
  8914.      */
  8915.  
  8916.     GpiSetDrawingMode(hps, DM_RETAIN);
  8917.     GpiOpenSegment(hps, 10L);
  8918.     ptl.x = 175; ptl.y = 230;
  8919.     GpiMove(hps, &ptl);
  8920.     GpiSetColor(hps, CLR_PINK);
  8921.     GpiCharString(hps, 41,
  8922.         "METAFILE COPY METAFILE COPY METAFILE COPY");
  8923.     GpiCloseSegment(hps);
  8924.  
  8925.     GpiAssociate(hps, NULLHANDLE);   /* Disassociates PS and screen DC */
  8926.     GpiAssociate(hps, hdcMeta);      /* Associates PS and meta DC      */
  8927.     GpiDrawSegment(hps, 10L);        /* Draws segment into metafile    */
  8928.     GpiAssociate(hps, NULLHANDLE);   /* Disassociates PS and meta DC   */
  8929.     hmf = DevCloseDC(hdcMeta);       /* Closes metafile                */
  8930.  
  8931.     GpiAssociate(hps, hdc);          /* Associates PS and screen DC    */
  8932.     GpiSetDrawingMode(hps, DM_DRAW); /* Sets drawing mode to DM_DRAW   */
  8933.  
  8934.     /*
  8935.      * Load the array of options for GpiPlayMetaFile
  8936.      * with default values.
  8937.      */
  8938.  
  8939.     alOpt[PMF_SEGBASE]  = 0;                   /* Reserved                */
  8940.     alOpt[PMF_LOADTYPE] = LT_DEFAULT;          /* Default transformations */
  8941.     alOpt[PMF_RESOLVE]  = 0;                   /* Reserved                */
  8942.     alOpt[PMF_LCIDS]    = LC_DEFAULT;          /* Uses default lcids      */
  8943.     alOpt[PMF_RESET]    = RES_DEFAULT;         /* Uses default            */
  8944.     alOpt[PMF_SUPPRESS] = SUP_DEFAULT;         /* Uses default            */
  8945.     alOpt[PMF_COLORTABLES] = CTAB_DEFAULT;     /* Uses default            */
  8946.     alOpt[PMF_COLORREALIZABLE] = CREA_DEFAULT; /* Uses default            */
  8947.  
  8948.     GpiPlayMetaFile(hps,                  /* Plays metafile onto screen   */
  8949.         hmf, 8L, alOpt, (PLONG) NULL, 0L, (PSZ) NULL);
  8950. } /* fncMETA02 */
  8951.  
  8952. Copying a Graphic Segment to a Metafile 
  8953.  
  8954. If you want to create a simple drawing in a metafile for repeated display, you 
  8955. can set the drawing mode to DM_DRAW and draw directly into the metafile. The 
  8956. code in the first code fragment shows an example of how to do this. You can 
  8957. store named segments in the metafile that you are recording in DM_DRAW mode by 
  8958. bracketing your output primitive functions between GpiOpenSegment and 
  8959. GpiCloseSegment. 
  8960.  
  8961.  
  8962. ΓòÉΓòÉΓòÉ 9.2.3. Copying a Metafile to Disk ΓòÉΓòÉΓòÉ
  8963.  
  8964. You can copy a metafile to disk using GpiSaveMetaFile, and you can load the 
  8965. file back into your application using GpiLoadMetaFile. The following figure 
  8966. shows an example of how to copy a metafile to a file named META.MET, then load 
  8967. the same file back into the application and play it. 
  8968.  
  8969. #define INCL_GPIMETAFILES
  8970. #include <os2.h>
  8971. void fncMETA03(void){
  8972.     HMF hmf;
  8973.     HAB hab;
  8974.     HPS hps;
  8975.     LONG alOpt[10];
  8976.  
  8977.     GpiSaveMetaFile(hmf, "meta.met");           /* Saves metafile on disk  */
  8978.  
  8979.     hmf = GpiLoadMetaFile(hab, "meta.met");     /* Loads metafile          */
  8980.  
  8981.     alOpt[PMF_SEGBASE]  = 0;                    /* Reserved                */
  8982.     alOpt[PMF_LOADTYPE] = LT_DEFAULT;           /* Default transformations */
  8983.     alOpt[PMF_RESOLVE]  = 0;                    /* Reserved                */
  8984.     alOpt[PMF_LCIDS]    = LC_DEFAULT;           /* Uses default lcids      */
  8985.     alOpt[PMF_RESET]    = RES_DEFAULT;          /* Uses default            */
  8986.     alOpt[PMF_SUPPRESS] = SUP_DEFAULT;          /* Uses default            */
  8987.     alOpt[PMF_COLORTABLES]     = CTAB_DEFAULT;  /* Uses default            */
  8988.     alOpt[PMF_COLORREALIZABLE] = CREA_DEFAULT;  /* Uses default            */
  8989.  
  8990.     GpiPlayMetaFile(hps, hmf, 8, alOpt, (PLONG) NULL, 0L, (PSZ) NULL);
  8991. } /* fncMETA03 */
  8992.  
  8993.  
  8994. ΓòÉΓòÉΓòÉ 9.2.4. Playing a Metafile ΓòÉΓòÉΓòÉ
  8995.  
  8996. The following figure shows an example of how to play the metafile using the 
  8997. font, color table, and fill-pattern descriptions in your application's 
  8998. presentation space. 
  8999.  
  9000. #define INCL_GPIMETAFILES
  9001. #include <os2.h>
  9002. void fncMETA04(void){
  9003.     HPS hps;
  9004.     HMF hmf;
  9005.     LONG alOpt[10];
  9006.  
  9007.     alOpt[PMF_SEGBASE]  = 0;               /* Reserved                        */
  9008.     alOpt[PMF_LOADTYPE] = LT_DEFAULT;      /* Viewing transformation in PS    */
  9009.     alOpt[PMF_RESOLVE]  = RS_DEFAULT;      /* Reserved                        */
  9010.     alOpt[PMF_LCIDS]    = LC_DEFAULT;      /* Font and fill pattern in PS     */
  9011.     alOpt[PMF_RESET]    = RES_DEFAULT;     /* Page units and dimensions in PS */
  9012.     alOpt[PMF_SUPPRESS] = SUP_DEFAULT;     /* Draws metafile into PS          */
  9013.     alOpt[PMF_COLORTABLES]     = CTAB_DEFAULT;    /* Color table in PS        */
  9014.     alOpt[PMF_COLORREALIZABLE] = CREA_DEFAULT;    /* Sets realizable option   */
  9015.  
  9016.     GpiPlayMetaFile(hps, hmf, 8, alOpt, (PLONG) NULL, 0L, (PSZ) NULL);
  9017. } /* fncMETA04 */
  9018.  
  9019. The following figure shows an example of how to play a metafile using the font, 
  9020. color table, and fill-pattern descriptions in the metafile. 
  9021.  
  9022. #define INCL_GPIMETAFILES
  9023. #include <os2.h>
  9024. void fncMETA05(void){
  9025.     HPS hps;
  9026.     HMF hmf;
  9027.     LONG alOpt[10];
  9028.  
  9029.     alOpt[PMF_SEGBASE]  = 0;             /* Reserved                          */
  9030.     alOpt[PMF_LOADTYPE] = LT_DEFAULT;    /* Viewing transformation in PS      */
  9031.     alOpt[PMF_RESOLVE]  = RS_DEFAULT;    /* Reserved                          */
  9032.     alOpt[PMF_LCIDS]    = LC_LOADDISC;   /* Font and fill pattern in metafile */
  9033.     alOpt[PMF_RESET]    = RES_DEFAULT;   /* Page units and dimensions in PS   */
  9034.     alOpt[PMF_SUPPRESS] = SUP_DEFAULT;   /* Draws metafile into PS            */
  9035.     alOpt[PMF_COLORTABLES]     = CTAB_REPLACE;    /* Color table in metafile  */
  9036.     alOpt[PMF_COLORREALIZABLE] = CREA_DEFAULT;    /* Sets realizable option   */
  9037.  
  9038.     GpiPlayMetaFile(hps, hmf, 8, alOpt, (PLONG) NULL, 0L, (PSZ) NULL);
  9039. } /* fncMETA05 */
  9040.  
  9041. The following figure shows an example of how to play a metafile using the 
  9042. viewing transformation, page units, and presentation-page dimensions specified 
  9043. in the metafile. 
  9044.  
  9045. #define INCL_GPIMETAFILES
  9046. #include <os2.h>
  9047. void fncMETA06(void){
  9048.     HPS hps;
  9049.     HMF hmf;
  9050.     LONG alOpt[10];
  9051.  
  9052.     alOpt[PMF_SEGBASE]  = 0;                    /* Reserved                    */
  9053.     alOpt[PMF_LOADTYPE] = LT_ORIGINALVIEW;      /* Viewing transformation      */
  9054.     alOpt[PMF_RESOLVE]  = RS_DEFAULT;           /* Reserved                    */
  9055.     alOpt[PMF_LCIDS]    = LC_DEFAULT;           /* Font and fill pattern in PS */
  9056.     alOpt[PMF_RESET]    = RES_RESET;            /* Page units/dimensions       */
  9057.     alOpt[PMF_SUPPRESS] = SUP_DEFAULT;          /* Draws metafile into PS      */
  9058.     alOpt[PMF_COLORTABLES]     = CTAB_DEFAULT;  /* Uses color table in PS      */
  9059.     alOpt[PMF_COLORREALIZABLE] = CREA_DEFAULT;  /* Sets realizable option      */
  9060.  
  9061.     GpiPlayMetaFile(hps, hmf, 8, alOpt, (PLONG) NULL, 0L, (PSZ) NULL);
  9062. } /* fncMETA06 */
  9063.  
  9064.  
  9065. ΓòÉΓòÉΓòÉ 10. Print Job Submission and Manipulation ΓòÉΓòÉΓòÉ
  9066.  
  9067. The print subsystem of the OS/2 operating system provides a flexible, 
  9068. high-level interface between your application and an output device. Because 
  9069. most of the internal workings of the subsystem are shielded from both user and 
  9070. programmer, this chapter concentrates on the programming process required to 
  9071. produce hard copy output. Querying of printer resources, working under a 
  9072. specific user's environment, designing for application-specific requirements, 
  9073. and manipulation of print jobs also are described. 
  9074.  
  9075.  
  9076. ΓòÉΓòÉΓòÉ 10.1. About the Print Subsystem ΓòÉΓòÉΓòÉ
  9077.  
  9078. This section describes: 
  9079.  
  9080.      The print subsystem components 
  9081.      The print subsystem configuration 
  9082.      Printing data flow 
  9083.  
  9084.  
  9085. ΓòÉΓòÉΓòÉ 10.1.1. Print Subsystem Components ΓòÉΓòÉΓòÉ
  9086.  
  9087. The print subsystem comprises the following software components of the 
  9088. operating system: 
  9089.  
  9090.      Spooler 
  9091.      Print subsystem user interface 
  9092.      Queue drivers (queue processors) 
  9093.      Printer drivers 
  9094.      File system 
  9095.      Kernel device drivers 
  9096.  
  9097.  
  9098. ΓòÉΓòÉΓòÉ 10.1.1.1. Spooler ΓòÉΓòÉΓòÉ
  9099.  
  9100. The spooler is the central coordinating process for the print subsystem. It 
  9101. gives the user flexibility in organizing and optimizing the use of the system's 
  9102. printers. The spooler has a global view of the system's printing resources, 
  9103. particularly in a server environment and therefore is able to make the best use 
  9104. of those resources. 
  9105.  
  9106.      The spooler ensures that print output from two separately executing 
  9107.       applications cannot be intermixed on the printer. As an optional 
  9108.       optimization, the spooler can start a printing job before it is 
  9109.       completely queued. Any successive jobs are queued normally. 
  9110.  
  9111.      The spooler can print a job in the background while the user continues to 
  9112.       use the application. Other single-tasking operating systems, such as DOS, 
  9113.       require the user to wait until the print output is sent completely to the 
  9114.       printer. 
  9115.  
  9116.      The spooler can send jobs from PM applications across a network to a 
  9117.       remote server, without the application's knowledge. 
  9118.  
  9119.       Note:  The file system handles print jobs from non-PM applications. 
  9120.  
  9121.      Queues within the spooler can be used for various purposes. For example, 
  9122.       one queue could be used for large print jobs that are printed at times 
  9123.       when print demand is low. Another queue could be configured to print jobs 
  9124.       using a special size paper. Print jobs on this queue would be held until 
  9125.       the correct paper is loaded into the printer. 
  9126.  
  9127.      The spooler can support a number of printers simultaneously. It can be 
  9128.       configured so that jobs on a single queue can be shared among all the 
  9129.       printers. This load balancing, which is particularly important in server 
  9130.       environments, can be achieved without the application's knowledge. 
  9131.  
  9132.      Jobs can be prioritized while in the queue. For example, an urgent job 
  9133.       can be given a higher priority than ordinary jobs. 
  9134.  
  9135.  The spooler consists of one or more print queues, one for each printer object 
  9136.  defined by the user. Jobs are created by applications and placed in a queue, 
  9137.  waiting to print. When the previous job is completed, the next job in the 
  9138.  queue is sent to the printer. 
  9139.  
  9140.  
  9141. ΓòÉΓòÉΓòÉ 10.1.1.1.1. Print Job Formats ΓòÉΓòÉΓòÉ
  9142.  
  9143. The print jobs held in a spooler queue are known as spool files. Spool files 
  9144. contain the following: 
  9145.  
  9146.      Parameters submitted with the print job 
  9147.      Print job data 
  9148.  
  9149.  Print job data is in one of two formats: 
  9150.  
  9151.      PM_Q_STD 
  9152.  
  9153.       Standard output data, PM_Q_STD is spooled as a PM metafile; that is, as a 
  9154.       series of graphics orders stored in a packed binary format. PM_Q_STD 
  9155.       print jobs are created through the GPI. 
  9156.  
  9157.       An advantage of the PM_Q_STD format is that the files are smaller than 
  9158.       PM_Q_RAW format files. The smaller size saves disk space for jobs in the 
  9159.       spooler queue and reduces network traffic when transmitting the data to a 
  9160.       network server. 
  9161.  
  9162.       The content of PM_Q_STD jobs can be viewed using the PICVIEW application. 
  9163.       This is achieved using the job-content menu on a print job in the printer 
  9164.       object. The multi-page spool file can be shown in a device-independent 
  9165.       manner so that the content of the job can be recognized easily. 
  9166.  
  9167.       After a job is spooled and ready to print, the spooler sends the PM_Q_STD 
  9168.       job to the queue driver. The queue driver replays the metafile, through 
  9169.       the GPI, to the appropriate printer driver. The driver, in turn, converts 
  9170.       the data to printer-specific commands, that is, a printer-specific 
  9171.       format. 
  9172.  
  9173.       There are some restrictions on the content of PM_Q_STD jobs that are 
  9174.       related to the restrictions for PM metafiles. PM applications that cannot 
  9175.       deal with these restrictions should enqueue print jobs using PM_Q_RAW, 
  9176.       but there is an increase in required disk space and, possibly, network 
  9177.       traffic. 
  9178.  
  9179.       Print jobs sent to network servers that do not support PM are converted 
  9180.       automatically to the PM_Q_RAW format by the system. The application still 
  9181.       can continue specifying PM_Q_STD. 
  9182.  
  9183.       Note:  The effect of converting all PM_Q_STD print jobs to PM_Q_RAW can 
  9184.       be turned on by the user's selecting Printer-specific format in a printer 
  9185.       object settings page. 
  9186.  
  9187.      PM_Q_RAW 
  9188.  
  9189.       Raw data, PM_Q_RAW, is the actual printer command to print the job. For 
  9190.       example, raw data created for an HP** LaserJet** printer contains Printer 
  9191.       Command Language (PCL) commands; and raw data created for a PostScript** 
  9192.       printer contains PostScript commands. 
  9193.  
  9194.       The content of PM_Q_RAW jobs can be viewed with the system editor. This 
  9195.       is achieved using the job content menu on a print job in the printer 
  9196.       object. However, it is not always easy to recognize the content of a job. 
  9197.       For example, PostScript is very hard to understand and get a visual idea 
  9198.       of the actual output. 
  9199.  
  9200.       Print jobs are created by the file system as a result of printing 
  9201.       directly to the physical port using either INT 17 or INT 21 under DOS or 
  9202.       the OS/2 DosOpen API. These print jobs always are queued using PM_Q_RAW. 
  9203.       The actual queue chosen depends on the port used and the configuration of 
  9204.       the print subsystem. 
  9205.  
  9206.       PM applications also can use the PM_Q_RAW format, but the overall 
  9207.       print-job creation process normally is slower because the printer driver 
  9208.       has to perform more work to create the printer-specific format. 
  9209.  
  9210.       If the Print while spooling printer object setting is turned on, the user 
  9211.       can perceive a faster response. In particular for a multi-page document, 
  9212.       the first page starts printing as soon as the printer driver has 
  9213.       completely finished converting the GPI to the printer-specific format. 
  9214.  
  9215.  Note:  PM applications always should specify the PM_Q_STD format. The 
  9216.  difference in disk space used can be from a factor of 2 to a factor of 50. The 
  9217.  Printer-specific format and Print while spooling printer object settings can 
  9218.  be used to configure optimal performance for the environment. 
  9219.  
  9220.  Although the base operating system supports the two print job formats 
  9221.  described above, other formats can be supported by providing an appropriate 
  9222.  queue driver. 
  9223.  
  9224.  
  9225. ΓòÉΓòÉΓòÉ 10.1.1.2. Disabling the Spooler ΓòÉΓòÉΓòÉ
  9226.  
  9227. The workplace user interface to control the spooler can be found in the System 
  9228. Setup folder. For special circumstances or applications, the spooler object can 
  9229. be used to disable the spooler. Generally, this is not recommended because the 
  9230. output from two applications can intermix, or one application can be paused 
  9231. until the first application has finished sending data to the printer. 
  9232.  
  9233.  
  9234. ΓòÉΓòÉΓòÉ 10.1.1.3. Print Subsystem User Interface ΓòÉΓòÉΓòÉ
  9235.  
  9236. The print subsystem user interface is composed of printer objects. The spooler 
  9237. implements each printer object by using a queue to hold the jobs. The queue is 
  9238. connected to a logical device that specifies configuration data about the 
  9239. actual physical device, for example, the port and printer drivers. 
  9240.  
  9241. The print subsystem user interface performs the following basic functions: 
  9242.  
  9243.      Print job status 
  9244.  
  9245.       Opening a printer object folder displays an icon or detail view of the 
  9246.       print jobs waiting in the spooler queue. Opening the settings on an 
  9247.       individual job displays the parameters that were used when the job was 
  9248.       queued. Some settings, such as the number of copies, can be changed while 
  9249.       the print job is waiting in the queue. 
  9250.  
  9251.      Print job manipulation 
  9252.  
  9253.       Individual print jobs can be held in or released from the queue. Holding 
  9254.       a print job means that it is not printed. Individual or all the print 
  9255.       jobs in a queue can be deleted. 
  9256.  
  9257.      Queue manipulation 
  9258.  
  9259.       Queues also can be held, released, deleted, copied, or created using the 
  9260.       printer object context menu. 
  9261.  
  9262.      Printer object configuration 
  9263.  
  9264.       Opening a printer object settings notebook enables a user to browse and 
  9265.       modify the configuration of a printer object. For example, the printer 
  9266.       driver can be changed if the user just obtained new printer. 
  9267.  
  9268.  
  9269. ΓòÉΓòÉΓòÉ 10.1.1.4. Queue Driver ΓòÉΓòÉΓòÉ
  9270.  
  9271. The queue driver is also called a queue processor. It is used to take print 
  9272. jobs from a queue and print the data using the printer driver. The print job 
  9273. data (either PM_Q_STD or PM_Q_RAW format) is passed through the GPI. For 
  9274. PM_Q_STD jobs, GpiPlayMetaFile is used; and for PM_Q_RAW jobs, the DevEscape 
  9275. DEVESC_RAWDATA is used. 
  9276.  
  9277.  
  9278. ΓòÉΓòÉΓòÉ 10.1.1.5. Printer Driver ΓòÉΓòÉΓòÉ
  9279.  
  9280. Printer drivers know all details of the printer they support; therefore, 
  9281. printer drivers are unique for each model of printer supported by the operating 
  9282. system. The printer driver is responsible for: 
  9283.  
  9284.      Displaying a dialog that enables the user to inform the system how the 
  9285.       physical printer is configured; for example, which paper sizes are 
  9286.       installed. 
  9287.  
  9288.      Displaying a dialog that enables the user to configure an individual 
  9289.       print job; for example, which orientation (portrait or landscape) to use. 
  9290.  
  9291.      Responding to application queries for available printer capabilities such 
  9292.       as color, resolution and forms. 
  9293.  
  9294.      Converting the GPI commands in a print job to the printer-specific 
  9295.       language commands that will produce the expected output. The 
  9296.       printer-specific commands are passed to the file system. 
  9297.  
  9298.  
  9299. ΓòÉΓòÉΓòÉ 10.1.1.6. Port Drivers ΓòÉΓòÉΓòÉ
  9300.  
  9301. Port drivers are dynamic link libraries (DLLs) that contain a set of 32-bit 
  9302. functions, which provide helper functions for the spooler and Workplace Shell. 
  9303. For each port driver DLL, there should be a physical port driver (SYS file) 
  9304. installed in the CONFIG.SYS file. The file type of a port driver is .PDR. 
  9305.  
  9306. The operating system, by default, provides two port drivers; SERIAL.PDR 
  9307. supports COM1 - 4, and PARALLEL.PDR supports LPT1 - 3. For any other port, the 
  9308. supplier of the physical port software is responsible for providing a 
  9309. Presentation Manager port driver if it is necessary. 
  9310.  
  9311. The functions exported from a port driver are: 
  9312.  
  9313.      SplPdEnumPort 
  9314.      SplPdGetPortIcon 
  9315.      SplPdInitPort 
  9316.      SplPdInstallPort 
  9317.      SplPdQueryPort 
  9318.      SplPdRemovePort 
  9319.      SplPdSetPort 
  9320.      SplPdTermPort 
  9321.  
  9322.  
  9323. ΓòÉΓòÉΓòÉ 10.1.1.7. File System ΓòÉΓòÉΓòÉ
  9324.  
  9325. The file system is involved in both the spooling process and the printing 
  9326. process. When non-PM applications create print data, the file system intercepts 
  9327. the data and places it on a spooler queue. After a printer driver has processed 
  9328. a print job, the file system sends the data to the appropriate file or device 
  9329. using a kernel device driver. 
  9330.  
  9331.  
  9332. ΓòÉΓòÉΓòÉ 10.1.1.8. Kernel Device Driver ΓòÉΓòÉΓòÉ
  9333.  
  9334. The system provides device drivers for physical devices. The two most commonly 
  9335. used by the print subsystem are the parallel device driver and the serial 
  9336. device driver. 
  9337.  
  9338.  
  9339. ΓòÉΓòÉΓòÉ 10.1.2. Print Subsystem Configuration ΓòÉΓòÉΓòÉ
  9340.  
  9341. From a user's viewpoint, a printer object represents a printer. The user can 
  9342. specify the printer object settings for configuration; for example, which 
  9343. printer driver and port to use. 
  9344.  
  9345. From a programmer's viewpoint, print configuration is more complicated. Each 
  9346. printer object actually consists of a queue connected to a logical device. The 
  9347. following figure shows some example configurations. The top-left and top-right 
  9348. pictures show one printer object; the bottom-left picture shows two printer 
  9349. objects; the bottom-right picture shows three printer objects. 
  9350.  
  9351. Example Configurations of Queues, Devices, and Printer Objects 
  9352.  
  9353. Multiple queues connected to a single device is termed printer sharing. The 
  9354. advantage of printer sharing is that two queues can have different 
  9355. configurations or be used for different purposes. For example: 
  9356.  
  9357.      One queue could be used for small jobs that are needed quickly, and the 
  9358.       other could be used for large jobs printed during times of low demand, 
  9359.       such as overnight. 
  9360.  
  9361.      One queue could be used for a normal form such as a letter, and the other 
  9362.       could be for a special form and so, would be held. When the special form 
  9363.       was loaded into the printer, that queue could be released and the normal 
  9364.       form queue could be held. 
  9365.  
  9366.  A single queue connected to multiple devices is termed printer pooling. This 
  9367.  allows print jobs to be shared among printers for load balancing. The spooler 
  9368.  does this by printing a job on the next available printer. For example, one 
  9369.  printer usually reserved exclusively for special forms could be connected to a 
  9370.  normal form queue during peak loads. The special form queue would be held 
  9371.  temporarily. 
  9372.  
  9373.  Note:  Configuration of a device without a queue is not allowed by the OS/2 
  9374.  operating system. 
  9375.  
  9376.  The logical device has the following configuration parameters that are 
  9377.  relevant to application programmers: 
  9378.  
  9379.      Name and description 
  9380.      Logical port (for example, LPT1) 
  9381.      List of printer drivers 
  9382.  
  9383.       For example, a logical device representing an HP LaserJet printer with an 
  9384.       installed PostScript option could have both the HP LaserJet printer 
  9385.       driver and the PostScript printer driver in its configuration. 
  9386.  
  9387.       Each printer driver in the list also could have printer properties 
  9388.       associated with it. Printer properties describe the physical 
  9389.       configuration of the printer, such as what size paper is installed. 
  9390.  
  9391.  The queue has the following configuration parameters that are relevant to 
  9392.  application programmers: 
  9393.  
  9394.      Name and description 
  9395.  
  9396.       It is the queue description not the queue name that is used for the 
  9397.       printer object title- that is, the text displayed beneath a printer 
  9398.       object icon. 
  9399.  
  9400.      Printer driver 
  9401.  
  9402.      Default job properties 
  9403.  
  9404.       Job properties describe the parameters that must be used for printing a 
  9405.       specific job. An example of a job property is the orientation. The 
  9406.       queue's job property defaults are used if none are supplied by the 
  9407.       application. 
  9408.  
  9409.      Queue driver 
  9410.  
  9411.      Flags for Printer-specific format and Print while spooling settings 
  9412.  
  9413.      Separator page 
  9414.  
  9415.      Start and stop times 
  9416.  
  9417.  The configuration data for printer objects is stored in the OS2SYS.INI file. 
  9418.  The spooler provides a set of functions that can be used to query and set this 
  9419.  data. 
  9420.  
  9421.  Note:  Older PM applications might still use the Profile functions (for 
  9422.  example, PrfQueryProfileString). If so, these applications must be recoded 
  9423.  with the new functions to avoid any dependencies on where and how the system 
  9424.  stores configuration data. 
  9425.  
  9426.  
  9427. ΓòÉΓòÉΓòÉ 10.1.3. Printing Data Flow ΓòÉΓòÉΓòÉ
  9428.  
  9429. The data flow between your application, the printer driver, the spooler, and 
  9430. the kernel device driver is shown in the following figure. In addition to the 
  9431. data flow for the printer data stream, the data flow for screen output is 
  9432. shown. From an application's point of view, creating output for a printer is 
  9433. conceptually the same as creating screen output. 
  9434.  
  9435. Overview of the Application Interface and Data Flow 
  9436.  
  9437. There are three routes that the application's printer data can follow: 
  9438.  
  9439.      Base Printing 
  9440.  
  9441.       Base printing is provided primarily for non-PM programs writing complete 
  9442.       printer data streams, including all printer control codes, directly to a 
  9443.       printer port. It also provides compatibility for applications that run 
  9444.       under DOS or Microsoft** Windows**. 
  9445.  
  9446.      Queued PM Printing 
  9447.  
  9448.       Queued printing is recommended for all PM programs. It provides the most 
  9449.       flexibility, both for the application and the user. 
  9450.  
  9451.       Print jobs created by PM applications are queued on a spooler queue. The 
  9452.       spool files are processed and finally sent to the printer asynchronously 
  9453.       from the application. 
  9454.  
  9455.       Note:  If the spooler is disabled, queued print jobs perform as though 
  9456.       they were submitted for PM direct printing. 
  9457.  
  9458.      Direct PM Printing 
  9459.  
  9460.       Conceptually, direct printing is the same as queued printing for the 
  9461.       application interface, but the spooler is bypassed. Therefore, the data 
  9462.       is sent directly to the printer, and the application has to wait until 
  9463.       the printing is finished. Following are some of the reasons for PM 
  9464.       applications to avoid direct printing: 
  9465.  
  9466.         -  The print job can interfere with other users whose jobs are destined 
  9467.            for this printer. Print output could be mixed with the other print 
  9468.            jobs 
  9469.  
  9470.         -  The spooler allows only one job at a time to print to a particular 
  9471.            port to avoid mixing of print job output. If your application tries 
  9472.            to print directly to the same port while another job is printing, 
  9473.            your user must wait for the current job to complete before the 
  9474.            user's job can begin. 
  9475.  
  9476.         -  The printing application loses some of its multitasking advantages 
  9477.            because one job must complete before a second job is submitted. 
  9478.  
  9479.         -  The printer device driver does not protect a print job from job 
  9480.            property and printer property mismatches. 
  9481.  
  9482.         -  Pictures printed directly can be different from those printed 
  9483.            through a spooler. The default setting for direct printing is to 
  9484.            print pictures their actual size, whereas the default for queue 
  9485.            printing is scaled to fit for the output area. 
  9486.  
  9487.       Direct printing is recommended only for specialized applications that use 
  9488.       dedicated hard copy devices. Print jobs that have a certain degree of 
  9489.       security associated with them, such as a corporate payroll or 
  9490.       confidential documents, might best be handled with direct printing 
  9491.       because files in the spooler can be copied. 
  9492.  
  9493.       Jobs that are very large, that is, over 10MB, that you do not want copied 
  9494.       in the spool file, also might best be printed directly. 
  9495.  
  9496.  
  9497. ΓòÉΓòÉΓòÉ 10.2. Using the Print Subsystem ΓòÉΓòÉΓòÉ
  9498.  
  9499. This section covers the following aspects of using the print subsystem: 
  9500.  
  9501.      Submitting a non-Presentation Manager (base) print job 
  9502.      Submitting a queued Presentation Manager print job 
  9503.      Submitting a direct Presentation Manager print job 
  9504.      Submitting a print job directly to the spooler 
  9505.      Spooler management and configuration 
  9506.  
  9507.  
  9508. ΓòÉΓòÉΓòÉ 10.2.1. Submitting a Non-Presentation Manager (Base) Print Job ΓòÉΓòÉΓòÉ
  9509.  
  9510. A program can create a complete printer data stream including all printer 
  9511. control codes (called a raw data stream) by using DosOpen, DosWrite, and 
  9512. DosClose. This is called base printing and it is used by: 
  9513.  
  9514.      OS/2 and DOS Print command 
  9515.       (for example, PRINT CONFIG.SYS /D:LPT2) 
  9516.  
  9517.      OS/2 and DOS Copy command 
  9518.       (for example COPY CONFIG.SYS LPT1:) 
  9519.  
  9520.      OS/2 and DOS Redirected Output 
  9521.       (for example DIR > LPT1: or TYPE C:\CONFIG.SYS > LPT1:) 
  9522.       (full screen hard copy) 
  9523.  
  9524.      All DOS applications 
  9525.  
  9526.      All family applications (applications running under DOS and OS/2) 
  9527.  
  9528.      All Microsoft Windows applications. 
  9529.  
  9530.  Non-PM applications developed under OS/2 2.0 that must generate graphical data 
  9531.  must be able to generate all the necessary Escape Codes, or printer-specific 
  9532.  control sequences. Such applications will be coded differently, depending on 
  9533.  the printer family-for example, Epson**, HP** LaserJet**, LaserPrinter*, 
  9534.  Proprinter*, or PostScript**. 
  9535.  
  9536.  Non-PM applications that successfully drove the printer in the environment for 
  9537.  which they were designed-DOS for example-will continue to do so successfully 
  9538.  under this operating system. 
  9539.  
  9540.  DOS applications that directly access output hardware registers could have 
  9541.  difficulty printing under the operating system. If this is so, these 
  9542.  applications might need to be rewritten. 
  9543.  
  9544.  
  9545. ΓòÉΓòÉΓòÉ 10.2.2. Submitting a Queued Presentation Manager Print Job ΓòÉΓòÉΓòÉ
  9546.  
  9547. There are several stages involved in using the PM programming interface to 
  9548. print your application data. From a user interface point of view, the following 
  9549. four dialogs must be provided. The exact order in which these dialogs are used 
  9550. will govern the order of program execution. 
  9551.  
  9552.      Page setup dialog 
  9553.  
  9554.       The page setup dialog enables the user to specify the form name or size 
  9555.       required. Options on this dialog can include margins on the page, header 
  9556.       and footer strings, and whether duplex formatting is required. 
  9557.  
  9558.       The actual contents of the dialog depend on the type of application. The 
  9559.       important factor is that this page specify formatting options that also 
  9560.       are used to display to a screen. 
  9561.  
  9562.      Printer setup dialog 
  9563.  
  9564.       The printer setup dialog displays a list of queues available to the user. 
  9565.       A Job properties push button on this dialog enables the user to query and 
  9566.       modify the job properties for this job. 
  9567.  
  9568.      Font dialog 
  9569.  
  9570.       Most PM applications must enable the user to specify the font (or fonts) 
  9571.       required. Once the user has chosen a printer, an option on the fonts 
  9572.       dialog enables the user to choose from device fonts as well as system 
  9573.       fonts. 
  9574.  
  9575.      Print dialog 
  9576.  
  9577.       The application should have a Print menu item on the File menu to invoke 
  9578.       an application-specific print dialog. It is recommended that Shift+Print 
  9579.       Screen be used as an accelerator for printing the client area. The 
  9580.       Print-Screen key, unshifted, is used to capture and print a window or the 
  9581.       whole screen. 
  9582.  
  9583.  
  9584. ΓòÉΓòÉΓòÉ 10.2.2.1. Page Setup Dialog ΓòÉΓòÉΓòÉ
  9585.  
  9586. The page setup dialog is concerned with formatting options for the document. 
  9587. The user must be able to specify the form name, margins, and other 
  9588. application-specific formatting options such as page duplexing; that is, 
  9589. different formats for left and right pages in a multi-page document. 
  9590.  
  9591. Note:  The application is responsible for storing the user-defined margins for 
  9592. the form. The application must not allow the user to specify margins smaller 
  9593. than those returned by the printer driver. 
  9594.  
  9595. Application Page Setup Dialog 
  9596.  
  9597.  
  9598. ΓòÉΓòÉΓòÉ 10.2.2.1.1. Forms Selection ΓòÉΓòÉΓòÉ
  9599.  
  9600. If the user has not chosen a specific printer, the application can supply a 
  9601. list of standard form sizes- for example, Letter, Legal, Ledger, A4, and A3. 
  9602. The application also must consider, at a minimum, a 0.4 inch (10mm) margin on 
  9603. the form to be within the hardware clip limits of most printers. See the 
  9604. following table for the common form sizes. 
  9605.  
  9606. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  9607. ΓöéForm Name           ΓöéSize in inches      ΓöéSize in mm          Γöé
  9608. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9609. ΓöéLetter              Γöé8.5 x 11            Γöé216 x 279           Γöé
  9610. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9611. ΓöéLegal               Γöé8.5 x 14            Γöé216 x 356           Γöé
  9612. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9613. ΓöéLedger              Γöé11 x 17             Γöé279 x 432           Γöé
  9614. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9615. ΓöéA4                  Γöé8.3 x 11.7          Γöé210 x 297           Γöé
  9616. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  9617. ΓöéA3                  Γöé11.7 x 16.5         Γöé297 x 420           Γöé
  9618. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  9619.  
  9620. When a printer is chosen, it must be queried, using DevQueryHardcopyCaps for 
  9621. the forms it supports and the hardware clip margins. First, however, a device 
  9622. context must be created. It is recommended that a OD_INFO context be used, 
  9623. because OD_QUEUED can result in the creation of a print job. See the following 
  9624. figure for a sample code fragment. 
  9625.  
  9626. PPRDINFO3    pprd3Device;                     /* From SplQueryDevice   */
  9627. PPRQINFO3    pprq3Queue;                      /* From SplQueryQueue    */
  9628. PSZ          pszTmp;                          /* Temporary pointer     */
  9629. HDC          hdc;                             /* Device context handle */
  9630. DEVOPENSTRUC dopData;                         /* DEVOPEN structure     */
  9631. LONG         clForms;                         /* Number of forms       */
  9632.                                               /* The device            */
  9633. PHCINFO      pchinfo;                         /* Forms information     */
  9634.                                               /* structure             */
  9635. ULONG        ulrc=DEV_OK;                     /* Return code           */
  9636.  
  9637. /* Fill in data for devopendata for OD_INFO                            */
  9638. dopData.pszLogAddress = pprd3Device->pszLogAddr;
  9639. pszTmp = strchr(pprq3Queue->pszDriverName,'.');
  9640. if (pszTmp)
  9641.     *pszTmp = '\0';
  9642. dopData.pszDriverName = pprq3Queue->pszDriverName;
  9643. dopData.pdriv = pprq3Queue->pDriverData;
  9644.  
  9645. /* Open the information device context                                 */
  9646.  
  9647. hdc = DevOpenDC ( (HAB)0,
  9648.          OD_INFO,                             /* Type                  */
  9649.          "*",                                 /* Default token         */
  9650.          3L,                                  /* Count                 */
  9651.          &dopData,                            /* Pointer to data       */
  9652.          (HDC)0);                             /* Comp dc               */
  9653.  
  9654. /* Query number of forms available on the device                       */
  9655. clForms = DevQueryHardcopyCaps(hdc,
  9656.                                0L        /* Start at beginning of list */
  9657.                                0L,       /* Get number of forms        */
  9658.                                NULL);
  9659.  
  9660. /* Allocate memory block for forms                                     */
  9661. if (DosAllocMem((PPVOID(&pchinfo), clForms*sizeof(HCINFO), fALLOC))
  9662. {
  9663.     DevCloseDC(hdc);
  9664.     return(DEV_ERROR);
  9665. }
  9666.  
  9667. /* Query forms data                                                    */
  9668. ulrc = DevQueryHardcopyCaps(hdc,
  9669.                             0L,          /* Start with first form      */
  9670.                             clForms,     /* Query all forms            */
  9671.                             pchinfo);    /* Structure to hold returned */
  9672.                                          /* data                       */
  9673.  
  9674. /* Close the information device context                                */
  9675. DevCloseDC (hdc);                        /* Close the information      */
  9676.                                          /* device context             */
  9677.  
  9678. /* Now use forms information in pchinfo                                */
  9679.  
  9680. DevQueryHardcopyCaps returns one HCINFO structure for each form. The contents 
  9681. of the structure are: 
  9682.  
  9683.      ASCIIZ name of the form (for example, Letter) 
  9684.      Width and height (in millimeters) of the paper 
  9685.      Clipping limits (in millimeters) of the paper 
  9686.      Number of pels between clipping limits 
  9687.      Whether this form is the one installed currently on the device, or 
  9688.       whether it is selectable from another paper bin 
  9689.  
  9690.  Then the list of forms can be displayed to the user. The form preselected in 
  9691.  the list should be one of the forms marked with the HCINFO structure flag 
  9692.  HCAPS_CURRENT. 
  9693.  
  9694.  It is recommended that an application indicate to the user which forms are 
  9695.  currently installed in the printer. This is done by including the HCINFO 
  9696.  structure flag HCAPS_SELECTABLE. Then users can decide whether they want a 
  9697.  quick print on a form available from the printer or to install a different 
  9698.  paper tray in the printer. 
  9699.  
  9700.  
  9701. ΓòÉΓòÉΓòÉ 10.2.2.2. Printer Setup Dialog ΓòÉΓòÉΓòÉ
  9702.  
  9703. In a printer setup dialog, an application should offer a list of printer 
  9704. objects that are available to the user and enable the user to select one. (The 
  9705. list of printer objects actually is a list of queues.) If none are available, 
  9706. an appropriate message must be displayed. An application must query the list of 
  9707. available printer objects each time the printer setup dialog is displayed 
  9708. because the user might have created or modified the printer configuration while 
  9709. the application was executing. The following figure is an example of a printer 
  9710. setup dialog. 
  9711.  
  9712. Application Printer Setup Dialog 
  9713.  
  9714. Note:  If the document was formatted for a particular device and the user 
  9715. selects a different printer, the application must ask the user's permission 
  9716. before reformatting the document for the new printer. 
  9717.  
  9718. Use SplEnumQueue to query the list of printers (printer objects); printer 
  9719. objects essentially are spool queues. SplEnumQueue returns both a list of 
  9720. queues and information about each queue on the local workstation in an array of 
  9721. PRQINFO3 structures. It also returns information about local workstation queues 
  9722. that reference network print queues. 
  9723.  
  9724. Because the number of queues might vary for each use of your application, it is 
  9725. essential to allocate sufficient storage to hold the data returned by 
  9726. SplEnumQueue. Usually the application issues the query twice:  the first time, 
  9727. the application determines the necessary size of the information buffer; after 
  9728. allocating a memory block, the second query actually retrieves the information. 
  9729.  
  9730. The SplEnumQueue parameter pcTotal contains the number of queues available on 
  9731. the local system. The application should display an appropriate message box if 
  9732. the value is 0. 
  9733.  
  9734. The queue description (returned in the structure PRQINFO3 field name 
  9735. pszComment) is the printer object title. This is much more familiar to the user 
  9736. than the queue name, which is displayed only on the view settings page of a 
  9737. printer object. Therefore, the printer setup dialog should show the queue 
  9738. descriptions instead of the queue names. 
  9739.  
  9740. SplEnumQueue returns information about the queue that might influence the 
  9741. user's or application's decision to print to this queue; for example, the queue 
  9742. priority, or the number of jobs already in the queue. SplEnumQueue also returns 
  9743. the default job properties for the queue. This data can be used by the 
  9744. application for the Job properties push button on the printer setup dialog. 
  9745.  
  9746. Less sophisticated applications might decide to dispense with the printer setup 
  9747. dialog and just print to the default queue. The default queue can be queried 
  9748. using PrfQueryProfileString, with an application name of PM_SPOOLER and a 
  9749. keyname of QUEUE. The spooler function SplQueryQueue then can be called to 
  9750. retrieve the default job properties. 
  9751.  
  9752.  
  9753. ΓòÉΓòÉΓòÉ 10.2.2.3. Job Properties Considerations ΓòÉΓòÉΓòÉ
  9754.  
  9755. Job properties are options on a per-job basis- for example, orientation, 
  9756. resolution, and form selection. The job properties dialog is displayed by the 
  9757. printer driver. Each driver has a different dialog, depending on the 
  9758. capabilities of the printer. The job properties are held in a printer 
  9759. driver-specific format in the abGeneralData field of the DRIVDATA structure. 
  9760.  
  9761. Note:  Job properties from one printer driver should not be given to another 
  9762. printer driver; the job properties probably will not be understood, and the 
  9763. printer driver will either return an error or substitute some default job 
  9764. properties. Then the user will see a change in job properties stored 
  9765. previously. 
  9766.  
  9767. The user should be given the opportunity to change the job properties before 
  9768. the job is printed. This can be achieved by supplying a Job properties push 
  9769. button on the printer setup dialog. 
  9770.  
  9771. Changing job properties requires two steps: 
  9772.  
  9773.      Retrieving job properties 
  9774.  
  9775.      Displaying the job properties dialog 
  9776.  
  9777.  
  9778. ΓòÉΓòÉΓòÉ 10.2.2.3.1. Retrieving Job Properties ΓòÉΓòÉΓòÉ
  9779.  
  9780. The application can retrieve job properties from the following: 
  9781.  
  9782.      Previously saved job properties with the document 
  9783.      Current application session job properties 
  9784.      Default job properties from the queue (from pDriverData in the PRQINFO3 
  9785.       data structure) 
  9786.      Printer driver device defaults (from DevPostDeviceModes using the 
  9787.       DPDM_QUERYJOBPROP flag). 
  9788.  
  9789.  If no job properties were saved with the document, then there may be job 
  9790.  properties that are being used by another document that also is to be printed 
  9791.  to the same queue. 
  9792.  
  9793.  If job properties still cannot be found, then the default job properties 
  9794.  stored with the queue can be used. It may be that the user has not set up any 
  9795.  default job properties for the queue. Last, query the printer driver for its 
  9796.  device defaults using DevPostDeviceModes with the DPDM_QUERYJOBPROP flag. 
  9797.  
  9798.  
  9799. ΓòÉΓòÉΓòÉ 10.2.2.3.2. Displaying Job Properties Dialog ΓòÉΓòÉΓòÉ
  9800.  
  9801. The sample code in the following figure shows how to display the job properties 
  9802. dialog. All the parameters required are available from the PRQINFO3 structure 
  9803. returned by SplEnumQueue or SplQueryQueue. 
  9804.  
  9805. In the case of printer pooling, the pszPrinters field of the PRQINFO3 structure 
  9806. contains a list of device names, separated by commas. It is sufficient to 
  9807. choose the first printer in the list because the printer object ensures that 
  9808. the configuration of each spooled printer is the same. 
  9809.  
  9810. Note:  It is possible that the printer driver now uses a larger buffer for the 
  9811. job properties than the application is expecting. This occurs when a new 
  9812. version of a printer driver that supports some additional features is 
  9813. installed. In this case, the application must discard the existing document job 
  9814. properties, after a confirmation from the user, and query the printer driver 
  9815. for its device defaults, using the DPDM_QUERYJOBPROPS parameter to 
  9816. DevPostDeviceModes. 
  9817.  
  9818. #define INCL_DEV
  9819. #define INCL_DOS
  9820. #include <os2.h>
  9821. #include <memory.h>
  9822.  
  9823. {
  9824.     ULONG         ulrc=FALSE;
  9825.     HAB           hab;
  9826.     PPRQINFO3     pprq3Queue;    /* From SplEnumQueue or SplQueryQueue */
  9827.     PSZ           pszDriverName,pszDeviceName,pszTmp;
  9828.     HDC           hdc=NULL;
  9829.     LONG          cbBuf;
  9830.  
  9831. /* Use the first device name in the PRQINFO3 structure                 */
  9832.    pszTmp = strchr(pprq3Queue->pszPrinters, ',');
  9833.    if (pszTmp)
  9834.        *pszTmp = '\0';
  9835.  
  9836. /* Use just the driver name from the driver.device string              */
  9837.    pszDeviceName = strchr(pprq3Queue->pszDriverName, '.');
  9838.    if (pszDeviceName)
  9839.    {
  9840.        *pszDeviceName = '\0';
  9841.        pszDeviceName++;
  9842.    }
  9843.  
  9844. /* Check size of buffer required for job properties                    */
  9845.     cbBuf = DevPostDeviceModes( hab,
  9846.                                 (PDRIVDATA)NULL,
  9847.                                 pprq3Queue->pszDriverName,
  9848.                                 pszDeviceName,
  9849.                                 pprq3Queue->pszPrinters,
  9850.                                 DPDM_POSTJOBPROP
  9851.                               );
  9852.  
  9853. /* Return error to caller                                              */
  9854.     if (cbBuf<=0)
  9855.         return(cbBuf);
  9856.  
  9857. /* Return BUFFER TOO SMALL error to caller                             */
  9858.     if (cbBuf > pprq3Queue->pDriverData->cb)
  9859.         return(DPDM_ERROR);
  9860.  
  9861. /* Display job properties dialog & get updated job properties from driver */
  9862.     ulrc = DevPostDeviceModes( hab,
  9863.                                pprq3Queue->pDriverData,
  9864.                                pprq3Queue->pszDriverName,
  9865.                                pszDeviceName,
  9866.                                pprq3Queue->pszPrinters,
  9867.                                DPDM_POSTJOBPROP
  9868.                              );
  9869.     return(ulrc);
  9870. }
  9871.  
  9872.  
  9873. ΓòÉΓòÉΓòÉ 10.2.2.4. Font Dialog and Device Font Considerations ΓòÉΓòÉΓòÉ
  9874.  
  9875. There are two types of fonts: 
  9876.  
  9877.      System fonts, which can be used for both displays and printers, and 
  9878.       therefore, are generally more flexible. 
  9879.  
  9880.      Device fonts, which are specific to a particular device. Device fonts for 
  9881.       printers can be built-in or be installed with font cartridges by a user. 
  9882.       Device fonts also can be available on diskette (also termed soft fonts) 
  9883.       and can be downloaded to the printer as required by the printer driver. 
  9884.  
  9885.       The advantage of device fonts is that, usually, they are printed in the 
  9886.       highest resolution of the device and are faster than system fonts. 
  9887.  
  9888.  Note:  Some printer drivers, in particular, the HP LaserJet (LASERJET) and the 
  9889.  LaserPrinter (IBM4019) printer drivers provide an intermediate solution. An 
  9890.  option on the job properties dialog enables system fonts to be downloaded to 
  9891.  the printer as soft fonts. 
  9892.  
  9893.  As stated earlier, an application must provide the user with the ability to 
  9894.  choose fonts and, in particular, to choose a device font over a system font to 
  9895.  achieve better performance. A standard font dialog box should be used (see 
  9896.  WinFontDlg). 
  9897.  
  9898.  When an application uses device fonts, and the output mixes text and graphics 
  9899.  pictures, the device fonts are clipped per character. System fonts give more 
  9900.  precise clipping to the pel. The following figure illustrates the results from 
  9901.  clipping two lines of text:  one generated in a system font; the other, in a 
  9902.  device font. 
  9903.  
  9904.  Character Clipping Results for Device and System Fonts 
  9905.  
  9906.  The available device fonts can be queried, using GpiQueryFonts, in either an 
  9907.  OD_INFO or an OD_QUEUED device context. Device fonts are returned with 
  9908.  negative lMatch numbers. Then the  appropriate logical font can be used after 
  9909.  calling GpiCreateLogFont. 
  9910.  
  9911.  If, during the printing process, a logical font is not created, the printer 
  9912.  driver uses its default font for the printer, which usually is 12-point 
  9913.  Courier. 
  9914.  
  9915.  There are two design choices for device fonts: 
  9916.  
  9917.      Use system fonts for the display. When printing, query the printer driver 
  9918.       and attempt to choose a device font that closely matches the system font. 
  9919.       If no match is found, then print using the system font. A device's font 
  9920.       metrics and character spacing might not match exactly, so the printed 
  9921.       output might not be exactly the same as the display. 
  9922.  
  9923.      Use a printer font if the user selects one. Determine the metrics and 
  9924.       find a system font that shares the same characteristics (for example, a 
  9925.       style such as Courier or Serifed). The character string to be displayed 
  9926.       is sent to the printer driver and the inter-character spacing is 
  9927.       returned, using GpiQueryCharStringPos. The individual character positions 
  9928.       are used when the string is sent to the display, using GpiCharStringPos 
  9929.       with the flOptions parameter of CHS_VECTOR. While the display output can 
  9930.       take longer to display to the screen, true WYSIWYG (What You See Is What 
  9931.       You Get) is achievable. 
  9932.  
  9933.  
  9934. ΓòÉΓòÉΓòÉ 10.2.2.5. Print Dialog and Print Processing ΓòÉΓòÉΓòÉ
  9935.  
  9936. The print menu must display a dialog to enable the user to specify the number 
  9937. of copies, start page, end page, or any other application-specific print 
  9938. options. A confirm push button (for example, Print) initiates the print. The 
  9939. following figure is an example of a print dialog. 
  9940.  
  9941. Application Printer Setup Dialog 
  9942.  
  9943. The Printer entry field is the read-only name of the printer object (queue) 
  9944. that the user chose from the Printer Setup dialog. The Preview checkbox is used 
  9945. to preview the printed output on the screen. This can be achieved by opening an 
  9946. OD_MEMORY device context to the printer driver and drawing the picture into the 
  9947. bit map. A BITBLT (Bit Block Logical Transfer) to the screen shows the 
  9948. resultant page. System fonts should be used instead of device fonts. 
  9949.  
  9950. Once the user has initiated the print, a PM application must execute the 
  9951. following steps. 
  9952.  
  9953.    1. Create a new thread. 
  9954.  
  9955.  Then, on this new thread: 
  9956.  
  9957.    2. Open a device context. 
  9958.  
  9959.    3. Associate a presentation space. 
  9960.  
  9961.    4. Start the print job. 
  9962.  
  9963.    5. Query the device capabilities. 
  9964.  
  9965.    6. Format the page. 
  9966.  
  9967.    7. Start the next page. 
  9968.  
  9969.  Repeat steps 6 through 7 for each page. 
  9970.  
  9971.    8. End the print job. 
  9972.  
  9973.  For another print job, repeat from step 4. 
  9974.  
  9975.    9. Disassociate the presentation space. 
  9976.  
  9977.   10. Close the device context. 
  9978.  
  9979.  The following sections describe each of the above steps in turn. 
  9980.  
  9981.  
  9982. ΓòÉΓòÉΓòÉ 10.2.2.5.1. Creating a New Thread ΓòÉΓòÉΓòÉ
  9983.  
  9984. Once the print process has been confirmed by the user. the application must use 
  9985. a separate thread to perform the actual printing. This maintains user 
  9986. responsiveness and avoids displaying the hourglass pointer. While the printing 
  9987. is in progress, the application should dim certain menu options, such as 
  9988. drawing. Other options, such as page down, zoom, or help still must be 
  9989. available. 
  9990.  
  9991.  
  9992. ΓòÉΓòÉΓòÉ 10.2.2.5.2. Opening a Queued Device Context ΓòÉΓòÉΓòÉ
  9993.  
  9994. Before you can send data to a printer using device functions, you must open a 
  9995. device context with DevOpenDC. The parameters of DevOpenDC are influenced by 
  9996. the queue and job properties the user has chosen previously. 
  9997.  
  9998. DevOpenDC accepts the following parameters as input: 
  9999.  
  10000.  hab            The anchor-block handle from a WinInitialize call. 
  10001.  
  10002.  lType          The type of device context. This always is OD_QUEUED to specify 
  10003.                 a queued device context. 
  10004.  
  10005.  pszToken       The device-information token. Always use an asterisk (*) for 
  10006.                 this parameter to force the system to get device information 
  10007.                 from the pdopData parameter. 
  10008.  
  10009.  lCount         The number of data elements supplied in the pdopData parameter. 
  10010.                 The minimum number of parameters for a queued device context is 
  10011.                 4. 
  10012.  
  10013.  pdopData       The device-context data area. This is a pointer to a structure 
  10014.                 of the type DEVOPENSTRUC. The elements of this structure are 
  10015.                 described below. 
  10016.  
  10017.  hdcComp        The compatible-device-context handle. This must be NULL for a 
  10018.                 device context of type OD_QUEUED. 
  10019.  
  10020.  DevOpenDC returns a device-context handle of type HDC. The handle is used in 
  10021.  other functions beginning with the Dev prefix and for GpiCreatePS and 
  10022.  GpiAssociate. 
  10023.  
  10024.  The DEVOPENSTRUC structure contains all the data needed to define a device 
  10025.  context. 
  10026.  
  10027.  The individual elements of the DEVOPENSTRUC structure are described below. At 
  10028.  least the first four structure members must be provided for queued device 
  10029.  contexts. 
  10030.  
  10031.  pszLogAddress       Name of the queue.  It is the pszName field of the 
  10032.                      PRQINFO3 structure. 
  10033.  
  10034.                      Note:  For device contexts of type OD_INFO, pszLogAddress 
  10035.                      is the port name. This can be retrieved by calling 
  10036.                      SplQueryDevice using the pszPrinters device name. The 
  10037.                      pszLogAddr field in the PRQINFO3 structure is the port 
  10038.                      name. 
  10039.  
  10040.  pszDriverName       Character string identifying the printer driver, for 
  10041.                      example, LASERJET. The pszDriverName field of the PRQINFO3 
  10042.                      structure, associated with the required print queue, gives 
  10043.                      the driver and device name, separated by a period, for 
  10044.                      example LASERJET.HP LaserJet IIID  The pszDriverName field 
  10045.                      can contain only the name up to the period, for example 
  10046.                      LASERJET. 
  10047.  
  10048.  pdriv               This is a pointer to the job properties data returned by 
  10049.                      the printer driver from DevPostDeviceModes or the default 
  10050.                      job properties from pDriverData in the PRQINFO3 structure. 
  10051.  
  10052.                      Note:  The DRIVDATA structure contains the particular 
  10053.                      device name to be used. Therefore, it is a programming 
  10054.                      error to set this parameter to NULL. 
  10055.  
  10056.  pszDataType         It is recommended that PM_Q_STD always be used for the 
  10057.                      data type. 
  10058.  
  10059.  pszComment          Optional character string that the printer object displays 
  10060.                      to the user in a job settings notebook.  It is recommended 
  10061.                      that the application include its own name in this comment 
  10062.                      string. 
  10063.  
  10064.                      Note:  The job title text is derived from the document 
  10065.                      name. 
  10066.  
  10067.  pszQueueProcName    Queue processor name (optional).  The queue processor 
  10068.                      (also termed queue driver) name is available from the 
  10069.                      pszPrProc field of the PRQINFO3 structure. The default 
  10070.                      queue processor provided by the operating system is 
  10071.                      PMPRINT. The user also can install a queue processor 
  10072.                      (PMPLOT) that is used to provide reverse clipping for 
  10073.                      vector devices such as plotters. 
  10074.  
  10075.                      For specialized applications, it is possible to use an 
  10076.                      alternative queue processor to the default specified for 
  10077.                      the queue.  The list of installed queue processors is 
  10078.                      available from the OS2SYS.INI file using the application 
  10079.                      name PM_SPOOLER_QP. 
  10080.  
  10081.  pszQueueProcParams  Queue processor parameters (optional). They can include 
  10082.                      information such as the number of copies you want to print 
  10083.                      and the size of the output area on the printed page. See 
  10084.                      PMPRINT/PMPLOT Queue Processor Parameters for details. 
  10085.  
  10086.  pszSpoolerParams    Spooler parameters (optional) are separated by spaces. 
  10087.                      They are used for scheduling print jobs and are as 
  10088.                      follows: 
  10089.  
  10090.                          The form names that identify the paper to be used, 
  10091.                           for example, FORM=A4,A5,ENV. The form names are 
  10092.                           optional, but if they are provided, the spooler is 
  10093.                           able to hold off printing the jobs until the required 
  10094.                           form is installed in the printer. If the form name is 
  10095.                           not provided, the spooler attempts to print the job. 
  10096.                           The printer driver recognizes that there is a forms 
  10097.                           problem and displays a FORMS MISMATCH message box. 
  10098.  
  10099.                          Priority of the print job, for example, PRTY=60. The 
  10100.                           priority is specified as an integer in the range 1 
  10101.                           through 99; 99 is the highest. The default priority 
  10102.                           value is 50. The application can use the spooler 
  10103.                           priority parameter to prioritize its own jobs. 
  10104.                           However, it is not good practice for an application 
  10105.                           always to use priority 99 in an attempt to get its 
  10106.                           jobs printed first. 
  10107.  
  10108.  pszNetworkParams    Optional parameter that can be used to specify network 
  10109.                      options; for example, USER=JOESMITH. 
  10110.  
  10111.  
  10112. ΓòÉΓòÉΓòÉ 10.2.2.5.3. Associating a Presentation Space ΓòÉΓòÉΓòÉ
  10113.  
  10114. In order to print, a device context must be associated with a GPI presentation 
  10115. space (PS). 
  10116.  
  10117. In most circumstances, a presentation space already exists for the screen. In 
  10118. such cases, the PS can be disassociated with the window device context and 
  10119. associated with the printer device context by using GpiAssociate, as shown in 
  10120. the following figure. 
  10121.  
  10122. Reassociating Presentation Space with Device Contexts 
  10123.  
  10124. If a presentation space does not exist or a different one is to be used, the 
  10125. application must call GpiCreatePS and use the GPI_ASSOC flag to associate the 
  10126. printer device context. 
  10127.  
  10128. Device-Independence Considerations 
  10129.  
  10130. The operating system supports true WYSIWYG. The same GPI functions the 
  10131. application used to create the picture or document on the display screen can be 
  10132. used to create the output on a printer. This is the major advantage of device 
  10133. independence. 
  10134.  
  10135. An application must be designed around the options provided by the PM to ensure 
  10136. device independence, as a display (VGA) typically is 96 dpi, while a printer 
  10137. typically is 300 dpi. 
  10138.  
  10139. Following are some application design considerations: 
  10140.  
  10141.      Use DevQueryHardopyCaps to determine the horizontal and vertical width of 
  10142.       the form and the maximum printable area. 
  10143.  
  10144.      Create a presentation space with a presentation page size of 0 to ensure 
  10145.       that the maximum window size and maximum page size are used. 
  10146.  
  10147.      Use device-independent coordinates, such as LO_ENGLISH, or TWIPS. If you 
  10148.       program in pels, transferring your output from screen to hard copy will 
  10149.       compress the image, as shown in the following figure. 
  10150.  
  10151.       An Effect of Programming in Pels 
  10152.  
  10153.       Reassociating a presentation space defined in pels or other device 
  10154.       dependent units can affect the dimension of the picture.  If the pels are 
  10155.       not square on the display device, the shape and scale (aspect ratio) will 
  10156.       be different as well. 
  10157.  
  10158.  
  10159. ΓòÉΓòÉΓòÉ 10.2.2.5.4. Starting a Print Job ΓòÉΓòÉΓòÉ
  10160.  
  10161. The application signals the beginning of a print job by using DevEscape with 
  10162. the escape parameter DEVESC_STARTDOC. The application must specify a document 
  10163. name; usually this is related to the name of file being printed. Any GPI calls 
  10164. made before this DevEscape (DEVESC_STARTDOC) are ignored. 
  10165.  
  10166.  
  10167. ΓòÉΓòÉΓòÉ 10.2.2.5.5. Querying the Device Capabilities ΓòÉΓòÉΓòÉ
  10168.  
  10169. DevQueryCaps can be used to provide over 40 pieces of information about a 
  10170. specific device-for example, default character box size, horizontal and 
  10171. vertical resolution, or number of device-specific fonts. 
  10172.  
  10173. Knowing that the device has only 1-bit color support (monochrome) might 
  10174. influence the application to use line style and patterns instead of colors for 
  10175. output. 
  10176.  
  10177.  
  10178. ΓòÉΓòÉΓòÉ 10.2.2.5.6. Formatting the Page ΓòÉΓòÉΓòÉ
  10179.  
  10180. Before print processing actually starts, it is recommended that an 
  10181. application's modal dialog be displayed, showing page progress and enabling the 
  10182. user to cancel the print job. If the user presses Cancel on this dialog, the 
  10183. application must call DevEscape with the parameter DEVESC_ABORTDOC. This allows 
  10184. the spooler and printer driver to clean up. A job is not created in the queue. 
  10185.  
  10186. Usually the output on a page is generated by a series of GPI calls from the 
  10187. application. By calculating the size of character strings or graphics written 
  10188. to the presentation space, the application must be able to decide when to move 
  10189. to the next page in a multi-page document. 
  10190.  
  10191.  
  10192. ΓòÉΓòÉΓòÉ 10.2.2.5.7. Starting the Next Page ΓòÉΓòÉΓòÉ
  10193.  
  10194. When the application has finished processing a page, it must call DevEscape 
  10195. with the DEVESC_NEWFRAME parameter. The progress dialog must be updated. The 
  10196. DevEscape DEVESC_NEWFRAME can be used to generate blank pages. The printer 
  10197. driver always issues a page eject whenever this DevEscape is received. 
  10198.  
  10199. Issuing the DEVESC_NEWFRAME escape does not reset any attributes or fonts. 
  10200. However, the bounds and any clipping regions are reset. 
  10201.  
  10202.  
  10203. ΓòÉΓòÉΓòÉ 10.2.2.5.8. Ending the Print Job ΓòÉΓòÉΓòÉ
  10204.  
  10205. The end of a print document is signalled by the application's calling DevEscape 
  10206. with the DEVESC_ENDDOC parameter. The spooler returns a job identifier that can 
  10207. be used for job manipulation. 
  10208.  
  10209. The following figure shows the processing carried out by a printer driver as it 
  10210. receives device escapes and graphics from the GPI. 
  10211.  
  10212. Flow for Device Escapes 
  10213.  
  10214. Note:  Each device-escape pair of DEVESC_STARTDOC and DEVESC_ENDDOC creates one 
  10215. print job in a spooler queue. If the application needs to create multiple print 
  10216. jobs, use the following sequence: 
  10217.  
  10218. DevOpenDC
  10219. GpiCreatePS
  10220. DevEsape(DEVESC_STARTDOC)
  10221.  .
  10222.  .
  10223.  .
  10224. DevEsape(DEVESC_ENDDOC)
  10225. DevEsape(DEVESC_STARTDOC)
  10226.  .
  10227.  .
  10228.  .
  10229. DevEsape(DEVESC_ENDDOC)
  10230. DevCloseDC
  10231.  
  10232.  
  10233. ΓòÉΓòÉΓòÉ 10.2.2.5.9. Disassociating the Presentation Space ΓòÉΓòÉΓòÉ
  10234.  
  10235. When the print job is complete, the presentation space can be disassociated 
  10236. with the printer device context using GpiAssociate with a NULL parameter. Then 
  10237. the presentation space can be reassociated with the display device context. 
  10238.  
  10239.  
  10240. ΓòÉΓòÉΓòÉ 10.2.2.5.10. Closing the Device Context ΓòÉΓòÉΓòÉ
  10241.  
  10242. A device context is closed using DevCloseDC. The print thread must signal print 
  10243. termination to the main processing loop. The main loop can terminate the print 
  10244. thread and dismiss the Page Progress message box. 
  10245.  
  10246. An application can display a message box to the user indicating a successful 
  10247. print and show the job ID returned by the spooler. 
  10248.  
  10249.  
  10250. ΓòÉΓòÉΓòÉ 10.2.2.5.11. Print-to-File Considerations ΓòÉΓòÉΓòÉ
  10251.  
  10252. Print-to-file means that the print data destined for a printer is stored in a 
  10253. file instead. The advantage of doing this is that the file can be used later, 
  10254. possibly on a different machine or different environment, and the data printed 
  10255. without requiring the original application. 
  10256.  
  10257. The system provides three ways to print to file: 
  10258.  
  10259.      The user can specify Print to file on the Output settings page of a 
  10260.       printer object. When a print is requested, the system displays a dialog 
  10261.       in which the user can enter a file name. 
  10262.  
  10263.       This method is preferred because the application does not have to be 
  10264.       aware; the user has full control of the system. 
  10265.  
  10266.      The application can specify OD_DIRECT on a DevOpenDC call. The 
  10267.       pszLogAddress field of the DEVOPENSTRUC structure specifies the file name 
  10268.       as shown in the following example: 
  10269.  
  10270.   C:\TMP\MYPRINT.DAT
  10271.   \\SERVER\DISK1\MYPRINT.DAT    -- UNC file name
  10272.   \\PIPE\PRTPIPE1               -- A pipe
  10273.   LPT1                          -- A port device
  10274.  
  10275.      The application can create the printer-specific format data and write it 
  10276.       to a file using DosOpen. 
  10277.  
  10278.  
  10279. ΓòÉΓòÉΓòÉ 10.2.2.5.12. Network Printing Considerations ΓòÉΓòÉΓòÉ
  10280.  
  10281. The architecture of PM requires a printer driver during the print job creation 
  10282. process to deal with queries, such as DevQueryHardcopyCaps, and to provide the 
  10283. job properties dialog by way of DevPostDeviceModes. To do any printing across a 
  10284. network, a locally installed printer driver is required. In some cases, such as 
  10285. when the network server does not run PM, this is an advantage, in that all the 
  10286. conversion to printer-specific commands can be done on the requestor. 
  10287.  
  10288. The printer object in the workplace provides seamless access to network 
  10289. printers; the user need only install the appropriate printer driver. 
  10290.  
  10291. The application programmer also is helped. A network printer that is accessed 
  10292. by the user has a hidden shadow on the requestor. The job properties for the 
  10293. shadow printer object can be altered and are stored on the requestor. This 
  10294. enables the user to configure one or more variations on the original 
  10295. configuration without requiring intervention from a system administrator to 
  10296. create many network printer objects, each with a slightly different default job 
  10297. property configuration. 
  10298.  
  10299. The shadow printer object is created on the requestor by creating a local queue 
  10300. and local device with no port connection. The application can enumerate these 
  10301. queues using SplEnumQueue, as before. The only difference is in the PRQINFO6 
  10302. structure; there are two extra fields not in the PRQINFO3 structure. These two 
  10303. extra fields, named pszRemoteComputerName and pszRemoteQueueName contain the 
  10304. name of the remote server and the remote queue. The spooler uses these fields 
  10305. to automatically reroute print data, submitted by an application to the local 
  10306. shadow, to the appropriate network queue. 
  10307.  
  10308. The printer object creates a local shadow only when the network printer object 
  10309. has been used or modified, because there could be a large number of network 
  10310. printer objects, and the spooler does not know which one the user wants to use. 
  10311. The local shadow of a network printer object is created in the following cases: 
  10312.  
  10313.      When a file is dragged and dropped on the network printer object 
  10314.  
  10315.      When the network printer object is moved, copied, or shadowed outside its 
  10316.       original server folder 
  10317.  
  10318.      When the printer or job properties are modified 
  10319.  
  10320.  
  10321. ΓòÉΓòÉΓòÉ 10.2.2.5.13. Drag/Drop Protocol Considerations ΓòÉΓòÉΓòÉ
  10322.  
  10323. When an application data file is dropped on a printer object, the application 
  10324. can receive a DM_PRINTOBJECT message if the application is running currently. 
  10325.  
  10326. One DM_PRINTOBJECT parameter gives a DRAGITEM structure that describes the 
  10327. object that was dropped. The other parameter gives a PRINTDEST structure that 
  10328. contains all the parameters required to call DevPostDeviceModes and DevOpenDC. 
  10329.  
  10330. The PD_JOB_PROPERTY flag indicates to the application that the user has 
  10331. requested a job properties dialog before printing. If this flag is not set, the 
  10332. application must not display the job properties dialog; it must use the job 
  10333. properties passed in the PRINTDEST structure. 
  10334.  
  10335. The rest of the printing process follows the procedure described in Submitting 
  10336. a Queued Presentation Manager Print Job. 
  10337.  
  10338.  
  10339. ΓòÉΓòÉΓòÉ 10.2.2.5.14. PMPRINT/PMPLOT Queue Processor Parameters ΓòÉΓòÉΓòÉ
  10340.  
  10341. How the queue processor processes a print job is controlled by the optional 
  10342. queue-processor parameters that you can specify in the pdopData parameter of 
  10343. DevOpenDC. The PM adds these parameter values to the spool file. 
  10344.  
  10345. The PMPRINT/PMPLOT queue processor parameters enable an application to do the 
  10346. following: 
  10347.  
  10348.      Specify the number of copies of a print job 
  10349.      Restrict printing to a specific area on the page 
  10350.      Specify which part of a picture is to be printed 
  10351.      Specify color output (if your printer allows this) 
  10352.      Specify the foreground and background colors in a monochrome print 
  10353.  
  10354.  Note:  The application need not use queue processor parameters if all that is 
  10355.  required is a single copy of a picture, scaled to fit the page. These are the 
  10356.  default settings of the queue-processor parameters. 
  10357.  
  10358.  The first parameter (COP) is used for all spool-file formats. The remaining 
  10359.  parameters are valid for PM_Q_STD spool files only. Because PM_Q_STD data are 
  10360.  used mainly for graphic data, these parameters are described in relation to 
  10361.  the printing of picture files. 
  10362.  
  10363.  The PMPRINT/PMPLOT queue-processor parameters are separated by spaces and are: 
  10364.  
  10365.  COP=n 
  10366.            The COP parameter specifies the number of copies of the spool file 
  10367.            that you want printed. The value of n must be an integer in the 
  10368.            range of 1 through 999. 
  10369.  
  10370.            The default is COP=1. 
  10371.  
  10372.  ARE=C | w,h,l,t 
  10373.            The ARE parameter determines the size and position of the output 
  10374.            area. This is the area of the physical page to which printing is 
  10375.            restricted. 
  10376.  
  10377.            The default value of ARE=C means that the output area is the whole 
  10378.            page. Note, however, that the printer cannot print outside its own 
  10379.            device clip limits. 
  10380.  
  10381.            To size and position the output area at a specific point on the 
  10382.            page, use ARE=w,h,l,t, where: 
  10383.  
  10384.            w, h                are the width and height of the desired output 
  10385.                                area 
  10386.  
  10387.            l, t                are the offsets of the upper-left corner of the 
  10388.                                output area from the left (l) and from the top 
  10389.                                (t) of the maximum output area 
  10390.  
  10391.            These four values must be given as percentages of the maximum output 
  10392.            dimensions. The maximum output area is the area within the device 
  10393.            clip limits. 
  10394.  
  10395.  FIT=S | l,t 
  10396.            The FIT parameter determines which part of the picture is to be 
  10397.            printed. You can request the whole of the picture, scaled to fit the 
  10398.            output area; or you can position the picture (actual size) anywhere 
  10399.            within the output area. This could mean that the picture is clipped 
  10400.            at the boundaries of the output area. 
  10401.  
  10402.            The default value of FIT=S causes the output to be scaled until the 
  10403.            larger of the height or width just fits within the defined output 
  10404.            area. The aspect ratio of the picture is maintained. 
  10405.  
  10406.            To print the picture in actual size, use FIT=l,t, where l,t are the 
  10407.            coordinates of the point in the picture that you want positioned at 
  10408.            the center of the output area: l is measured from the left edge of 
  10409.            the picture, and t is measured from the top edge. The coordinates 
  10410.            must be given as percentages of the actual dimensions of the 
  10411.            picture. 
  10412.  
  10413.  XFM=0 | 1 
  10414.            The XFM parameter enables you to override the picture-positioning 
  10415.            and clipping instructions that are provided by the ARE and FIT 
  10416.            parameters, including their defaults. 
  10417.  
  10418.            The default value of XFM= allows the appearance of the output to be 
  10419.            determined by the settings of the ARE and FIT parameters. 
  10420.  
  10421.            A value of XFM=0 yields output as specified in the picture file. For 
  10422.            example, applications that use many different forms can define 
  10423.            different positions on each form for their output. 
  10424.  
  10425.  COL=M | C 
  10426.            The COL parameter enables you to specify color output if you have a 
  10427.            color printer. 
  10428.  
  10429.            A value of COL=M creates monochrome output (black foreground with no 
  10430.            background color). This is supported by all devices. 
  10431.  
  10432.            A value of COL=C creates color output. If you request color output 
  10433.            on a monochrome device, the printer presentation driver tries to 
  10434.            satisfy your request, which can cause problems because the only 
  10435.            color available is black. For example, if the picture file specifies 
  10436.            a red line on a blue background, both are drawn in black. 
  10437.  
  10438.            The default is COL=M when you are addressing a monochrome printer 
  10439.            and COL=C when you are addressing a color printer. 
  10440.  
  10441.  MAP=N | A 
  10442.            The MAP parameter enables you to decide how the neutral colors 
  10443.            (those that are not specified in the picture file) are printed. 
  10444.  
  10445.            The default value of MAP=N yields a normal representation of the 
  10446.            screen picture on a printed page, which means that the page 
  10447.            background is white and the foreground is black. 
  10448.  
  10449.            A value of MAP=A provides the reverse of the normal representation: 
  10450.            the background is black and the foreground is white on the printed 
  10451.            page.. 
  10452.  
  10453.  Note: 
  10454.  
  10455.  Pictures from a spool file can be printed differently than those printed when 
  10456.  the spooler is not selected, because the default setting without the spooler 
  10457.  is to print pictures their actual size, whereas the default for the 
  10458.  queue-processor FIT parameter is "scaled to fit" the output area. 
  10459.  
  10460.  The queue-processor parameters must be separated by one or more blank spaces; 
  10461.  for example, 
  10462.  "COP=3  ARE=C  FIT=S". 
  10463.  
  10464.  The parameters can be listed in any order. Default values are used for 
  10465.  parameters that are omitted or entered incorrectly. 
  10466.  
  10467.  Bit-map or image data (data constructed by setting pels on or off) is not 
  10468.  affected by the ARE and FIT parameters. Consequently, if your picture contains 
  10469.  bit-map or image data, the printed version will be different from the screen 
  10470.  version if you use these parameters. 
  10471.  
  10472.  
  10473. ΓòÉΓòÉΓòÉ 10.2.2.5.15. Examples Using the ARE and FIT Parameters ΓòÉΓòÉΓòÉ
  10474.  
  10475.  
  10476. The application uses the ARE and FIT parameters to determine which part of the 
  10477. picture is printed, and where on the physical page it is printed. The following 
  10478. figure provides practical examples of how to use these parameters. 
  10479.  
  10480. Examples Using the ARE and FIT Parameters 
  10481.  
  10482.  
  10483. ΓòÉΓòÉΓòÉ 10.2.3. Submitting a Direct Presentation Manager Print Job ΓòÉΓòÉΓòÉ
  10484.  
  10485. PM direct printing is done through a device context of type OD_DIRECT, as 
  10486. follows: 
  10487.  
  10488.    1. Output from the PM printer driver goes directly to the printer instead of 
  10489.       to the spooler. 
  10490.  
  10491.    2. The application must specify OD_DIRECT in the DevOpenDC function. 
  10492.  
  10493.    3. The pszLogAddress field of the DEVOPENSTRUC structure is a port name (for 
  10494.       example LPT1). The port name is held in the pszLogAddr field of the 
  10495.       PRDINFO3 structure returned by SplEnumDevice or SplQueryDevice. 
  10496.  
  10497.    4. All fields following the pdriv field in the DEVOPENSTRUC structure are 
  10498.       ignored by the system. 
  10499.  
  10500.  The remaining steps in the printing process are the same as those for 
  10501.  OD_QUEUED device contexts. 
  10502.  
  10503.  
  10504. ΓòÉΓòÉΓòÉ 10.2.4. Submitting a Print Job Directly to the Spooler ΓòÉΓòÉΓòÉ
  10505.  
  10506. The spooler provides functions that enable applications to submit print data 
  10507. directly to a spool queue. Normally, these functions are used by printer 
  10508. drivers to add a print job to a spool queue. However, this is not a recommended 
  10509. method unless the application is special-purpose. 
  10510.  
  10511. The advantage of submitting print data directly to a spool queue is to bypass 
  10512. the GPI presentation layer. This can be useful, particularly, for sending print 
  10513. jobs to a network printer that is on a server that does not run the OS/2 
  10514. operating system. However, there are certain requirements for direct spooling: 
  10515.  
  10516.      Because the data bypasses the printer presentation driver, it must be in 
  10517.       a format the printer can understand. Therefore, the application must be 
  10518.       aware of and send the printer-specific commands. 
  10519.  
  10520.      If the spooler is not active, the print jobs never will be printed. 
  10521.  
  10522.  The following steps are required to create a print job using the spooler 
  10523.  directly: 
  10524.  
  10525.    1. Use SplQmOpen to open the PM. (Functionally, this is similar to using 
  10526.       DevOpenDC, which is detailed in Opening a Queued Device Context.) You 
  10527.       must specify a queue name of PMQOPENDATA for the logical address element, 
  10528.       pszLogAddress. PMQOPENDATA is a data structure, identical to 
  10529.       DEVOPENSTRUC, to be used with the SplQmxxx functions. 
  10530.  
  10531.    2. Use SplQmStartDoc to signal the start of your document. (This is same as 
  10532.       using DevEscape with DEVESC_STARTDOC as used in PM printing.) 
  10533.  
  10534.    3. Use SplQmWrite to write data to the spool file. 
  10535.  
  10536.    4. Use SplQmEndDoc to signal the end of your document. (This is the same as 
  10537.       DevEscape with DEVESC_ENDDOC as used in PM printing.) 
  10538.  
  10539.    5. Use SplQmClose to close the PM. (Functionally, this is similar to 
  10540.       DevCloseDC.) 
  10541.  
  10542.  
  10543. ΓòÉΓòÉΓòÉ 10.2.5. Spooler Management and Configuration ΓòÉΓòÉΓòÉ
  10544.  
  10545. The spooler provides a set of functions that allows management of all aspects 
  10546. of the print subsystem. There are five categories: 
  10547.  
  10548.      Job querying and manipulation (SplxxxJob) 
  10549.      Queue creation, querying, and manipulation (SplxxxQueue) 
  10550.      Device creation, querying, and manipulation (SplxxxDevice 
  10551.      Listing ports, printer drivers, queue processors (SplEnumyyy) 
  10552.      Listing printers across a network (SplEnumPrinter) 
  10553.  
  10554.  The symbol xxx typically represents Add, Delete, Enum, Query, and Set. For 
  10555.  jobs and queues, xxx also includes Hold and Release. For devices, xxx includes 
  10556.  Control. The symbol yyy is either Port, PrinterDriver, or QueueProcessor. 
  10557.  
  10558.  It is anticipated that most applications will not use any spooler functions at 
  10559.  all except SplEnumQueue, SplQueryQueue, and SplQueryDevice. However, there are 
  10560.  some specialized applications that might use the spooler functions for the 
  10561.  following: 
  10562.  
  10563.      An administrative tool to manage queues and jobs 
  10564.  
  10565.      An automatic printer object configurator 
  10566.  
  10567.       A new printer object can be created by using SplCreateDevice and 
  10568.       SplCreateQueue. The print subsystem recognizes that this has occurred and 
  10569.       puts a printer object directly on the desktop. 
  10570.  
  10571.  When the spooler is disabled, the following spooler functions do not return 
  10572.  any results: 
  10573.  
  10574.       SplControlDevice 
  10575.       SplCopyJob 
  10576.       SplDeleteJob 
  10577.       SplEnumJob 
  10578.       SplQueryJob 
  10579.       SplReleaseJob 
  10580.       SplSetJob 
  10581.  
  10582.  No function is available to enable or disable the spooler under application 
  10583.  control; this is a user decision. It is recommended that the spooler always be 
  10584.  enabled. 
  10585.  
  10586.  
  10587. ΓòÉΓòÉΓòÉ 10.2.5.1. Print Job Management ΓòÉΓòÉΓòÉ
  10588.  
  10589. Some sophisticated applications might need to manipulate jobs in the following 
  10590. ways after they have been spooled into a queue: 
  10591.  
  10592.      Modify the job parameters (for example, copies); use SplSetJob. 
  10593.  
  10594.      Increase the priority of a particular job; use SplSetJob. 
  10595.  
  10596.      Delete a job because a job based on newer data was created; use 
  10597.       SplDeleteJob. 
  10598.  
  10599.  
  10600. ΓòÉΓòÉΓòÉ 11. Presentation Spaces and Device Contexts ΓòÉΓòÉΓòÉ
  10601.  
  10602. A presentation space is a data structure maintained by the operating system in 
  10603. which information relevant to the graphic output is stored. The information is 
  10604. related to both the subsequent drawings (such as colors or line styles) and the 
  10605. presentation space resources (such as color tables or fonts). 
  10606.  
  10607. The first task in a graphics application is to define a presentation space, 
  10608. because so many of the GPI functions must operate within them. A presentation 
  10609. space is required for each output device currently in use by your application, 
  10610. including each separate window on the display screen. In almost all cases, the 
  10611. presentation space is set up to be device-independent, because the requirements 
  10612. of each possible output device are so different. 
  10613.  
  10614. Note:  In some cases, it is possible to disassociate a presentation space from 
  10615. one device and associate it with another, thereby allowing the presentation 
  10616. space to be shared. 
  10617.  
  10618. To facilitate the device independence of the PM programming interface, all 
  10619. device-specific information is held in a device context. A device context is a 
  10620. data structure that identifies a particular instance of an output device and 
  10621. contains all the device-specific information, such as the logical name of the 
  10622. device and the presentation driver name. Each separate instance of an output 
  10623. device that you intend to use must be described in a device context. For 
  10624. example, if a single application uses more than one window, each of those 
  10625. windows must have its own window device context. 
  10626.  
  10627. The applicable device context, then, must be associated with the presentation 
  10628. space in order to send  graphics data to that output device. 
  10629.  
  10630. This chapter describes presentation spaces and device contexts. The following 
  10631. topics are related to the information in this chapter: 
  10632.  
  10633.      Graphics primitives 
  10634.      Coordinate spaces and transformations 
  10635.      Graphics segments 
  10636.  
  10637.  
  10638. ΓòÉΓòÉΓòÉ 11.1. About Presentation Spaces ΓòÉΓòÉΓòÉ
  10639.  
  10640. There are three types of presentation spaces: 
  10641.  
  10642.      Standard micro 
  10643.      Cached micro 
  10644.      Normal 
  10645.  
  10646.  
  10647. ΓòÉΓòÉΓòÉ 11.1.1. Micro Presentation Spaces ΓòÉΓòÉΓòÉ
  10648.  
  10649. You need a micro presentation space if your application creates a separate 
  10650. presentation space for each output device instance and if its output is a 
  10651. simple drawing. 
  10652.  
  10653. Although run time memory requirements vary according to the graphics function 
  10654. an application uses, a typical micro presentation space graphical application 
  10655. uses 315KB of GPI, engine, and display memory resource (code and data). A micro 
  10656. presentation space cannot be reassociated with a different device. 
  10657.  
  10658.  
  10659. ΓòÉΓòÉΓòÉ 11.1.1.1. Standard Micro Presentation Space ΓòÉΓòÉΓòÉ
  10660.  
  10661. Use a standard micro presentation space for drawing on any type of output 
  10662. device, provided the presentation space is not in retain mode or retain and 
  10663. draw mode. 
  10664.  
  10665. There are two different functions you can use to access a standard micro 
  10666. presentation space. The following table lists both functions and their 
  10667. considerations. 
  10668.  
  10669. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10670. ΓöéFunction Name  ΓöéUsage                         ΓöéClosing        Γöé
  10671. Γöé               Γöé                              ΓöéFunction       Γöé
  10672. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10673. ΓöéGpiCreatePS    ΓöéAccepts an anchor handle, a   ΓöéGpiDestroyPS   Γöé
  10674. Γöé               Γöédevice-context handle, and a  Γöédestroys a     Γöé
  10675. Γöé               Γöépresentation space size as    Γöépresentation   Γöé
  10676. Γöé               Γöéparameters. Creates both      Γöéspace and      Γöé
  10677. Γöé               Γöénormal presentation spaces andΓöéreleases all   Γöé
  10678. Γöé               Γöémicro presentation spaces.    Γöéresources ownedΓöé
  10679. Γöé               Γöé                              Γöéby the         Γöé
  10680. Γöé               Γöé                              Γöépresentation   Γöé
  10681. Γöé               Γöé                              Γöéspace.         Γöé
  10682. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10683. ΓöéWinGetScreenPS ΓöéThe presentation space        ΓöéWinReleasePS   Γöé
  10684. Γöé               Γöérepresents the entire display Γöé               Γöé
  10685. Γöé               Γöéscreen. Warning:  Exercise    Γöé               Γöé
  10686. Γöé               Γöécaution when using this       Γöé               Γöé
  10687. Γöé               Γöéfunction as the graphic outputΓöé               Γöé
  10688. Γöé               Γöécan overlap individual        Γöé               Γöé
  10689. Γöé               Γöéwindows.                      Γöé               Γöé
  10690. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10691.  
  10692.  
  10693. ΓòÉΓòÉΓòÉ 11.1.1.2. Cached Micro Presentation Space ΓòÉΓòÉΓòÉ
  10694.  
  10695. The window manager maintains a cache of micro presentation spaces for windows 
  10696. on a display screen. The cache is provided for applications that use a large 
  10697. number of windows, and where each window requires a temporary 
  10698. presentation-space device-context pair for a short sequence of output 
  10699. operations. These presentation spaces belong to the system rather than to your 
  10700. application and are allocated only on a temporary basis. 
  10701.  
  10702. Cached micro presentation spaces are provided by the window system rather than 
  10703. by the GPI. Their use is synchronized with other window activities. For 
  10704. example, you need not associate a cached micro presentation space with the 
  10705. display screen. The window manager does this for you. 
  10706.  
  10707. Cached micro presentation spaces offer the best system performance because, 
  10708. unlike normal presentation spaces and standard micro presentation spaces, they 
  10709. are not permanently allocated to an application. However, cached micro 
  10710. presentation spaces can be cumbersome to use because all the attributes must be 
  10711. initialized continually. 
  10712.  
  10713. Use a cached micro presentation space to send output only to a window on the 
  10714. display device. There are three different functions you can use to access a 
  10715. cached micro presentation space, each with its own considerations. These 
  10716. functions are listed in the following table. 
  10717.  
  10718. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10719. ΓöéFunction Name  ΓöéUsage                         ΓöéClosing        Γöé
  10720. Γöé               Γöé                              ΓöéFunction       Γöé
  10721. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10722. ΓöéWinBeginPaint  ΓöéAccepts a NULL presentation   ΓöéWinEndPaint    Γöé
  10723. Γöé               Γöéspace handle for a cached     Γöéautomatically  Γöé
  10724. Γöé               Γöémicro presentation space. The Γöéreleases the   Γöé
  10725. Γöé               Γöépresentation space created by Γöépresentation   Γöé
  10726. Γöé               Γöéthis function is already      Γöéspace, no      Γöé
  10727. Γöé               Γöépreassociated with the window Γöématter what    Γöé
  10728. Γöé               Γöédevice context, making this   Γöétype.          Γöé
  10729. Γöé               Γöéthe easiest function to use.  Γöé               Γöé
  10730. Γöé               ΓöéUsually this type of creation Γöé               Γöé
  10731. Γöé               Γöéis in response to a WM_PAINT  Γöé               Γöé
  10732. Γöé               Γöémessage.                      Γöé               Γöé
  10733. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10734. ΓöéWinGetScreenPS ΓöéThe presentation space        ΓöéWinReleasePS   Γöé
  10735. Γöé               Γöérepresents the entire display Γöé               Γöé
  10736. Γöé               Γöéscreen.                       Γöé               Γöé
  10737. Γöé               ΓöéWarning:  Exercise caution    Γöé               Γöé
  10738. Γöé               Γöéwhen using this function as   Γöé               Γöé
  10739. Γöé               Γöéthe graphic output can overlapΓöé               Γöé
  10740. Γöé               Γöéindividual windows.           Γöé               Γöé
  10741. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10742. ΓöéWinGetPS       ΓöéThe presentation space can    ΓöéWinReleasePS   Γöé
  10743. Γöé               Γöérepresent the entire desktop, Γöé               Γöé
  10744. Γöé               Γöéor any other window.          Γöé               Γöé
  10745. Γöé               ΓöéThe presentation space can be Γöé               Γöé
  10746. Γöé               Γöéused to process any message,  Γöé               Γöé
  10747. Γöé               Γöébut it must be returned to theΓöé               Γöé
  10748. Γöé               Γöécache when message processing Γöé               Γöé
  10749. Γöé               Γöéis complete.                  Γöé               Γöé
  10750. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10751.  
  10752. In general, use a cached micro presentation space to process a single paint 
  10753. message when no presentation space information needs to be remembered between 
  10754. messages. The presentation space must be both obtained and released during the 
  10755. processing of that message. All application information stored in a cached 
  10756. micro presentation space is lost as soon as it is released to the cache. 
  10757.  
  10758. You must provide a window handle on input to WinBeginPaint and WinGetPS. The 
  10759. resulting presentation space is defined specifically for that window, and 
  10760. cannot be reassociated. 
  10761.  
  10762. The cached micro presentation space is always: 
  10763.  
  10764.      Defined in pels-although you can change the units using GpiSetPS 
  10765.      Formatted GPIF_LONG 
  10766.      Given a suitable size by the system. 
  10767.  
  10768.  When you finish using a cached micro presentation space, you do not have to 
  10769.  disassociate it from the window device context because WinReleasePS or 
  10770.  WinEndPaint performs the disassociation. This makes the cached micro 
  10771.  presentation space available for use in other windows. The presentation space 
  10772.  itself cannot be deleted. 
  10773.  
  10774.  Cached micro presentation spaces are used serially. The next time you need a 
  10775.  cached presentation space, access a new one using the appropriate function. 
  10776.  Each time you get a cached micro presentation space, graphics attributes are 
  10777.  reset to their default values. 
  10778.  
  10779.  
  10780. ΓòÉΓòÉΓòÉ 11.1.2. Normal Presentation Spaces ΓòÉΓòÉΓòÉ
  10781.  
  10782. You must use a normal presentation space if you require your application to use 
  10783. the same presentation space to send output to multiple devices (a display 
  10784. screen and printer, for example), or if it uses the segment and 
  10785. retained-drawing functions to generate complex drawings. 
  10786.  
  10787. There is only one function you can use to create a normal presentation space: 
  10788.  
  10789. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10790. ΓöéFunction Name  ΓöéUsage                         ΓöéClosing        Γöé
  10791. Γöé               Γöé                              ΓöéFunction       Γöé
  10792. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10793. ΓöéGpiCreatePS    ΓöéAccepts an anchor handle, a   ΓöéGpiDestroyPS   Γöé
  10794. Γöé               Γöédevice-context handle, and a  Γöédestroys a     Γöé
  10795. Γöé               Γöépresentation space size as    Γöépresentation   Γöé
  10796. Γöé               Γöéparameters. Creates both      Γöéspace and      Γöé
  10797. Γöé               Γöénormal presentation spaces andΓöéreleases       Γöé
  10798. Γöé               Γöémicro presentation spaces.    Γöé               Γöé
  10799. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10800.  
  10801. If a normal presentation space is used, or if metafiling is carried out, more 
  10802. run time memory is used than if a micro presentation space was used. A normal 
  10803. presentation space requires 114KB more than a micro presentation space. 
  10804.  
  10805.  
  10806. ΓòÉΓòÉΓòÉ 11.1.3. Modal Graphic Systems ΓòÉΓòÉΓòÉ
  10807.  
  10808. The graphic output sent to the presentation space is created by graphic 
  10809. primitives, such as straight or curved lines. How those primitives appear 
  10810. depends in part on the mode of the presentation space. 
  10811.  
  10812. In modal systems, certain information that modifies a graphic primitive is 
  10813. established before you use the instruction to draw the primitive. The following 
  10814. figure is an example of a red, solid line being drawn from (4,3) to (9,7). With 
  10815. PM's modal interface, the only value you need to supply to GpiLine is the end 
  10816. point (9,7). 
  10817.  
  10818. Line Drawn with GpiLine 
  10819.  
  10820. The line is drawn automatically with the current color, red, in the current 
  10821. line type, solid, and starting from the current position, (4,3). There are 
  10822. separate functions for specifying the current color, line type, and position. 
  10823.  
  10824. In nonmodal graphics systems, you supply information relevant to an instruction 
  10825. when you use that instruction. For example, you could use a line-drawing 
  10826. instruction in which you would specify that the line is to be green, dotted, 
  10827. and drawn from point a to point b. Those values or attributes are bound to a 
  10828. particular drawing instruction, and affect no other. If you are going to 
  10829. continue the line from point b to point c, you must again specify "green", 
  10830. "dotted", "point b", and finally, "point c". 
  10831.  
  10832. For the PM programming interface, the default values for the graphics 
  10833. primitives (or current values if the defaults have been modified) are stored in 
  10834. the presentation space along with the current position. While at first it might 
  10835. seem like many functions are necessary to perform one step, such as drawing a 
  10836. line, a modal graphics system actually saves resources. After you perform the 
  10837. first line draw, chances are that if you draw a second or third line, the line 
  10838. attributes are not likely to change; that is, the mode of the presentation 
  10839. space remains the same. Thus, the constant repetition of attributes in a 
  10840. nonmodal graphics system actually uses more resources if the desired output 
  10841. requires more than one or two graphics functions. 
  10842.  
  10843. It is possible to define graphics, and store their definitions, without sending 
  10844. them to a screen or a printer. In these situations, the concept of attribute 
  10845. currentness becomes relevant. The color of a line on a screen, for example, is 
  10846. the color that was current when you defined the line. This is not always the 
  10847. color that is current when the line is drawn. 
  10848.  
  10849.  
  10850. ΓòÉΓòÉΓòÉ 11.1.4. Current Position ΓòÉΓòÉΓòÉ
  10851.  
  10852. The current position is the world-coordinate space position at which the next 
  10853. drawing request begins. It is part of the data stored in the presentation 
  10854. space. When you create or obtain a presentation space, the current position is 
  10855. set to the origin (0,0). The current position also is reset to (0,0) whenever a 
  10856. presentation space is associated with a different device context. 
  10857.  
  10858. Most drawing requests update the current position. If you draw a line from the 
  10859. origin to (3,5), for example, the current position is updated to (3,5). The 
  10860. current position also can be updated explicitly by GpiSetCurrentPosition or 
  10861. GpiMove. If you do not want the first drawing in a presentation space to start 
  10862. at (0,0), call GpiSetCurrentPosition first. 
  10863.  
  10864.  
  10865. ΓòÉΓòÉΓòÉ 11.1.5. Primitive Attributes ΓòÉΓòÉΓòÉ
  10866.  
  10867. The graphics primitives and the functions that draw them are discussed in Line 
  10868. and Arc Primitives through Fonts. The primitive's function allows the 
  10869. attributes of the primitive to be set for all subsequent use of that primitive. 
  10870. The attributes are stored in data structures called bundles. There are 
  10871. functions that allow you to set the attributes of the primitives before the 
  10872. drawing of any primitive is performed. GpiSetAttrs allows you to not only 
  10873. specify the primitive for which the attributes are going to be set, but also, 
  10874. the settings for the specific attributes. GpiQueryAttrs returns the current 
  10875. values of specified attributes for specified primitives. 
  10876.  
  10877. Two other functions, GpiSetAttrMode and GpiQueryAttrMode, enable you to define 
  10878. or query the attribute mode settings, AM_PRESERVE and AM_NOPRESERVE. The 
  10879. AM_PRESERVE setting preserves the value of an attribute any time that attribute 
  10880. is changed. The previous value can be recovered easily if, for example, you 
  10881. need six dotted lines, one solid line, then six more dotted lines. The 
  10882. AM_NOPRESERVE setting discards the previous value of an attribute once the 
  10883. value is changed. The values of the attributes are presentation space 
  10884. resources. 
  10885.  
  10886.  
  10887. ΓòÉΓòÉΓòÉ 11.2. Using Presentation Spaces ΓòÉΓòÉΓòÉ
  10888.  
  10889. You can use presentation-space functions to: 
  10890.  
  10891.      Create a normal, micro, or cached micro presentation space 
  10892.      Delete, save, or restore a presentation space 
  10893.      Define or determine the presentation space attributes 
  10894.  
  10895.  
  10896. ΓòÉΓòÉΓòÉ 11.2.1. Obtaining and Creating a Presentation Space ΓòÉΓòÉΓòÉ
  10897.  
  10898. Normal presentation spaces and micro presentation spaces are created using 
  10899. GpiCreatePS. Cached micro presentation spaces are created using WinBeginPaint 
  10900. or WinGetPS. 
  10901.  
  10902.  
  10903. ΓòÉΓòÉΓòÉ 11.2.2. Deleting a Presentation Space ΓòÉΓòÉΓòÉ
  10904.  
  10905. A presentation space consumes a considerable amount of memory, so you should 
  10906. delete it when your application no longer requires it. Use GpiDestroyPS to 
  10907. delete either a normal or micro presentation space. 
  10908.  
  10909. When you finish using a cached micro presentation space that you accessed with 
  10910. WinGetPS, release it with WinReleasePS. You need not delete a presentation 
  10911. space that you accessed with WinBeginPaint. PM does this for you when you call 
  10912. WinEndPaint. 
  10913.  
  10914.  
  10915. ΓòÉΓòÉΓòÉ 11.2.3. Saving and Restoring a Presentation Space ΓòÉΓòÉΓòÉ
  10916.  
  10917. You can save certain attributes and resources of a presentation space, modify 
  10918. its fields, draw in the modified presentation space, then restore it with 
  10919. GpiSavePS and GpiRestorePS. When you call GpiSavePS, the graphics engine copies 
  10920. the following items from the current presentation space onto a special stack: 
  10921.  
  10922.      Primitive attributes 
  10923.      Transformation matrixes 
  10924.      Viewing limit 
  10925.      Clip path 
  10926.      Clip region 
  10927.      Current position 
  10928.      Loaded logical color table 
  10929.      Loaded logical font 
  10930.  
  10931.  You can push the contents of a presentation space on the stack as many times 
  10932.  as is necessary. GpiRestorePS pops the contents of a presentation space off 
  10933.  the stack. 
  10934.  
  10935.  
  10936. ΓòÉΓòÉΓòÉ 11.2.4. Presentation Spaces Review ΓòÉΓòÉΓòÉ
  10937.  
  10938. The following table summarizes the features and restrictions of each type of 
  10939. presentation space. 
  10940.  
  10941. Presentation Space Features and Restrictions 
  10942.  
  10943. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10944. ΓöéFeature/Restriction ΓöéNormal       ΓöéStandard     ΓöéCached Micro  Γöé
  10945. Γöé                    Γöé             ΓöéMicro        Γöé              Γöé
  10946. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10947. ΓöéDevice types        ΓöéAny device   ΓöéAny device   ΓöéVideo-display Γöé
  10948. Γöésupported           Γöé             Γöé             Γöéwindow only   Γöé
  10949. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10950. ΓöéNumber of supported ΓöéMultiple     ΓöéOne          ΓöéOne           Γöé
  10951. Γöédevices             Γöé             Γöé             Γöé              Γöé
  10952. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10953. ΓöéAssociation         ΓöéAssociate andΓöéAssociate at ΓöéN/A.          Γöé
  10954. Γöé                    Γöédisassociate Γöécreation;    Γöé              Γöé
  10955. Γöé                    Γöéas required. Γöécannot       Γöé              Γöé
  10956. Γöé                    Γöé             Γöédisassociate.Γöé              Γöé
  10957. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10958. ΓöéRetained graphics   ΓöéYes          ΓöéNo           ΓöéNo            Γöé
  10959. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10960. ΓöéAvailable GPI       ΓöéAll functionsΓöéAll except   ΓöéAll except    Γöé
  10961. Γöéfunctions           Γöé             Γöésegment      Γöésegment       Γöé
  10962. Γöé                    Γöé             Γöéfunctions    Γöéfunctions     Γöé
  10963. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10964. ΓöéMemory              ΓöéHighest      ΓöéMedium memoryΓöéQuickest      Γöé
  10965. Γöéconsiderations      Γöémemory usage Γöéusage        Γöéallocation    Γöé
  10966. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10967.  
  10968.  
  10969. ΓòÉΓòÉΓòÉ 11.3. About Device Contexts ΓòÉΓòÉΓòÉ
  10970.  
  10971. Device contexts link presentation spaces to devices by converting 
  10972. device-independent presentation space information into device-dependent 
  10973. information. This conversion occurs in the presentation driver, a low-level 
  10974. program that is transparent to the application. A presentation driver is 
  10975. device-driver code that converts the application commands into output commands 
  10976. specific for each output device. 
  10977.  
  10978. After creating a device context, it must be associated with a presentation 
  10979. space before the drawing (or primitives) can be printed or displayed. When a 
  10980. presentation space and a device context are associated with each other, any 
  10981. output you direct to the presentation space is directed automatically at the 
  10982. device context and displayed on the physical device. For example, before you 
  10983. can draw a picture in a display window, the picture's graphics presentation 
  10984. space must be associated with the window's device context. 
  10985.  
  10986. Device contexts also give applications access to important device information 
  10987. such as screen dimensions or printer capabilities. 
  10988.  
  10989. As with presentation spaces, there are three types of device contexts: 
  10990.  
  10991.      Cached 
  10992.      Window 
  10993.      Normal 
  10994.  
  10995.  
  10996. ΓòÉΓòÉΓòÉ 11.3.1. Cached Device Contexts ΓòÉΓòÉΓòÉ
  10997.  
  10998. A cached device context is one that already is associated with a cached 
  10999. presentation space when that space is obtained from the cache. 
  11000.  
  11001.  
  11002. ΓòÉΓòÉΓòÉ 11.3.2. Window Device Contexts ΓòÉΓòÉΓòÉ
  11003.  
  11004. Window device contexts are a special type, in that they are the only device 
  11005. contexts obtained with WinOpenWindowDC. As their name implies, the output 
  11006. device they represent is a display window. WinOpenWindowDC accepts a window 
  11007. handle as input and returns the window device context handle. The window device 
  11008. context handle can then be associated with a standard micro presentation space 
  11009. or a normal presentation space. 
  11010.  
  11011. The window device context is closed automatically when its associated window is 
  11012. deleted. 
  11013.  
  11014.  
  11015. ΓòÉΓòÉΓòÉ 11.3.3. Normal Device Contexts ΓòÉΓòÉΓòÉ
  11016.  
  11017. A normal device context (also called a standard or noncached device context) 
  11018. links a presentation space with any nonwindow output device. Use DevOpenDC to 
  11019. obtain a device context handle to one of the six normal device contexts listed 
  11020. in the following table. Each of the six normal device contexts must be closed 
  11021. by DevCloseDC before your application is closed. 
  11022.  
  11023. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  11024. ΓöéDC Type             ΓöéPurpose             ΓöéUsage               Γöé
  11025. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11026. ΓöéQueued              ΓöéLinks a presentationΓöéApplications use    Γöé
  11027. Γöé                    Γöéspace with a printerΓöéqueued device       Γöé
  11028. Γöé                    Γöéor plotter shared byΓöécontexts to offload Γöé
  11029. Γöé                    Γöémultiple            Γöéprinting control    Γöé
  11030. Γöé                    Γöéapplications sendingΓöéfrom the            Γöé
  11031. Γöé                    Γöéspooled print jobs  Γöéapplication.        Γöé
  11032. Γöé                    Γöéto the print queue. Γöé                    Γöé
  11033. Γöé                    ΓöéQueued device       Γöé                    Γöé
  11034. Γöé                    Γöécontexts store printΓöé                    Γöé
  11035. Γöé                    Γöéjobs by using a     Γöé                    Γöé
  11036. Γöé                    Γöéprogram called printΓöé                    Γöé
  11037. Γöé                    Γöéspooler, which keepsΓöé                    Γöé
  11038. Γöé                    Γöétrack of the order  Γöé                    Γöé
  11039. Γöé                    Γöéin which the jobs   Γöé                    Γöé
  11040. Γöé                    Γöéarrive at the       Γöé                    Γöé
  11041. Γöé                    Γöéprinter and in whichΓöé                    Γöé
  11042. Γöé                    Γöéthey are printed.   Γöé                    Γöé
  11043. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11044. ΓöéDirect              ΓöéLinks a presentationΓöéApplications        Γöé
  11045. Γöé                    Γöéspace with a printerΓöénormally do not use Γöé
  11046. Γöé                    Γöéor plotter, directlyΓöédirect device       Γöé
  11047. Γöé                    Γöébypassing the       Γöécontexts, unless    Γöé
  11048. Γöé                    Γöéspooler and print   Γöéthey are avoiding   Γöé
  11049. Γöé                    Γöéqueue.  A direct    Γöéthe queue (for      Γöé
  11050. Γöé                    Γöédevice context is   Γöésecurity reasons) orΓöé
  11051. Γöé                    Γöéused by the spooler Γöégoing directly to a Γöé
  11052. Γöé                    Γöéto process jobs as  Γöédedicated machine.  Γöé
  11053. Γöé                    Γöéthey are removed    Γöé                    Γöé
  11054. Γöé                    Γöéfrom the print      Γöé                    Γöé
  11055. Γöé                    Γöéqueue.              Γöé                    Γöé
  11056. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11057. ΓöéInformation         ΓöéLinks a presentationΓöéAn application can  Γöé
  11058. Γöé                    Γöéspace with a printerΓöéuse an information  Γöé
  11059. Γöé                    Γöéor plotter, directlyΓöédevice context with Γöé
  11060. Γöé                    Γöéenabling device     Γöélower memory        Γöé
  11061. Γöé                    Γöéinformation to be   Γöéoverhead, rather    Γöé
  11062. Γöé                    Γöéqueried, but        Γöéthan use a direct   Γöé
  11063. Γöé                    Γöéproducing no output Γöédevice context,     Γöé
  11064. Γöé                    Γöéon the device.      Γöéwhich could provide Γöé
  11065. Γöé                    Γöé                    Γöéthe same            Γöé
  11066. Γöé                    Γöé                    Γöéinformation.        Γöé
  11067. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11068. ΓöéMemory              ΓöéLinks a presentationΓöéApplications use    Γöé
  11069. Γöé                    Γöéspace with a bit    Γöémemory device       Γöé
  11070. Γöé                    Γöémap.                Γöécontexts for drawingΓöé
  11071. Γöé                    Γöé                    Γöéto the bit map and  Γöé
  11072. Γöé                    Γöé                    Γöéusing it as a sourceΓöé
  11073. Γöé                    Γöé                    Γöéor target of BitBlt Γöé
  11074. Γöé                    Γöé                    Γöéoperations.         Γöé
  11075. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11076. ΓöéMetafile            ΓöéA special device    ΓöéOnly applications   Γöé
  11077. Γöé                    Γöécontext that enablesΓöéthat use metafiles  Γöé
  11078. Γöé                    Γöéa picture output to Γöéuse metafile device Γöé
  11079. Γöé                    Γöéits associated      Γöécontexts.           Γöé
  11080. Γöé                    Γöépresentation space  Γöé                    Γöé
  11081. Γöé                    Γöéto be recorded in a Γöé                    Γöé
  11082. Γöé                    Γöémetafile for        Γöé                    Γöé
  11083. Γöé                    Γöéinterchange for     Γöé                    Γöé
  11084. Γöé                    Γöéfuture use.         Γöé                    Γöé
  11085. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11086. ΓöéMetafile_NoQuery    ΓöéFunctionally        ΓöéIf attributes of theΓöé
  11087. Γöé                    Γöéidentical to        Γöépresentation space  Γöé
  11088. Γöé                    Γöémetafile; however,  Γöéare not to be       Γöé
  11089. Γöé                    Γöéquerying of         Γöéqueried, this deviceΓöé
  11090. Γöé                    Γöépresentation space  Γöécontext offers      Γöé
  11091. Γöé                    Γöéattributes is not   Γöéimproved performanceΓöé
  11092. Γöé                    Γöéallowed.            Γöéover metafile.      Γöé
  11093. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  11094.  
  11095.  
  11096. ΓòÉΓòÉΓòÉ 11.4. Using Device Contexts ΓòÉΓòÉΓòÉ
  11097.  
  11098. In addition to associating or disassociating presentation spaces with device 
  11099. contexts, you can use device context functions to: 
  11100.  
  11101.      Obtain or create a device context 
  11102.      Associate a device context with a presentation space 
  11103.      Close a device context 
  11104.      Retrieve information about a device's capabilities 
  11105.  
  11106.  
  11107. ΓòÉΓòÉΓòÉ 11.4.1. Creating a Device Context ΓòÉΓòÉΓòÉ
  11108.  
  11109. You can create a normal device context by calling DevOpenDC. This function 
  11110. requires that you specify one of the six normal types. It also requires that 
  11111. you pass certain device-initialization data, including a logical address, the 
  11112. device-driver name, device-driver data, a description of the device type, and 
  11113. information about the queue (if the device is a queued device). The 
  11114. device-initialization data is passed in a DEVOPENSTRUC structure. 
  11115.  
  11116. The following figure is an example of this structure. 
  11117.  
  11118.     typedef struct _DEVOPENSTRUC {   /* dop                          */
  11119.         PSZ      pszLogAddress       /* Logical-device address       */
  11120.         PSZ      pszDriverName       /* Device-driver name           */
  11121.         PDRIVDATA  pdriv             /* Pointer to extra driver data */
  11122.         PSZ      pszDataType         /* Type of queued data          */
  11123.         PSZ      pszComment          /* Optional spooler info        */
  11124.         PSZ      pszQueueProcName    /* Queue-processor name         */
  11125.         PSZ      pszQueueProcParams  /* Queue-processor arguments    */
  11126.         PSZ      pszSpoolerParams    /* Spooler arguments            */
  11127.         PSZ      pszNetworkParams    /* Network arguments            */
  11128.     } DEVOPENSTRUC;
  11129.  
  11130. The last four fields in this structure apply only to queued devices. 
  11131.  
  11132. The following figure shows how to create a nondisplay device context for a 
  11133. printer. 
  11134.  
  11135.  
  11136.     HDC hdcPrinter;                     /* Handle of printer device context    */
  11137.     HAB hab;                            /* Anchor-block handle                 */
  11138.     DEVOPENSTRUC dop;                   /* Device information                  */
  11139.  
  11140.     dop.pszLogAddress = "lpt1";         /* Logical-device address              */
  11141.     dop.pszDriverName = "EPSON";        /* Device-driver name                  */
  11142.     dop.pdriv = (PDRIVDATA) NULL;       /* Pointer to driver data              */
  11143.     dop.pszDataType = "PM_Q_STD";       /* Standard queued data                */
  11144.  
  11145.     hdcPrinter = DevOpenDC(hab,
  11146.                            OD_DIRECT,   /* Direct device type                  */
  11147.                            "*",         /* No data in OS2.INI                  */
  11148.                            4,           /* Use first 4 fields in dop structure */
  11149.                            (PDEVOPENDATA) &dop,
  11150.                            (HDC) NULL);
  11151.  
  11152. The following figure is an example of how to create a standard device context 
  11153. for a metafile. 
  11154.  
  11155.  
  11156.     HDC hdcMeta;                                 /* Handles of metafile       */
  11157.                                                  /*    and window DCs         */
  11158.     HAB hab;                                     /* Anchor-block handle       */
  11159.     DEVOPENSTRUC dop;                            /* Device information        */
  11160.  
  11161.     dop.pszLogAddress = NULL;                    /* Logical-device address    */
  11162.     dop.pszDriverName = "DISPLAY";               /* Device-driver name        */
  11163.  
  11164.     hdcMeta = DevOpenDC(hab,
  11165.                         OD_METAFILE,             /* Metafile DC               */
  11166.                         "*",                     /* No data in OS2.INI        */
  11167.                         2,                       /* Use first 2 fields in dop */
  11168.                         (PDEVOPENDATA) &dop,     /* Structure for system info */
  11169.                         NULL)                    /* Compatible with screen    */
  11170.  
  11171.  
  11172. ΓòÉΓòÉΓòÉ 11.4.2. Associating Presentation Spaces with Device Contexts ΓòÉΓòÉΓòÉ
  11173.  
  11174. Drawing graphic objects requires a presentation space and a device context to 
  11175. direct output to a specific instance of an output device, such as a display 
  11176. window or a printer. This association enables the device context to identify 
  11177. the output device for that presentation space. Further, the device context 
  11178. identifies the particular instance of the output device, such as a printer or 
  11179. display window. 
  11180.  
  11181. A presentation space can be associated with only one device context at a time. 
  11182. The reverse is also true: a device context can be associated with only one 
  11183. presentation space at a time. 
  11184.  
  11185. The following figure shows how a presentation space is associated with a window 
  11186. device context. It is then disassociated from the window device context and 
  11187. associated with a printer device context. It cannot be associated with both 
  11188. device contexts simultaneously. 
  11189.  
  11190.     WM_Create:
  11191.          hdcScreen = WinOpenWindowsDC (hwnd);
  11192.          phs = GpiCreatePS (...GPIA.Assoc);
  11193.           .
  11194.           .
  11195.           .
  11196.  
  11197.     WM_COMMAND:
  11198.  
  11199.       Case IDM_File PRINT:                       /* Device selection        */
  11200.          hdcPrinter = DevOpenDC (...);
  11201.          GpiAssociate (hps, NULL);               /* Disconnect from screen  */
  11202.          GpiAssociate (hps, hdcPrinter);         /* Connect to printer      */
  11203.           .
  11204.           .                                      /* Output                  */
  11205.           .
  11206.          GpiAssociate (hps, NULL);               /* Disconnect from print   */
  11207.          GpiAssociate (hps, hdcScreen);          /* Reconnect to screen     */
  11208.           .
  11209.           .
  11210.           .
  11211.  
  11212.     WM_PAINT:
  11213.          WinBeginPaint (hwnd, hps, NULL);
  11214.           .
  11215.           .                                      /* Output                  */
  11216.           .
  11217.  
  11218. The following figure shows how to open a window device context and associate it 
  11219. with a normal presentation space. 
  11220.  
  11221.     HDC hdcWin;            /* Window device-context handle     */
  11222.     HPS hpsWin;            /* Normal-presentation-space handle */
  11223.     HWND hwndClient;       /* Client-window handle             */
  11224.     HAB hab;               /* Anchor-block handle              */
  11225.     SIZEL sizlPage;        /* Presentation page                */
  11226.  
  11227.     hdcWin = WinOpenWindowDC(hwndClient);
  11228.     hpsWin = GpiCreatePS(hab, hdcWin, &sizlPage,
  11229.                          PU_LOENGLISH | GPIA_ASSOC);
  11230.  
  11231. Note:  This type of code is used when the device context is defined before the 
  11232. presentation space. 
  11233.  
  11234. WinOpenWindowDC can be called only once for a particular window and returns an 
  11235. error if called a second time. WinQueryWindowDC can be used to obtain a window 
  11236. device context previously allocated using WinOpenWindowDC. The following figure 
  11237. shows how to create a presentation space with page units of 0.01 inch 
  11238. (PU_LOENGLISH) and associate it with a printer device context. As input to 
  11239. GpiCreatePS, you supply the height and width of the presentation page. 
  11240.  
  11241.  
  11242.     HAB hab;          /* Anchor-block handle         */
  11243.     HPS hpsPrinter;   /* Presentation-space handle   */
  11244.     HDC hdcPrinter;   /* Device-context handle       */
  11245.     SIZEL sizlPage;   /* Page structure              */
  11246.     .
  11247.     .
  11248.     .
  11249.     hpsPrinter = GpiCreatePS(hab, hdcPrinter, &sizlPage,
  11250.        PU_LOENGLISH | GPIA_ASSOC);
  11251.  
  11252.  
  11253. ΓòÉΓòÉΓòÉ 11.4.3. Closing a Device Context ΓòÉΓòÉΓòÉ
  11254.  
  11255. To close a device context that your application opened with DevOpenDC, call 
  11256. DevCloseDC. However, you should not try to close a device context that you 
  11257. opened with WinOpenWindowDC. The operating system does this automatically when 
  11258. the associated window is deleted. 
  11259.  
  11260.  
  11261. ΓòÉΓòÉΓòÉ 11.4.4. Determining Device Capabilities ΓòÉΓòÉΓòÉ
  11262.  
  11263. Once you have created a device context for a particular output device, you can 
  11264. determine the capabilities of that device by calling DevQueryCaps. This 
  11265. function retrieves the following information: 
  11266.  
  11267.      Device technology (whether the device is a raster or vector device) 
  11268.      Maximized window dimensions (if the device is a video display) 
  11269.      Page dimensions (if the device is a printer or plotter) 
  11270.      Character-box dimensions 
  11271.      Marker-box dimensions 
  11272.      Pel resolution 
  11273.      Color capabilities 
  11274.      Mix-mode capabilities 
  11275.  
  11276.  You can use this information, for example, to select fonts, set up the 
  11277.  presentation page, or create a new logical color table. 
  11278.  
  11279.  
  11280. ΓòÉΓòÉΓòÉ 12. Paths ΓòÉΓòÉΓòÉ
  11281.  
  11282. A path is a graphics object composed of one or more figures drawn with graphic 
  11283. primitives. A path can be used for defining a filled area, a complex clipping 
  11284. shape, an outline, and for drawing geometric wide lines. 
  11285.  
  11286. The following topics are related to information in this chapter: 
  11287.  
  11288.      Presentation spaces and device contexts 
  11289.      Line and arc primitives 
  11290.      Area primitives 
  11291.      Color and mix attributes 
  11292.      Regions 
  11293.      Clipping 
  11294.  
  11295.  
  11296. ΓòÉΓòÉΓòÉ 12.1. About Paths ΓòÉΓòÉΓòÉ
  11297.  
  11298. Paths provide several useful drawing techniques including: 
  11299.  
  11300.      An alternate means of generating filled or outlined irregular figures and 
  11301.       nonrectangular shapes 
  11302.  
  11303.      An efficient means of producing hollow text in an outline font 
  11304.  
  11305.      The only means of clipping (restricting the area of interest of a 
  11306.       picture) to circular, elliptical, or other nonrectangular figures 
  11307.  
  11308.      The only means of drawing lines with a thickness that can be transformed 
  11309.  
  11310.  These techniques are respectively illustrated in the following figures: 
  11311.  
  11312.  Drawing Techniques Achieved with Paths 
  11313.  
  11314.  A path is similar to an area, but there are fundamental differences between 
  11315.  the two. The following table describes their similarities and contrasts. 
  11316.  
  11317.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  11318.   ΓöéPaths                         ΓöéAreas                         Γöé
  11319.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11320.   ΓöéFunctions that define a path  ΓöéFunctions that define an area Γöé
  11321.   Γöéare bracketed by GpiBeginPath Γöéare bracketed by GpiBeginArea Γöé
  11322.   Γöéand GpiEndPath.               Γöéand GpiEndArea.               Γöé
  11323.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11324.   ΓöéPaths are defined in world    ΓöéAreas are defined in world    Γöé
  11325.   Γöécoordinates.                  Γöécoordinates.                  Γöé
  11326.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11327.   ΓöéPaths can be modified before  ΓöéAreas are displayed           Γöé
  11328.   Γöébeing displayed or used for   Γöéimmediately on completion.    Γöé
  11329.   Γöéclipping.                     Γöé                              Γöé
  11330.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11331.   ΓöéPaths can be used by          ΓöéAreas cannot be used as       Γöé
  11332.   Γöéapplications to perform       Γöéclipping regions.             Γöé
  11333.   Γöéclipping.                     Γöé                              Γöé
  11334.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11335.   ΓöéPaths can be converted into   ΓöéAreas cannot be converted intoΓöé
  11336.   Γöégraphics objects called       Γöéregions.                      Γöé
  11337.   Γöéregions.                      Γöé                              Γöé
  11338.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11339.   ΓöéSix operations can be         ΓöéOnly two operations can be    Γöé
  11340.   Γöéperformed on paths, each      Γöéperformed on areas (specified Γöé
  11341.   Γöérequiring a separate function:Γöéwith options when creating theΓöé
  11342.   Γöé                              Γöéarea):                        Γöé
  11343.   ΓöéOutline                       Γöé                              Γöé
  11344.   ΓöéFill                          ΓöéOutline                       Γöé
  11345.   ΓöéModify                        ΓöéFill                          Γöé
  11346.   ΓöéStroke                        Γöé                              Γöé
  11347.   ΓöéConvert to clip path          Γöé                              Γöé
  11348.   ΓöéConvert to region             Γöé                              Γöé
  11349.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  11350.  
  11351.  
  11352. ΓòÉΓòÉΓòÉ 12.1.1. Path Attributes ΓòÉΓòÉΓòÉ
  11353.  
  11354. Paths do not have a separate ...BUNDLE data structure associated with them. 
  11355. Their attributes are defined by LINEBUNDLE and AREABUNDLE. There are certain 
  11356. line attributes that apply only to geometric lines, or lines created with some 
  11357. path operations. Depending on the purpose of a path, only certain path 
  11358. attributes are in effect. These and the other path attributes are described in 
  11359. this chapter. 
  11360.  
  11361. When an application creates a presentation space, the path attributes are set 
  11362. to the default values shown in the following table. 
  11363.  
  11364. Path Attribute Default Values 
  11365.  
  11366. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  11367. ΓöéAttribute       ΓöéDefault Value   ΓöéFunction that Redefines     Γöé
  11368. Γöé                Γöé                ΓöéAttribute                   Γöé
  11369. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11370. ΓöéGeometric width ΓöéNone            ΓöéGpiSetLineWidthGeom         Γöé
  11371. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11372. ΓöéEnd             ΓöéLINEEND_FLAT    ΓöéGpiSetLineEnd               Γöé
  11373. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11374. ΓöéJoin            ΓöéLINEJOIN_BEVEL  ΓöéGpiSetLineJoin              Γöé
  11375. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11376. ΓöéWidth           Γöé1.0             ΓöéGpiSetLineWidth             Γöé
  11377. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11378. ΓöéType            ΓöéLINETYPE_SOLID  ΓöéGpiSetLineType              Γöé
  11379. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11380. ΓöéColor           ΓöéCLR_NEUTRAL     ΓöéGpiSetAttrs (LBB_COLOR)     Γöé
  11381. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11382. ΓöéMix mode        ΓöéFM_OVERPAINT    ΓöéGpiSetAttrs (LBB_MIX_MODE)  Γöé
  11383. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11384. ΓöéPattern symbol  ΓöéSolid           ΓöéGpiSetPattern               Γöé
  11385. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11386. ΓöéPattern set     ΓöéLCID_DEFAULT    ΓöéGpiSetPatternSet            Γöé
  11387. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11388. ΓöéReference point Γöé(0,0)           ΓöéGpiSetPatternRefPoint       Γöé
  11389. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11390. ΓöéForeground colorΓöéCLR_NEUTRAL     ΓöéGpiSetAttrs (ABB_COLOR)     Γöé
  11391. Γöé                Γöé(black on most  Γöé                            Γöé
  11392. Γöé                Γöédevices)        Γöé                            Γöé
  11393. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11394. ΓöéBackground colorΓöéCLR_BACKGROUND  ΓöéGpiSetAttrs (ABB_BACK_COLOR)Γöé
  11395. Γöé                Γöé(white on most  Γöé                            Γöé
  11396. Γöé                Γöédevices)        Γöé                            Γöé
  11397. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11398. ΓöéForeground mix  ΓöéFM_OVERPAINT    ΓöéGpiSetAttrs (ABB_MIX_MODE)  Γöé
  11399. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11400. ΓöéBackground mix  ΓöéBM_LEAVEALONE   ΓöéGpiSetAttrs                 Γöé
  11401. Γöé                Γöé                Γöé(ABB_BACK_MIX_MODE)         Γöé
  11402. Γöé                Γöé                ΓöéGeometric width, End, and   Γöé
  11403. Γöé                Γöé                ΓöéJoin take effect only when aΓöé
  11404. Γöé                Γöé                Γöépath is converted to a      Γöé
  11405. Γöé                Γöé                Γöégeometric wide line using   Γöé
  11406. Γöé                Γöé                ΓöéGpiStrokePath or            Γöé
  11407. Γöé                Γöé                ΓöéGpiModifyPath.              Γöé
  11408. Γöé                Γöé                ΓöéWidth, Type, Color, and Mix Γöé
  11409. Γöé                Γöé                Γöémode take effect only when aΓöé
  11410. Γöé                Γöé                Γöépath is outlined using      Γöé
  11411. Γöé                Γöé                ΓöéGpiOutlinePath.             Γöé
  11412. Γöé                Γöé                ΓöéPattern symbol, Pattern set,Γöé
  11413. Γöé                Γöé                Γöéand Reference point take    Γöé
  11414. Γöé                Γöé                Γöéeffect only when a path is  Γöé
  11415. Γöé                Γöé                Γöéfilled using GpiFillPath or Γöé
  11416. Γöé                Γöé                ΓöéGpiStrokePath.              Γöé
  11417. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  11418.  
  11419.  
  11420. ΓòÉΓòÉΓòÉ 12.1.2. Line Width and Geometric Width for Paths ΓòÉΓòÉΓòÉ
  11421.  
  11422. Cosmetic lines represent the mathematical ideal of a one-dimensional line. The 
  11423. width attribute associated with them is provided only for ease of drawing these 
  11424. lines larger than one pel. 
  11425.  
  11426. In contrast, geometric line width is not an attribute; it is a geometric 
  11427. property. To set the width of a geometric line, an application can use 
  11428. GpiSetLineWidthGeom. This geometric width takes effect only when a path is 
  11429. converted to a geometric wide line using GpiStrokePath or GpiModifyPath. 
  11430.  
  11431. If a geometric line is drawn before the geometric width is specified, the drawn 
  11432. line is defined by the cosmetic line width-usually 1-which results in the 
  11433. thinnest possible line for the currently associated device. A geometric line 
  11434. width has no default in the same way that the sides of a box, drawn with 
  11435. GpiBox, have no length until specified by the function. 
  11436.  
  11437. The value specified with GpiSetLineWidthGeom is the thickness of the line in 
  11438. world coordinates, and it is subject to scaling by the current transformations 
  11439. in effect at the time GpiModifyPath or GpiStrokePath is called. For example, if 
  11440. you apply a transform with a scaling factor of 0.5, for an object whose current 
  11441. geometric line width is four world coordinates, the width of the displayed line 
  11442. will be halved. 
  11443.  
  11444. In the floor plan shown in the following figure, the outer walls were drawn 
  11445. using geometric lines.  All of the other objects were drawn using normal lines. 
  11446.  
  11447. Geometric Lines and Normal Lines 
  11448.  
  11449. Your application can determine the current geometric width by calling 
  11450. GpiQueryLineWidthGeom. 
  11451.  
  11452.  
  11453. ΓòÉΓòÉΓòÉ 12.1.3. Line End ΓòÉΓòÉΓòÉ
  11454.  
  11455. The line end attribute specifies the shape of the unattached end of a geometric 
  11456. line. Lines whose shapes are partially defined by a geometric width have to be 
  11457. closed, unlike cosmetic lines that simply end. An application can draw 
  11458. geometric lines with square, flat, or round ends. 
  11459.  
  11460. Note:  The end attribute takes effect only when a path is converted to a 
  11461. geometric width line using GpiStrokePath or GpiModifyPath. 
  11462.  
  11463. Set the current geometric line end attribute with GpiSetLineEnd. The attribute 
  11464. applies to all subsequent unattached lines within the path bracket. The 
  11465. following table describes the three standard line ends provided by the PM 
  11466. programming interface; you cannot define your own end types. 
  11467.  
  11468. Standard Geometric Line End Types 
  11469.  
  11470. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  11471. ΓöéType                            ΓöéIdentifier      ΓöéLong Value  Γöé
  11472. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11473. ΓöéFlat, flush with line end       ΓöéLINEEND_FLAT    Γöé1L          Γöé
  11474. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11475. ΓöéRound, past line end            ΓöéLINEEND_ROUND   Γöé2L          Γöé
  11476. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11477. ΓöéFlat, but extends past line end ΓöéLINEEND_SQUARE  Γöé3L          Γöé
  11478. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  11479.  
  11480. The default line end type (LINEEND_DEFAULT) is identical to the LINEEND_FLAT 
  11481. type, and has a long value of 0L. The error linetype (LINEEND_ERROR) has a long 
  11482. value of -1L. 
  11483.  
  11484. The following figure illustrates these three types of line ends. Your 
  11485. application can determine the current geometric line end by calling 
  11486. GpiQueryLineEnd. 
  11487.  
  11488. Closing Unattached Geometric Lines 
  11489.  
  11490. A square line end extends the line by a distance that is half the width of the 
  11491. line. For example, if the line is six coordinate units wide, a square line end 
  11492. extends it by three coordinate units. 
  11493.  
  11494. A round line end is constructed by drawing a circle whose radius is half the 
  11495. width of the line. 
  11496.  
  11497.  
  11498. ΓòÉΓòÉΓòÉ 12.1.4. Line Join ΓòÉΓòÉΓòÉ
  11499.  
  11500. The line join attribute specifies the shape formed by two intersecting 
  11501. geometric lines. Where one wide line joins another, the nature of the join must 
  11502. be defined. An application can select a beveled, rounded, or mitred line-join 
  11503. style. 
  11504.  
  11505. Note:  The join attribute takes effect only when a path is converted to a 
  11506. geometric wide line using GpiStrokePath or GpiModifyPath. 
  11507.  
  11508. Set the current geometric line-join attribute with GpiSetLineJoin. The 
  11509. attribute applies to all subsequent intersection of lines within the path 
  11510. bracket. The following table describes the three standard line joins provided 
  11511. by the PM programming interface. You cannot define your own join types. 
  11512.  
  11513. Standard Geometric Line Join Types 
  11514.  
  11515. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  11516. ΓöéType                            ΓöéIdentifier      ΓöéLong Value  Γöé
  11517. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11518. ΓöéDiagonal corner                 ΓöéLINEJOIN_BEVEL  Γöé1L          Γöé
  11519. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11520. ΓöéRounded corner                  ΓöéLINEJOIN_ROUND  Γöé2L          Γöé
  11521. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11522. Γöé90┬░ angled corner               ΓöéLINEJOIN_MITRE  Γöé3L          Γöé
  11523. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  11524.  
  11525. The default join type (LINEJOIN_DEFAULT) is identical to the LINEJOIN_BEVEL 
  11526. type, and has a long value of 0L. The error linetype (LINEJOIN_ERROR) has a 
  11527. long value of -1L. The following figure illustrates these three types of line 
  11528. joins. 
  11529.  
  11530. Your application can determine the current geometric line join using 
  11531. GpiQueryLineJoin. 
  11532.  
  11533. Joining Wide Lines 
  11534.  
  11535.  
  11536. ΓòÉΓòÉΓòÉ 12.1.5. Cosmetic Line Attributes for Paths ΓòÉΓòÉΓòÉ
  11537.  
  11538. When a path is drawn as a cosmetic line with GpiOutlinePath, the following 
  11539. attributes are defined by the LINEBUNDLE data structure: 
  11540.  
  11541.      Line width 
  11542.      Line type 
  11543.      Line color 
  11544.      Line mix 
  11545.  
  11546.  These attributes follow the current definitions and appear just as line 
  11547.  primitives do. Since the line primitive has only a foreground color and mix 
  11548.  attribute, the current color of the drawing surface affects the appearance of 
  11549.  these paths more than it does the appearance of paths that define geometric 
  11550.  lines. Those paths follow the area attributes and are affected by background 
  11551.  color and background mix attributes as well. 
  11552.  
  11553.  
  11554. ΓòÉΓòÉΓòÉ 12.1.6. Area Attributes for Paths ΓòÉΓòÉΓòÉ
  11555.  
  11556. When a path is drawn as a geometric line with GpiStrokePath or GpiModifyPath, 
  11557. the following attributes are defined by the AREABUNDLE data structure: 
  11558.  
  11559.      Pattern symbol 
  11560.      Pattern set 
  11561.      Pattern reference point 
  11562.      Area foreground color 
  11563.      Area background color 
  11564.      Area foreground mix 
  11565.      Area background mix 
  11566.  
  11567.  Area attributes follow the current definitions and appear just as area 
  11568.  primitives do. The operating system uses the pattern symbol to fill the 
  11569.  interior of the path that defines the geometric line. Any alterations to the 
  11570.  fill pattern or reference point affect the appearance of a geometric line just 
  11571.  as it does an area. 
  11572.  
  11573.  
  11574. ΓòÉΓòÉΓòÉ 12.1.7. Path Color and Mix Attributes ΓòÉΓòÉΓòÉ
  11575.  
  11576. The color attribute defines the color used to draw a primitive or an object. 
  11577. The mix attribute determines how the color of a primitive or an object is 
  11578. combined with the color of the drawing surface, or any other objects on the 
  11579. surface. Unlike the color and mix attributes for primitives, and certain other 
  11580. objects, the path color is defined by different attributes in different 
  11581. situations, as illustrated in the following figure. 
  11582.  
  11583. Path Objects 
  11584.  
  11585. Path colors are determined by the area color, area background color, area mix, 
  11586. and area background mix attributes if the path is stroked into a wide line. The 
  11587. cosmetic line path color is determined by the line color and mix attributes. 
  11588.  
  11589. The line color defines the color used to draw the output from any of the IBM 
  11590. OS/2 line functions called within the path. The line colors can change within 
  11591. the path bracket, just as they can within area brackets. The interaction of the 
  11592. line with the drawing-surface color is controlled by the line mix attribute, 
  11593. which also can vary within the path bracket. 
  11594.  
  11595. After the path is closed, the path can be stroked into a geometric (or wide) 
  11596. line. Depending on the construction options, the geometric line can be filled. 
  11597. The appearance of the pattern symbol used to fill the path depends on the area 
  11598. attributes. The definitions of the area color and background color depend on 
  11599. the pattern symbol. 
  11600.  
  11601.  
  11602. ΓòÉΓòÉΓòÉ 12.1.8. Path Brackets ΓòÉΓòÉΓòÉ
  11603.  
  11604. The functions that create and define the path always are bracketed by the 
  11605. GpiBeginPath and GpiEndPath functions. Only one path can be defined between 
  11606. these two functions. However, within the path, there can be any number of 
  11607. figures. 
  11608.  
  11609. GpiBeginPath signals the start of a path definition. Each path you define 
  11610. becomes the current path and replaces any existing path in the presentation 
  11611. space. The current position is not changed by GpiBeginPath, although it is 
  11612. updated by any drawing instructions that follow. 
  11613.  
  11614. GpiBeginPath accepts as input only a path identifier of 1. This identifier is 
  11615. used by the functions performing path operations to identify the path. 
  11616.  
  11617. Due to the number of different operations that can be performed on paths, the 
  11618. path definition can contain both open and closed figures. If a figure does not 
  11619. start and end at the same coordinate point, it is classified as an open figure. 
  11620. Unlike an area bracket, if you use GpiSetCurrentPosition or GpiMove within a 
  11621. path definition, the current figure is not automatically closed. 
  11622.  
  11623. The PM provides a method of closing figures within a path. GpiCloseFigure 
  11624. (valid only in path brackets) closes a figure in the path whose start and end 
  11625. points are not the same, by drawing a straight line from the current position 
  11626. to the start position of the figure. Use GpiCloseFigure if you want the line 
  11627. join attribute to be applied between the start and end point of a figure. Do 
  11628. not use it if you want the line end attributes to be used as the start and end 
  11629. points for a geometric wide line. 
  11630.  
  11631. If the path definition contains full arc or box primitives, however, you must 
  11632. not close them using GpiCloseFigure. GpiBox and GpiFullArc generate completely 
  11633. closed figures and must not be used within another figure definition. 
  11634.  
  11635. To signal the end of the current path definition, use GpiEndPath. The path 
  11636. definition is constructed in the currently associated presentation space. The 
  11637. current position always is updated to the end point of the last line drawn. 
  11638.  
  11639. The functions that generate a path are enclosed in a path bracket. Applications 
  11640. can use the functions in the following list within a path bracket. 
  11641.  
  11642.      GpiBeginElement 
  11643.      GpiBox 
  11644.      GpiCallSegmentMatrix 
  11645.      GpiCharString 
  11646.      GpiCharStringAt 
  11647.      GpiCharStringPos 
  11648.      GpiCharStringPosAt 
  11649.      GpiCloseFigure 
  11650.      GpiComment 
  11651.      GpiCreateLogFont 
  11652.      GpiDeleteSetId 
  11653.      GpiElement 
  11654.      GpiEndElement 
  11655.      GpiEndPath 
  11656.      GpiFullArc 
  11657.      GpiGetData 
  11658.      GpiLabel 
  11659.      GpiLine 
  11660.      GpiMarker 
  11661.      GpiMove 
  11662.      GpiOffsetElementPointer 
  11663.      GpiPartialArc 
  11664.      GpiPointArc 
  11665.      GpiPolyFillet 
  11666.      GpiPolyFilletSharp 
  11667.      GpiPolyLine 
  11668.      GpiPolyMarker 
  11669.      GpiPolySpline 
  11670.      GpiPop 
  11671.      GpiPutData 
  11672.      GpiQueryArcParams 
  11673.      GpiQueryAttrMode 
  11674.      GpiQueryCurrentPosition 
  11675.      GpiSetArcParams 
  11676.      GpiSetAttrMode 
  11677.      GpiSetAttrs 
  11678.      GpiSetCharAngle 
  11679.      GpiSetCharBox 
  11680.      GpiSetCharDirection 
  11681.      GpiSetCharMode 
  11682.      GpiSetCharSet 
  11683.      GpiSetCharShear 
  11684.      GpiSetColor 
  11685.      GpiSetCp 
  11686.      GpiSetCurrentPosition 
  11687.      GpiSetEditMode 
  11688.      GpiSetLineEnd 
  11689.      GpiSetLineJoin 
  11690.      GpiSetLineType 
  11691.      GpiSetLineWidth 
  11692.      GpiSetMarker 
  11693.      GpiSetMarkerBox 
  11694.      GpiSetMarkerSet 
  11695.      GpiSetMix 
  11696.      GpiSetModelTransformMatrix 
  11697.  
  11698.  Warning. Some GPI functions cannot be used while an open path definition 
  11699.  exists. In particular, you cannot include image or area primitives in a path 
  11700.  definition. 
  11701.  
  11702.  
  11703. ΓòÉΓòÉΓòÉ 12.1.9. Path Operations ΓòÉΓòÉΓòÉ
  11704.  
  11705. The operations performed on a path determine which of the path attributes 
  11706. become applicable. Unlike specifying area brackets, the variety of operations 
  11707. also calls for separate functions instead of specifying options with 
  11708. GpiBeginPath. Specifically, the following six operations can be performed on a 
  11709. path: 
  11710.  
  11711.      Outline 
  11712.      Fill 
  11713.      Modify 
  11714.      Stroke 
  11715.      Convert to clip path 
  11716.      Convert to region 
  11717.  
  11718.  There are other graphics operations provided by the PM -for example, 
  11719.  transformations- that can apply to entities other than paths. 
  11720.  
  11721.  Upon completion, GpiFillPath, GpiOutlinePath, GpiStrokePath, and 
  11722.  GpiPathToRegion delete the current path definition. This path is not available 
  11723.  for any subsequent operations. 
  11724.  
  11725.  GpiModifyPath does not delete the current path definition. An application can 
  11726.  modify a path before using one of the aforementioned functions. 
  11727.  
  11728.  The first time your application calls GpiSetClipPath, the current path 
  11729.  definition is converted into the current clip path. GpiSetClipPath deletes the 
  11730.  path definition upon completion but not the clip path definition. 
  11731.  
  11732.  A path definition can be stored in a graphics segment and, if that segment is 
  11733.  retained, the path can be re-created as required. Segments are discussed in 
  11734.  Creating and Drawing Retained Graphics. 
  11735.  
  11736.  
  11737. ΓòÉΓòÉΓòÉ 12.1.10. Path Outline ΓòÉΓòÉΓòÉ
  11738.  
  11739. To draw the outline of the current path, use GpiOutlinePath. This function 
  11740. accepts a path identifier (which must be 1) as input. GpiOutlinePath does not 
  11741. create a geometric line; therefore, the cosmetic line attributes are used. 
  11742.  
  11743. GpiOutlinePath normally has the same effect as though the lines and arcs used 
  11744. to create the path were drawn without actually being part of the path. Any open 
  11745. figures within the path are not closed automatically. If the path contains 
  11746. character strings that use an outline font, the characters are not filled. 
  11747.  
  11748. The following functional sequence is recommended for drawing outline text or 
  11749. outline figures: 
  11750.  
  11751. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  11752. ΓöéFunction Name                 ΓöéEffect                        Γöé
  11753. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11754. ΓöéGpiBeginPath                  ΓöéStarts the path definition.   Γöé
  11755. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11756. ΓöéGpiMove                       ΓöéMoves to the starting point ofΓöé
  11757. Γöé                              Γöéthe first figure.             Γöé
  11758. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11759. ΓöéGpiCharString, GpiFullArc     ΓöéUses an outline font to       Γöé
  11760. Γöé                              Γöéspecify text or define the    Γöé
  11761. Γöé                              Γöélines in a figure.            Γöé
  11762. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11763. ΓöéGpiEndPath                    ΓöéEnds the path.                Γöé
  11764. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11765. ΓöéGpiOutlinePath                ΓöéDraws the text or figure      Γöé
  11766. Γöé                              Γöéoutlines.                     Γöé
  11767. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  11768.  
  11769. If you are drawing a complex path, consisting of several character strings that 
  11770. use an outline font, it can take quite some time to produce. If you want to 
  11771. create a only rough draft, you might find it quicker to draw an outline instead 
  11772. of the filled path. This improves performance and might be acceptable for small 
  11773. characters. When they are small enough, hollow characters can look like filled 
  11774. characters. 
  11775.  
  11776. You can create hollow characters in either of two ways: 
  11777.  
  11778.      Outside a path, call GpiCreateLogFont. 
  11779.  
  11780.       This enables you to define an outline font that uses hollow characters. 
  11781.  
  11782.      Inside a path, draw the characters, then display the path with 
  11783.       GpiOutlinePath. 
  11784.  
  11785.       Only the character outlines contribute to the path definition even if the 
  11786.       font is not hollow. (This might cause ambiguous results.) 
  11787.  
  11788.  Using outlined paths to create character outlines also can be used to define a 
  11789.  clip path in the shape of a letter or word. 
  11790.  
  11791.  
  11792. ΓòÉΓòÉΓòÉ 12.1.11. Path Fill ΓòÉΓòÉΓòÉ
  11793.  
  11794. To draw the current path and fill its interior using the current pattern 
  11795. symbol, use GpiFillPath. The path is deleted after the interior is filled. The 
  11796. boundary lines are considered part of the path interior and are drawn with this 
  11797. function. Any open figures in the path definition are closed automatically by 
  11798. GpiFillPath. 
  11799.  
  11800. This function accepts the path identifier (which must be 1) as input, and 
  11801. either of two construction options: 
  11802.  
  11803.      FPATH_ALTERNATE (the default) 
  11804.      FPATH_WINDING (must be selected if the path has been modified). 
  11805.  
  11806.  Paths, like area primitives, can be filled in alternate mode or winding mode. 
  11807.  If the path consists of multiple, intersecting figures, the path-fill mode 
  11808.  affects the final appearance of the path. 
  11809.  
  11810.  The following figure shows two identical paths that were filled, each using 
  11811.  one of the two modes. Each path consists of a triangle drawn within a 
  11812.  rectangle. The path on the left was filled using the alternate mode. The path 
  11813.  on the right was filled using the winding mode. 
  11814.  
  11815.  Alternate and Winding Fill Modes 
  11816.  
  11817.  
  11818. ΓòÉΓòÉΓòÉ 12.1.11.1. Paths in Alternate Mode ΓòÉΓòÉΓòÉ
  11819.  
  11820. For paths drawn in alternate mode (as with area primitives), the following is 
  11821. true: 
  11822.  
  11823.      If you have to cross an odd number of boundaries in the path when drawing 
  11824.       an imaginary line parallel to the x-axis, a point is included in the 
  11825.       filled path from that point to positive infinity. 
  11826.  
  11827.      If you have to cross an even number of boundaries in the path when 
  11828.       drawing an imaginary line parallel to the x-axis, a point is not included 
  11829.       in the filled path from that point to positive infinity. 
  11830.  
  11831.  The following figure shows how the operating system determines the filled 
  11832.  portion for the path shown in the previous figure. The path outside the 
  11833.  triangle, but inside the rectangle, is filled, because the imaginary lines 
  11834.  drawn from those points in the positive x-direction intersect the path 
  11835.  boundaries an odd number of times. 
  11836.  
  11837.  Calculating Filled Paths Constructed in Alternate Mode 
  11838.  
  11839.  Parts of the path with odd tallys are filled; parts with even tallys are not 
  11840.  filled. 
  11841.  
  11842.  
  11843. ΓòÉΓòÉΓòÉ 12.1.11.2. Paths in Winding Mode ΓòÉΓòÉΓòÉ
  11844.  
  11845. For paths drawn in winding mode (also like area primitives), the direction the 
  11846. boundaries in the path are drawn in determines whether a given point is 
  11847. included in the filled path. The drawn direction of a boundary line depends on 
  11848. both the graphics functions used to draw it and the world coordinates that 
  11849. define it. 
  11850.  
  11851. For box primitives, for example, if the specified diagonal corner is to the 
  11852. right, to the top, or both, of the current position, the box is drawn 
  11853. counterclockwise. If the specified diagonal corner is to the left, to the 
  11854. bottom, but not both, the box is drawn clockwise. 
  11855.  
  11856. For a polyline primitive, the direction of the boundary depends on the relative 
  11857. values of the start and end points of each line. For a polygon primitive, the 
  11858. direction of the boundary depends on the relative values of the specified 
  11859. vertices. 
  11860.  
  11861. To determine whether a given point is included in the filled path, count the 
  11862. number of boundary lines to be crossed to move from that point to infinity. For 
  11863. each boundary line drawn in one direction add one to the tally. For each 
  11864. boundary line drawn in the opposite direction, subtract one from the tally. A 
  11865. point is within the area if the result is nonzero. As with the alternate mode, 
  11866. the imaginary determining line is drawn in the positive x-direction from the 
  11867. point in question toward infinity. 
  11868.  
  11869. The following figure shows how the operating system determines the filled 
  11870. portion for the path shown in the figure before the previous one. Assume that 
  11871. both the rectangle and triangle were drawn in the same direction, whether 
  11872. clockwise or counterclockwise is immaterial. Both figures are filled, because 
  11873. the number of times the imaginary lines drawn from those points in the positive 
  11874. x-direction intersect the path boundaries is continuously summed. There is 
  11875. never a subtraction of a boundary tally to reduce the total to 0. 
  11876.  
  11877. Paths Constructed in the Same Direction in Winding Mode 
  11878.  
  11879. Parts of the path with nonzero tallys are filled; parts with zero tallys are 
  11880. not filled. 
  11881.  
  11882. If two figures, for example in the following figure, are drawn in different 
  11883. directions, the tally for the inner triangle is 0 and the area looks exactly as 
  11884. it does in alternate mode. 
  11885.  
  11886. Paths Constructed in Different Directions in Winding Mode 
  11887.  
  11888. Parts of the path with nonzero tallys are filled; parts with zero tallys are 
  11889. not filled. 
  11890.  
  11891.  
  11892. ΓòÉΓòÉΓòÉ 12.1.12. Path Modification ΓòÉΓòÉΓòÉ
  11893.  
  11894. To convert the current path to one that describes the envelope of a geometric 
  11895. wide line, use GpiModifyPath. The current geometric line attributes are then 
  11896. applied to the figures within the path. The line end, line join, and geometric 
  11897. line width attributes all must be set before modify-path or stroke-path 
  11898. operations begin, because it is during those times that the attributes are 
  11899. applied. Cosmetic line attributes of width and type have no effect on geometric 
  11900. lines. 
  11901.  
  11902. GpiModifyPath accepts the path identifier (which must be 1) and the 
  11903. modification option MPATH_STROKE as input. 
  11904.  
  11905. Subsequently, the modified path can be filled to display the geometric wide 
  11906. line, but only in winding mode. Alternatively, the modified path can be 
  11907. converted into a clip path, but again, only in winding mode. 
  11908.  
  11909. Open figures within the path are not closed automatically. Figures not 
  11910. explicitly closed with GpiCloseFigure are drawn with line ends rather than line 
  11911. joins at their start and end points. If the figures within the path overlap, 
  11912. the geometric width envelope compensates so that the overlap portion is not 
  11913. drawn blank in XOR or exclusive-OR mode. 
  11914.  
  11915. Now the geometric lines can be scaled. 
  11916.  
  11917. Note:  The current transforms are applied to the primitives inside a path 
  11918. bracket when the path is defined. This binds the path definition in device 
  11919. coordinates at that time. The path is unaffected by subsequent transformations, 
  11920. except for those (such as scaling) that affect the width of geometric (wide) 
  11921. lines. Since the geometric line width attribute is not applied until the path 
  11922. is converted into a wide line by GpiModifyPath or GpiStrokePath, the width of 
  11923. geometric lines is unaffected by earlier transformations directed at the path 
  11924. definition. 
  11925.  
  11926. After creating a path bracket, geometric wide lines can be constructed by 
  11927. either: 
  11928.  
  11929.      Stroking the path (GpiStrokePath), 
  11930.      Modifying the path (GpiModifyPath), then filling the path (GpiFillPath). 
  11931.  
  11932.  GpiStrokePath is slightly more efficient, but GpiModifyPath and GpiFillPath 
  11933.  offer more flexibility (by way of the fill options). After drawing the lines 
  11934.  no alterations can be made. 
  11935.  
  11936.  
  11937. ΓòÉΓòÉΓòÉ 12.1.13. Path-Stroking ΓòÉΓòÉΓòÉ
  11938.  
  11939. To modify and fill the current path in a single operation, use GpiStrokePath. 
  11940. Then the path is drawn immediately to the output device, with the current 
  11941. geometric line attributes applied to the figures within the path. Certain 
  11942. device drivers can use this function to optimize storage. 
  11943.  
  11944. GpiStrokePath automatically fills the path in winding mode with the current 
  11945. area pattern symbol. When GpiStrokePath is complete, the path definition is 
  11946. deleted from the device context. 
  11947.  
  11948. GpiStrokePath is subject to the same constraints as functions that perform 
  11949. simple line modification: 
  11950.  
  11951.      The line end, line join, and geometric line width attributes all must be 
  11952.       set before stroke operations. 
  11953.      Cosmetic line attributes of width and type have no effect. 
  11954.      Any open figures within the path are not closed automatically. 
  11955.      If figures are not explicitly closed with GpiCloseFigure, they are drawn 
  11956.       with line ends rather than line joins at their start and end points. 
  11957.      If the figures within the path overlap, the geometric width envelope 
  11958.       compensates so that the overlap portion is not drawn blank when drawn in 
  11959.       XOR (exclusive-OR) mode. 
  11960.  
  11961.  This function accepts as input both the path identifier (which must be 1) and 
  11962.  the stroke option (which must be 0L). 
  11963.  
  11964.  When the operating system strokes a path, it draws a geometric line of 
  11965.  specified width along the original figure that defined the path and then fills 
  11966.  the wide line. If the original figure is not a closed shape, the operating 
  11967.  system does not automatically close it before filling the path. The following 
  11968.  figure shows the effects of GpiStrokePath on a box originally defined with 
  11969.  normal (cosmetic) lines. 
  11970.  
  11971.  Defining Lines with a Geometric Width 
  11972.  
  11973.  The broken line is the figure defined within the path. The solid lines show 
  11974.  the path after it has been converted. Each line has a geometric width of n 
  11975.  coordinate units, and the line joins have been defined as beveled. 
  11976.  
  11977.  After setting these attributes, the application can draw the line with 
  11978.  GpiStrokePath. After the lines are drawn, an application can scale stroked 
  11979.  paths with a scaling transformation. 
  11980.  
  11981.  As an alternative to the GpiStrokePath, you can convert the path using 
  11982.  GpiModifyPath, which does not draw the path on the current output device. To 
  11983.  draw a modified path, use GpiFillPath, which draws the path and fills it with 
  11984.  the current area-fill pattern in winding mode. A modified path cannot be 
  11985.  filled in alternate mode. 
  11986.  
  11987.  On some devices, it might be that the GpiStrokePath method works better than 
  11988.  GpiModifyPath, followed by GpiFillPath. 
  11989.  
  11990.  
  11991. ΓòÉΓòÉΓòÉ 12.1.14. Path Conversion to Clip Path ΓòÉΓòÉΓòÉ
  11992.  
  11993. Clipping is the process an application uses to limit graphics output to a 
  11994. specific area (called the clipping area) of the display or page. 
  11995.  
  11996. There are several clipping functions provided by the PM. However, if your 
  11997. application requires an irregular complex shape for a clipping area, it must 
  11998. define the shape with a path. To convert the path into a clipping boundary, use 
  11999. GpiSetClipPath. The clip path, as defined by this operation, becomes the 
  12000. current clip path for all subsequent drawing. 
  12001.  
  12002. This function accepts a path identifier and one of two construction options as 
  12003. input: 
  12004.  
  12005.      SCP_ALTERNATE (default) 
  12006.      SCP_WINDING (must be selected if the path has been modified) 
  12007.  
  12008.  Unlike the path operations described previously, GpiSetClipPath accepts two 
  12009.  different path identifiers: 
  12010.  
  12011.      1 
  12012.      0 (default). 
  12013.  
  12014.  The default path identifier of 0 (SCP_RESET) resets the clip path to infinity, 
  12015.  which displays the picture without clipping. If this value is selected, the 
  12016.  current clip path definition is discarded instead of stored. 
  12017.  
  12018.  For GpiSetClipPath, a path identifier of 1 (SCP_AND) causes the clip path to 
  12019.  be redefined as the mathematical intersection of the stored clip path and the 
  12020.  current path definition. For all other path operations, an identifier of 1 
  12021.  specifies the current path as the recipient of the operation. The only method 
  12022.  of specifying the clip path as the current path, after GpiSetClipPath has been 
  12023.  called, is to call GpiSetClipPath again: the first call with a path identifier 
  12024.  of 0; the second, with a path identifier of 1. The path identifiers and the 
  12025.  construction mode can be ORed together for certain effects. 
  12026.  
  12027.  Any open figures within a path are closed automatically. The boundaries of the 
  12028.  path are considered part of the interior, so any point on the boundary is not 
  12029.  clipped. The following figure shows the result of clipping text with a 
  12030.  triangular clip path. Triangular Clip Path 
  12031.  
  12032.  
  12033. ΓòÉΓòÉΓòÉ 12.1.15. Path Conversion to Region ΓòÉΓòÉΓòÉ
  12034.  
  12035. To convert the current path to a region, use GpiPathToRegion. Then the new 
  12036. region can be modified using any of the region functions that allow the 
  12037. creation of irregular shaped regions. 
  12038.  
  12039. Any open figures in the path definition are closed automatically by 
  12040. GpiPathToRegion. Upon conversion, the current path definition is discarded just 
  12041. like it is when being converted to a clip path. When GpiPathToRegion is 
  12042. complete, the path definition is deleted automatically. 
  12043.  
  12044. This function accepts the path identifier (which must be 1) and one of two 
  12045. construction options as input: 
  12046.  
  12047.      FPATH_ALTERNATE (default) 
  12048.      FPATH_WINDING (must be selected if the path has been modified) 
  12049.  
  12050.  
  12051. ΓòÉΓòÉΓòÉ 12.2. Using Paths ΓòÉΓòÉΓòÉ
  12052.  
  12053. You can use path functions to: 
  12054.  
  12055.      Draw geometric lines and filled polygons 
  12056.      Draw outline text 
  12057.      Create a triangular clip path 
  12058.  
  12059.  
  12060. ΓòÉΓòÉΓòÉ 12.2.1. Drawing a Geometric (Wide) Line ΓòÉΓòÉΓòÉ
  12061.  
  12062. The following figure is an example of how to draw a straight line, 10 units 
  12063. wide with rounded ends. 
  12064.  
  12065. #define INCL_GPIPRIMITIVES
  12066. #include <os2.h>
  12067. void fncPATH01(void){
  12068.     POINTL ptl;
  12069.     HPS hps;
  12070.  
  12071.     GpiSetLineWidthGeom(hps, 10L);       /* Sets line width to ten              */
  12072.     GpiSetLineEnd(hps, LINEEND_ROUND);   /* Sets line end to round              */
  12073.     GpiBeginPath(hps, 1L);               /* Begins path                         */
  12074.     ptl.x = 7;
  12075.     ptl.y = 15;
  12076.     GpiMove(hps, &ptl);                  /* Sets current position               */
  12077.     ptl.x = 450;
  12078.     ptl.y = 15;
  12079.     GpiLine(hps, &ptl);                  /* Draws line                          */
  12080.     GpiEndPath(hps);                     /* Ends path                           */
  12081.     GpiStrokePath(hps, 1L, 0L);          /* Draws geometric line                */
  12082. } /* fncPATH01 */
  12083.  
  12084.  
  12085. ΓòÉΓòÉΓòÉ 12.2.2. Drawing Filled Polygons ΓòÉΓòÉΓòÉ
  12086.  
  12087. The following figure is an example of how to draw an empty triangle within a 
  12088. solid rectangle. 
  12089.  
  12090. #define INCL_GPIPATHS
  12091. #include <os2.h>
  12092. void fncPATH02(void){
  12093.     HPS hps;
  12094.     POINTL aptl1[4] = {       /*  Array of points for triangle   */
  12095.         50,  50,
  12096.         100, 100,
  12097.         150, 50,
  12098.         50,  50  };
  12099.  
  12100.     POINTL aptl2[5] = {       /* Array of points for rectangle   */
  12101.  25,  25,
  12102.  25, 200,
  12103. 200, 200,
  12104. 200,  25,
  12105.  25,  25 };
  12106.  
  12107.     GpiBeginPath(hps, 1L);                 /* Begins path                  */
  12108.     GpiMove(hps, aptl1);                   /* Sets current position        */
  12109.     GpiPolyLine(hps, 4L, aptl1);           /* Plots points for triangle    */
  12110.     GpiMove(hps, aptl2);                   /* Sets current position        */
  12111.     GpiPolyLine(hps, 5L, aptl2);           /* Plots points for rectangle   */
  12112.     GpiEndPath(hps);                       /* Ends path                    */
  12113.     GpiFillPath(hps, 1L, FPATH_ALTERNATE); /* Draws triangle and rectangle */
  12114. } /* fncPATH02 */
  12115.  
  12116.  
  12117. ΓòÉΓòÉΓòÉ 12.2.3. Drawing Outline Text ΓòÉΓòÉΓòÉ
  12118.  
  12119. The following figure shows an example of how to draw text from an outline font 
  12120. with GpiOutlinePath. 
  12121.  
  12122. #define INCL_GPIPRIMITIVES
  12123. #include <os2.h>
  12124. void fncPATH03(void){
  12125.     LONG lcid = 1;                            /* Identifier for font           */
  12126.     FATTRS fattrs;                            /* Structure for font attributes */
  12127.     SIZEF sizfx;                              /* Structure for character box   */
  12128.     POINTL ptl;                               /* Structure for starting point  */
  12129.     HPS hpsWin;
  12130.  
  12131.     fattrs.usRecordLength = sizeof(FATTRS);
  12132.     fattrs.fsSelection = FATTR_SEL_OUTLINE;   /* Specifies outline font        */
  12133.     fattrs.lMatch = 0;                        /* System determines font        */
  12134.     fattrs.szFacename[0] = 0;
  12135.     fattrs.idRegistry = 0;
  12136.     fattrs.usCodePage = 0;
  12137.     fattrs.lMaxBaselineExt = 0;
  12138.     fattrs.lAveCharWidth = 0;
  12139.     fattrs.fsType = 0;
  12140.     fattrs.fsFontUse = FATTR_FONTUSE_OUTLINE; /* Specifies outline font        */
  12141.  
  12142.     GpiCreateLogFont(hpsWin,(PSTR8) NULL, lcid, &fattrs);
  12143.     GpiSetCharSet(hpsWin, lcid);              /* Sets logical font             */
  12144.  
  12145.     sizfx.cx = MAKEFIXED(30, 0);              /* Width of character box        */
  12146.     sizfx.cy = MAKEFIXED(30, 0);              /* Height of character box       */
  12147.     GpiSetCharBox(hpsWin, &sizfx)             /* Sets size of character box    */
  12148.  
  12149.     GpiBeginPath(hpsWin, 1L);                 /* Begins path                   */
  12150.     ptl.x = 100;
  12151.     ptl.y = 200;
  12152.     GpiMove(hpsWin, &ptl);                    /* Sets current position         */
  12153.     GpiCharString(hpsWin, 7L, "Outline");     /* Establishes char. string      */
  12154.     GpiEndPath(hpsWin);                       /* Ends path                     */
  12155.     GpiOutlinePath(hpsWin, 1L, 0L);           /* Draws character string        */
  12156. } /* fncPATH03 */
  12157.  
  12158.  
  12159. ΓòÉΓòÉΓòÉ 12.2.4. Creating a Triangular Clip Path ΓòÉΓòÉΓòÉ
  12160.  
  12161. The following figure shows an example of how to create a triangular clip path 
  12162. and then write text into it. 
  12163.  
  12164. #define INCL_GPIPATHS
  12165. #include <os2.h>
  12166. void fncPATH04(void){
  12167.     POINTL ptlStart;
  12168.     HPS hps;
  12169.     LONG i;
  12170.  
  12171.     POINTL aptl[4] = {             /* Array of points for triangle     */
  12172.            35,  45,
  12173.           100, 100,
  12174.           200,  45,
  12175.            35,  45 };
  12176.  
  12177.     GpiBeginPath(hps, 1L);         /* Begins path bracket              */
  12178.     GpiMove(hps, aptl);            /* Sets current position            */
  12179.     GpiPolyLine(hps, 4L, aptl);    /* Plots points for triangle        */
  12180.     GpiEndPath(hps)                /* Ends path bracket                */
  12181.  
  12182.     GpiSetClipPath(hps, 1L, SCP_ALTERNATE | SCP_AND);
  12183.  
  12184.     /* Write a block of text.                                          */
  12185.  
  12186.     ptlStart.x = 50;
  12187.     for (i = 50L; i < 110L; i += 10L) {
  12188.         ptlStart.y = i;
  12189.         GpiCharStringAt(hps, &ptlStart, 18L, "String of text!");
  12190.     } /* for */
  12191. } /* fncPATH04 */
  12192.  
  12193.  
  12194. ΓòÉΓòÉΓòÉ 13. Regions ΓòÉΓòÉΓòÉ
  12195.  
  12196. A region is a graphics object usually composed of one or more rectangles. 
  12197. Converted to clip regions, they are used mainly to define a clipping boundary, 
  12198. in device coordinates, for multiple intersecting rectangles. Clip regions 
  12199. provide the required clipping in an update region during WM_PAINT processing 
  12200. when it is necessary to repaint part of a window. Regions also can be used for 
  12201. area fill. 
  12202.  
  12203. The following topics are related to the information in this chapter: 
  12204.  
  12205.      Presentation spaces and device contexts 
  12206.      Area primitives 
  12207.      Color and mix modes 
  12208.      Coordinate spaces and transformations 
  12209.      Clipping 
  12210.  
  12211.  
  12212. ΓòÉΓòÉΓòÉ 13.1. About Regions ΓòÉΓòÉΓòÉ
  12213.  
  12214. A region consists of one or more overlapping or separate rectangles in an 
  12215. application's device space. The sides of the rectangles are parallel to the x- 
  12216. and y-axes in the device coordinate space. An irregular, nonrectangular path 
  12217. can be converted into a region. However, unless otherwise specified, the 
  12218. assumption of this chapter is that a region is rectangular. 
  12219.  
  12220. If a region consists of intersecting rectangles, the intersecting sides are 
  12221. always perpendicular. If the rectangles have no common elements, the region is 
  12222. defined as separate rectangles. 
  12223.  
  12224. Unlike areas and paths, which are defined in world coordinates, regions are 
  12225. device-dependent and, so, are defined in device coordinates. The device 
  12226. coordinates are inclusive (inside the rectangle) at the bottom and left 
  12227. coordinate boundaries, and exclusive (outside the rectangle and clipped) at the 
  12228. top and right boundaries. 
  12229.  
  12230. Each region is created for the device that currently is associated with a 
  12231. presentation space. Also, after creation, regions are available for various 
  12232. operations; a region handle identifies the region for subsequent operations. 
  12233.  
  12234. The following figure shows a region that consists of two intersecting 
  12235. rectangles. An application defined the region by passing an array containing 
  12236. the coordinates for the two rectangles to GpiCreateRegion. The application then 
  12237. drew the region with GpiPaintRegion. 
  12238.  
  12239. Defining a Region 
  12240.  
  12241. This region comprises two overlapping rectangles. 
  12242.  
  12243.  
  12244. ΓòÉΓòÉΓòÉ 13.1.1. System Implementation ΓòÉΓòÉΓòÉ
  12245.  
  12246. Regions are device-dependent objects and, therefore, are associated with a 
  12247. particular device. For this reason, when an application specifies a 
  12248. presentation space as input to one of the region functions, that presentation 
  12249. space must be associated with a device context. The associated device context 
  12250. serves to identify the device. Because a region is specific to the device for 
  12251. which it was created, a region should not be created for one device and then 
  12252. used for another. 
  12253.  
  12254. If the device is a printer, a metafile can be used to store region functions as 
  12255. escapes, and the resulting metafile can be displayed on any device. The 
  12256. appearance of the result of any region function is affected by differences in 
  12257. the pel:aspect ratio and device resolution on different printers. 
  12258.  
  12259. Most of the region-oriented functions use the RECTL structure to define the 
  12260. device-space coordinates of the rectangle. When an application creates a 
  12261. rectangle in a device space and passes its coordinates to a region function, 
  12262. the operating system excludes the top and rightmost edges of the rectangle. 
  12263. This means that an application must add 1 to the values in the xRight and yTop 
  12264. fields of the RECTL structure to obtain the desired dimensions. For example, if 
  12265. an application requires a region that measures 100-by-100 device units, with a 
  12266. lower-left corner at (10,10), xRight and yTop should be set to 111 instead of 
  12267. 110. 
  12268.  
  12269.  
  12270. ΓòÉΓòÉΓòÉ 13.1.2. Region Attributes ΓòÉΓòÉΓòÉ
  12271.  
  12272. Regions do not have a distinct ...BUNDLE data structure associated with them. 
  12273. Unlike primitives or even paths, the purpose of regions is to provide a 
  12274. definition for an operation-not visual output. However, there are two functions 
  12275. that present the region as a visible entity. 
  12276.  
  12277. GpiPaintRegion paints a region in the presentation space. This function accepts 
  12278. only the region handle as input. GpiPaintRegion does not cause graphics orders 
  12279. to be added to the current segment. (Graphics orders are the smallest, most 
  12280. complete portions of a segment.) Therefore, in retain or draw-and-retain modes, 
  12281. you are advised to use paths or areas rather than regions to ensure the desired 
  12282. effect. 
  12283.  
  12284. GpiFrameRegion draws a frame around a region by tracing the inner perimeter 
  12285. with a rectangle of a specified size. This function accepts the region handle 
  12286. and the desired frame thickness as input. 
  12287.  
  12288. A region's visible output is controlled by the following AREABUNDLE attributes: 
  12289.  
  12290.      Pattern symbol 
  12291.      Pattern set 
  12292.      Pattern reference point 
  12293.      Area foreground color 
  12294.      Area background color 
  12295.      Area foreground mix 
  12296.  
  12297.  These attributes follow the current definitions and appear just as area 
  12298.  primitives do. The operating system uses the pattern symbol to fill the 
  12299.  interior of the region. Any alterations to the fill pattern or reference point 
  12300.  affects the appearance of a region, just as it does in an area. 
  12301.  
  12302.  Because neither the painted region nor the region frame have boundary lines, 
  12303.  no LINEBUNDLE attributes influence the appearance of a region resulting from 
  12304.  GpiPaintRegion or GpiFrameRegion. 
  12305.  
  12306.  
  12307. ΓòÉΓòÉΓòÉ 13.1.3. Region Creation ΓòÉΓòÉΓòÉ
  12308.  
  12309. Areas and paths are created and defined within a bracket. Regions are defined 
  12310. by a single function, GpiCreateRegion. As input to GpiCreateRegion, supply the 
  12311. total number of, and the coordinates for, each rectangle that contributes to 
  12312. the region. The following applies to region coordinates: 
  12313.  
  12314.      They define the bottom left and top right coordinates of each rectangle 
  12315.       that makes up the region. 
  12316.  
  12317.      They must be in the range -32768 through +32767. 
  12318.  
  12319.      They always are device coordinates, because regions always are created 
  12320.       and drawn in an application's device space. 
  12321.  
  12322.  The output from GpiCreateRegion is the region handle, which identifies the 
  12323.  region for subsequent operations. Because each region can be distinctly 
  12324.  identified, the region functions allow applications to work with more than one 
  12325.  region at a time. 
  12326.  
  12327.  For example, an application can combine two regions with GpiCombineRegion or 
  12328.  compare two regions with GpiEqualRegion. GpiQueryRegionRects retrieves the 
  12329.  coordinates of the rectangles that make up a region, enabling an application 
  12330.  to create a copy of that region. To create the copy, you supply, as input to a 
  12331.  new GpiCreateRegion, the exact rectangles returned from GpiQueryRegionRects. 
  12332.  
  12333.  
  12334. ΓòÉΓòÉΓòÉ 13.1.4. Region Operations ΓòÉΓòÉΓòÉ
  12335.  
  12336. The following operations can be performed on a region: 
  12337.  
  12338.      Creating Regions 
  12339.      Drawing Regions 
  12340.      Moving Regions 
  12341.      Determining Region Characteristics 
  12342.      Converting a Path to a Region 
  12343.      Converting a Region to a Clip Region 
  12344.      Deleting Regions 
  12345.  
  12346.  
  12347. ΓòÉΓòÉΓòÉ 13.1.4.1. Creating Regions ΓòÉΓòÉΓòÉ
  12348.  
  12349. To create a rectangular region, call GpiCreateRegion. This function accepts, as 
  12350. input, the number of rectangles to be ORed into a single region and the 
  12351. coordinates of those rectangles. If the number of rectangles is 0, an empty 
  12352. region is created. 
  12353.  
  12354. To create a new region from regions that already exist, call GpiCombineRegion. 
  12355. This function accepts, as input, a region handle for the target region, a 
  12356. region handle for each of the two source regions, and an options flag that 
  12357. specifies the way the two source regions are combined. 
  12358.  
  12359. Note:  The destination region can be either of the two source regions, in which 
  12360.        case, that region is replaced by the new region. 
  12361.  
  12362.  The rectangles are differentiated by one region's being distinctly "the first 
  12363.  source rectangle" and the other region labeled "the second source rectangle". 
  12364.  The order of the source rectangles affects the way GpiCombineRegion combines 
  12365.  them. You can use GpiCombineRegion an indefinite number of times to form 
  12366.  complex polygons. However, the function is limited to combining only two 
  12367.  regions each time it is called. The two source regions must be created for the 
  12368.  same type of device. 
  12369.  
  12370.  Following are the five ways in which two regions can be combined: 
  12371.  
  12372.  Option         Result 
  12373.  
  12374.  CRGN_OR        Union of the two source regions 
  12375.  
  12376.  CRGN_XOR       Symmetric difference of the two source regions 
  12377.  
  12378.  CRGN_COPY      Source region 1 only; source region 2 is ignored 
  12379.  
  12380.  CRGN_AND       Intersection of the two source regions 
  12381.  
  12382.  CRGN_DIFF      Source region 1 minus source region 2 
  12383.  
  12384.  The effects of these different combining operations on overlapping regions are 
  12385.  shown in The effects of these different combining operations on overlapping 
  12386.  regions are shown in the following figure. Their effects on separate regions 
  12387.  are shown in Their effects on separate regions are shown in the figure after 
  12388.  the following figure. 
  12389.  
  12390.  Combining Overlapping Regions 
  12391.  
  12392.  The source regions are two overlapping rectangles. The regions that result 
  12393.  from the various combine operations are shown as shaded areas. 
  12394.  
  12395.  Output from GpiCombineRegion tells you whether the resulting region is a NULL 
  12396.  region, rectangular region, or complex region. A complex region is any region 
  12397.  defined by two or more rectangles. 
  12398.  
  12399.  To change the definition of a region while keeping the same region handle, 
  12400.  call GpiSetRegion. This function accepts, as input, the number and dimensions 
  12401.  of the rectangles that now define the region, just as GpiCreateRegion does. 
  12402.  However, GpiSetRegion also accepts the handle of the region to be updated. 
  12403.  GpiSetRegion, like GpiCreateRegion, takes a region definition to be the union 
  12404.  of a sequence of rectangles (that are effectively ORed together). In the case 
  12405.  of GpiCreateRegion, a new region is created and its handle returned. In the 
  12406.  case of GpiSetRegion, the previous definition is discarded and replaced by the 
  12407.  new definition that is associated with the existing region handle. 
  12408.  
  12409.  Combining Disjoint Regions 
  12410.  
  12411.  The two source regions do not overlap. The regions that result from the 
  12412.  various combine operations are shown as shaded areas. The result from a 
  12413.  CRGN_AND combining of separate regions is a NULL region. 
  12414.  
  12415.  
  12416. ΓòÉΓòÉΓòÉ 13.1.4.2. Moving a Region ΓòÉΓòÉΓòÉ
  12417.  
  12418. To move a region, call GpiOffsetRegion. This function accepts, as input, the 
  12419. region handle and an offset value that is added to every coordinate point of 
  12420. the region. 
  12421.  
  12422. GpiOffsetRegion moves a region by a specific number of device coordinates. By 
  12423. specifying positive or negative x- and y-values an application can move a 
  12424. region in any direction, relative to its current position. 
  12425.  
  12426.  
  12427. ΓòÉΓòÉΓòÉ 13.1.4.3. Determining Region Characteristics ΓòÉΓòÉΓòÉ
  12428.  
  12429. Regions are used in many operations. There are several functions that determine 
  12430. the characteristics of regions because these characteristics influence the 
  12431. outcome of the operation being performed. 
  12432.  
  12433. To determine whether two regions are identical, call GpiEqualRegion. This 
  12434. function accepts, as input, the two region handles. Regions are identical if 
  12435. the only difference between them is an empty region. For example, a rectangular 
  12436. region whose lower-left corner is at 10,10 is not identical to a region whose 
  12437. lower-left corner is at 50,50, even if the regions have exactly the same 
  12438. dimensions. The two regions also must be of the same device class to be 
  12439. considered identical. 
  12440.  
  12441. To determine the rectangles that compose a region, call GpiQueryRegionRects, 
  12442. which retrieves the coordinates of a series of rectangles that, when ORed 
  12443. together, define the shape of the regions. 
  12444.  
  12445. Note:  The individual regions returned may differ in size and number from those 
  12446.        originally used to specify the region. 
  12447.  
  12448.  GpiQueryRegionRects accepts, as input, the region handle and the maximum 
  12449.  number of rectangles that can be returned. The division of the region into 
  12450.  multiple rectangles is handled automatically by the PM. 
  12451.  
  12452.  It is not necessary for an application to retrieve all the rectangles in a 
  12453.  single function. Your application can call GpiQueryRegionRects any number of 
  12454.  times. Therefore, the application must specify the maximum number of 
  12455.  rectangles and the rectangle number to start from in each function. 
  12456.  
  12457.  No assumptions can be made about the number and coordinates of rectangles 
  12458.  returned except that they will define the specified region precisely. The 
  12459.  purpose of specifying the number of rectangles in the query is to ensure that 
  12460.  the system does not return more coordinates than can fit in the RECTL array. 
  12461.  
  12462.  To determine whether a point is inside the borders of a region, call 
  12463.  GpiPtInRegion. This function is especially useful in applications that must 
  12464.  determine whether the mouse pointer is over a region. The particular point 
  12465.  must be expressed in device coordinates. 
  12466.  
  12467.  To determine whether any part of a specified rectangle lies within a region, 
  12468.  call GpiRectInRegion. This function accepts, as input, the region handle and 
  12469.  the rectangle as specified in device coordinates. 
  12470.  
  12471.  To determine the coordinates of the smallest rectangle that encloses a region, 
  12472.  call GpiQueryRegionBox. This function accepts the region handle as input. The 
  12473.  output from this function tells you whether the bounding region is 
  12474.  rectangular, NULL, or complex. 
  12475.  
  12476.  
  12477. ΓòÉΓòÉΓòÉ 13.1.4.4. Converting a Region to a Clip Region ΓòÉΓòÉΓòÉ
  12478.  
  12479. Clipping is the process an application uses to limit graphics output to a 
  12480. specific area (called the clipping area) of the display or page. 
  12481.  
  12482. There are several clipping functions provided by the PM. However, if your 
  12483. application requires a clipping boundary in device coordinates, it must define 
  12484. the boundary with a region. To convert the region into a clipping boundary, 
  12485. call GpiSetClipRegion. The clip region, as defined by this operation, becomes 
  12486. the current clip region of all subsequent drawing operations. 
  12487.  
  12488. GpiSetClipRegion accepts, as input, the region handle. A NULL region handle 
  12489. sets the clip region to infinity, effectively performing no clipping. 
  12490.  
  12491. Unlike clip paths, the region that is no longer the current clip region is not 
  12492. deleted. It retains the effects of any changes made to it while it was a clip 
  12493. region, and it can be used with the other region functions, including being 
  12494. reselected as the clip region with GpiSetClipRegion. 
  12495.  
  12496. You do not have to deselect the current clip region before selecting another. 
  12497. Each selected clip region automatically replaces the one before it. If there is 
  12498. an existing clip region when you call GpiSetClipRegion, it reverts to a normal 
  12499. region, and its handle is returned. 
  12500.  
  12501. When you have selected the current clip region, none of the region functions 
  12502. described thus far can be used for that region. The following functions can be 
  12503. used with the current clip region: 
  12504.  
  12505.      GpiQueryClipBox 
  12506.      GpiIntersectClipRectangle 
  12507.      GpiExcludeClipRectangle 
  12508.      GpiOffsetClipRegion 
  12509.      GpiPtVisible 
  12510.      GpiRectVisible 
  12511.  
  12512.  These functions are described in Clipping and Boundary Determination. All of 
  12513.  these functions work in world coordinates, rather than device coordinates, and 
  12514.  therefore, are subject to current transformations. 
  12515.  
  12516.  GpiPtVisible and GpiRectVisible do not apply exclusively to clip regions. 
  12517.  
  12518.  When the screen contents are altered (for example, when a window is sized), 
  12519.  you have to be able to repair the part of the screen image affected by the 
  12520.  change. The following figure illustrates the necessary region. 
  12521.  
  12522.  Repairing the Screen with Clip Regions 
  12523.  
  12524.  To improve performance of the drawing operation, you can restrict the 
  12525.  redrawing and repair work to the affected parts of the screen. 
  12526.  
  12527.  Use WinQueryUpdateRegion to determine whether graphics objects are totally 
  12528.  outside the update region and need not be drawn at all. Graphics objects that 
  12529.  are within, or are partly outside, the update region should be drawn, and the 
  12530.  system will perform the required clipping automatically. 
  12531.  
  12532.  Define a clipping region using the dimensions of the update region. Then call 
  12533.  an appropriate GPI drawing request, such as GpiDrawChain, to redraw the screen 
  12534.  contents. Any drawing that would occur outside the clip region is discarded 
  12535.  according to the standard clipping rules. Only those graphics within the clip 
  12536.  region are redrawn. 
  12537.  
  12538.  
  12539. ΓòÉΓòÉΓòÉ 13.1.4.5. Deleting a Region ΓòÉΓòÉΓòÉ
  12540.  
  12541. To delete a region, call GpiDestroyRegion. This function accepts, as input, the 
  12542. region handle. If the region is the current clip region, it cannot be deleted. 
  12543. To delete a current clip region, first call GpiSetClipRegion and specify a NULL 
  12544. region handle. The region is no longer the current clip region and can be 
  12545. deleted. 
  12546.  
  12547.  
  12548. ΓòÉΓòÉΓòÉ 13.2. Using Regions ΓòÉΓòÉΓòÉ
  12549.  
  12550. You can use the region functions to: 
  12551.  
  12552.      Create or delete a region 
  12553.      Combine regions 
  12554.      Compare regions 
  12555.      Move a region 
  12556.      Paint and frame a region 
  12557.      Locate a point with respect to a region 
  12558.      Determine the coordinates of region rectangles 
  12559.  
  12560.  
  12561. ΓòÉΓòÉΓòÉ 13.2.1. Creating and Deleting a Region ΓòÉΓòÉΓòÉ
  12562.  
  12563. To create a region: 
  12564.  
  12565.    1. Create an array of RECTL structures containing the dimensions of the 
  12566.       rectangles that will compose the region. 
  12567.  
  12568.    2. Call GpiCreateRegion to create the region. (This function returns a 
  12569.       handle that identifies the region.) 
  12570.  
  12571.  To delete a region, pass the handle returned by the GpiCreateRegion function 
  12572.  to GpiDestroyRegion. 
  12573.  
  12574.  The following figure shows how to create and delete a region. 
  12575.  
  12576.   #include <os2.h>
  12577.   void fncREGN01(void){
  12578.       HPS  hps;                            /* Presentation-space handle    */
  12579.       HRGN hrgn;                           /* Region handle                */
  12580.       RECTL arcl[] = {
  12581.            25,  50,                        /* Rectangle 1                  */
  12582.            75, 100,
  12583.            50,  75,                        /* Rectangle 2                  */
  12584.           100, 150,
  12585.            75, 125,                        /* Rectangle 3                  */
  12586.           200, 175,
  12587.           150,  75,                        /* Rectangle 4                  */
  12588.           250, 150 };
  12589.  
  12590.       hrgn = GpiCreateRegion(hps,        /* Creates region                 */
  12591.           sizeof(arcl) / sizeof (RECTL), /* Number of rectangles in region */
  12592.           arcl);                         /* Array of rectangle structures  */
  12593.           .
  12594.           . /* Work with the region here.                                  */
  12595.           .
  12596.       GpiDestroyRegion(hps, hrgn);   /* Destroys region identified by hrgn */
  12597.   } /* fncREGN01 */
  12598.  
  12599.  
  12600. ΓòÉΓòÉΓòÉ 13.2.2. Combining Regions ΓòÉΓòÉΓòÉ
  12601.  
  12602. To combine two regions: 
  12603.  
  12604.    1. Create a region that the operating system can use as the destination 
  12605.       region when it combines the source regions. 
  12606.  
  12607.    2. Determine which of the five combining methods to use. 
  12608.  
  12609.    3. Call GpiCombineRegion. 
  12610.  
  12611.  The following figure shows how to combine two regions by using the OR 
  12612.  operation: 
  12613.  
  12614.   #define INCL_GPIREGIONS
  12615.   #include <os2.h>
  12616.   void fncREGN02(void){
  12617.       HPS  hps;
  12618.       HRGN hrgn1, hrgn2, hrgn3;          /* Region handles                    */
  12619.       RECTL rcl1, rcl2;
  12620.  
  12621.       rcl1.xLeft = 50; rcl1.yBottom = 100;
  12622.       rcl1.xRight = 200; rcl1.yTop = 175;
  12623.       hrgn1 = GpiCreateRegion(hps, 1L, &rcl1);        /* First source region  */
  12624.  
  12625.       rcl2.xLeft = 125; rcl2.yBottom = 150;
  12626.       rcl2.xRight = 225; rcl2.yTop = 200;
  12627.       hrgn2 = GpiCreateRegion(hps, 1L, &rcl2);        /* Second source region */
  12628.  
  12629.       hrgn3 = GpiCreateRegion(hps, 0L, (PRECTL) NULL); /* Destination region  */
  12630.  
  12631.       /* Combine the regions. */
  12632.       GpiCombineRegion(hps, hrgn3, hrgn1, hrgn2, CRGN_OR);
  12633.   } /* fncREGN02 */
  12634.  
  12635.  
  12636. ΓòÉΓòÉΓòÉ 13.2.3. Comparing Regions ΓòÉΓòÉΓòÉ
  12637.  
  12638. GpiEqualRegion determines whether two regions are identical. The following 
  12639. figure shows how to compare regions. 
  12640.  
  12641. #define INCL_GPIREGIONS
  12642. #include <os2.h>
  12643. void fncREGN03(void){
  12644.     HPS hps;                    /* Presentation-space handle         */
  12645.     HRGN hrgn1, hrgn2;          /* Region handles                    */
  12646.     LONG lEqual;                /* Return value for GpiEqualRegion   */
  12647.     RECTL rcl1, rcl2;           /* Structures for region coordinates */
  12648.  
  12649.     rcl1.xLeft = 50; rcl1.yBottom = 100;
  12650.     rcl1.xRight = 200; rcl1.yTop = 175;
  12651.     hrgn1 = GpiCreateRegion(hps, 1, &rcl1);    /* Creates first region  */
  12652.  
  12653.     rcl2.xLeft = 125; rcl2.yBottom = 150;
  12654.     rcl2.xRight = 225; rcl2.yTop = 200;
  12655.     hrgn2 = GpiCreateRegion(hps, 1, &rcl2);    /* Creates second region */
  12656.  
  12657.     lEqual = GpiEqualRegion(hps, hrgn1, hrgn2); /* Compares regions     */
  12658.     if (lEqual == EQRGN_EQUAL)
  12659.     {
  12660.         .
  12661.         .   /* Regions are equal.     */
  12662.         .
  12663.     }
  12664.     else if (lEqual == EQRGN_NOTEQUAL)
  12665.     {
  12666.         .
  12667.         .   /* Regions are not equal. */
  12668.         .
  12669.     }
  12670.     else if (lEqual == EQRGN_ERROR)
  12671.     {
  12672.         .
  12673.         .   /* An error occurred.     */
  12674.         .
  12675.     }
  12676. } /* fncREGN03 */
  12677.  
  12678.  
  12679. ΓòÉΓòÉΓòÉ 13.2.4. Offsetting a Region ΓòÉΓòÉΓòÉ
  12680.  
  12681. GpiOffsetRegion moves a region, by a specified offset, from its current 
  12682. position (in world space). This function must be called with the address of a 
  12683. POINTL structure that contains an x and a y translation factor. The following 
  12684. figure shows how to offset a region. 
  12685.  
  12686. } /* fncREGN04 */
  12687.     POINTL ptlNewPos;             /* Structure for offset value  */
  12688.  
  12689.     ptlNewPos.x = 200;            /* Sets x offset               */
  12690.     ptlNewPos.y = 10;             /* Sets y offset               */
  12691.  
  12692.     GpiOffsetRegion(hps, hrgn, &ptlNewPos);    /* Offsets region */
  12693.  
  12694.  
  12695. ΓòÉΓòÉΓòÉ 13.2.5. Painting a Region ΓòÉΓòÉΓòÉ
  12696.  
  12697. GpiPaintRegion fills a region with the current fill pattern, using the colors 
  12698. and mix mode that appear in the current AREABUNDLE structure. GpiFrameRegion 
  12699. draws a frame around a region by tracing the perimeter of the region with a 
  12700. rectangle of a specified size. The following figure shows how to change the 
  12701. fill-pattern color to green, paint a region, and draw a frame around the 
  12702. region. 
  12703.  
  12704.     SIZEL sizl;                        /* Structure for size of frame */
  12705.     HPS  hps;                          /* Presentation-space handle   */
  12706.     HRGN hrgn;                         /* Region handle               */
  12707.  
  12708.     GpiSetColor(hps, CLR_DARKPINK);
  12709.     GpiPaintRegion(hps, hrgn);         /* Paint region dark pink      */
  12710.     GpiSetColor(hps, CLR_BLACK);
  12711.     sizl.cx = 5;
  12712.     sizl.cy = 5;
  12713.     GpiFrameRegion(hps, hrgn, &sizl);   /* 5-by-5 black frame         */
  12714.  
  12715.  
  12716. ΓòÉΓòÉΓòÉ 13.2.6. Locating a Point with Respect to a Region ΓòÉΓòÉΓòÉ
  12717.  
  12718. To determine whether the mouse pointer lies within a region: 
  12719.  
  12720.    1. Retrieve the mouse-pointer coordinates and store them in a POINTL 
  12721.       structure. 
  12722.  
  12723.    2. Call GpiPtInRegion, passing it a handle that identifies the appropriate 
  12724.       region and the address of the POINTL structure from Step 1. 
  12725.  
  12726.    3. Examine the value that GpiPtInRegion returns to determine whether the 
  12727.       point lies within the region. 
  12728.  
  12729.  The following figure shows how to locate the mouse pointer with respect to a 
  12730.  region. 
  12731.  
  12732.   #define INCL_GPIREGIONS
  12733.   #include <os2.h>
  12734.   void fncREGN04(void){
  12735.       POINTL ptlCurPos;      /* Mouse coordinates              */
  12736.       HPS hps;               /* Presentation-space handle      */
  12737.       HRGN hrgn;             /* Region handle                  */
  12738.       LONG lPosition;        /* Return value for GpiPtInRegion */
  12739.  
  12740.       /* Determine mouse coordinates and store in ptlCurPos.   */
  12741.       lPosition = GpiPtInRegion(hps, hrgn, &ptlCurPos);
  12742.       if (lPosition == PRGN_INSIDE) {
  12743.           .
  12744.           . /* Point lies within region.  */
  12745.           .
  12746.       } /* if */
  12747.       else if (lPosition == PRGN_OUTSIDE) {
  12748.           .
  12749.           . /* Point lies outside region. */
  12750.           .
  12751.       } /* else-if */
  12752.  
  12753.  
  12754. ΓòÉΓòÉΓòÉ 13.2.7. Determining Coordinates of Rectangles in a Region ΓòÉΓòÉΓòÉ
  12755.  
  12756. If a region consists of more than one rectangle, you can call 
  12757. GpiQueryRegionRects to retrieve the coordinates of the lower-left and 
  12758. upper-right corners of each rectangle. 
  12759.  
  12760. If you use GpiQueryRegionRects to retrieve every rectangle requested to define 
  12761. a region, the function retrieves the coordinates of as many contiguous 
  12762. rectangles as required. GpiQueryRegionRects returns the coordinates of the 
  12763. rectangles that define a region to an array of RECTL structures, and returns 
  12764. the number of rectangles that were requested for the definition to the 
  12765. crcReturned field of the RGNRECT structure. Your RECTL array may not be large 
  12766. enough to hold all of the rectangles. Specify the maximum it can accept and 
  12767. request the remainder in subsequent functions if necessary. 
  12768.  
  12769. To determine the coordinates of the rectangles that form a region, follow these 
  12770. steps: 
  12771.  
  12772.    1. Create an array of RECTL structures that will receive the rectangle 
  12773.       coordinates. More rectangles may be required to define the region than 
  12774.       were required to create it. 
  12775.  
  12776.    2. Fill in the ircStart, crc, and usDirection fields of the RGNRECT 
  12777.       structure. The crc field can specify more rectangles than will be 
  12778.       returned by GpiQueryRegionRects. 
  12779.  
  12780.    3. Call GpiQueryRegionRects to retrieve the coordinates. 
  12781.  
  12782.  The following figure shows how to determine the number of rectangles that 
  12783.  define a region, the coordinates of the rectangles in that region, and how to 
  12784.  create a new region using those coordinates. 
  12785.  
  12786.   #define INCL_GPIREGIONS
  12787.   #include <os2.h>
  12788.   void fncREGN05(void){
  12789.       RGNRECT rgnrc;               /* Structure for region rectangles       */
  12790.       RECTL arcl1[5];              /* Array for determining rectangle count */
  12791.       PRECTL parcl;                /* Array for rectangle coordinates       */
  12792.       ULONG cRects = 0;            /* Total number of rectangles in region  */
  12793.       HPS hps;
  12794.       HRGN hrgn3;
  12795.  
  12796.       rgnrc.ircStart = 1;          /* Rectangle to start with               */
  12797.       rgnrc.crc = 5;               /* Number of rectangles to query         */
  12798.       rgnrc.ulDirection = RECTDIR_LFRT_BOTTOP;      /* Direction to query   */
  12799.  
  12800.       /**********************************************************************/
  12801.       /*  Determine the total number of rectangles in the region by         */
  12802.       /*  repeatedly calling GpiQueryRegionRects with an array of 5 RECTL   */
  12803.       /*  structures. The loop terminates when the function retrieves less  */
  12804.       /*  than 5 rectangles.                                                */
  12805.       /**********************************************************************/
  12806.       do {
  12807.           GpiQueryRegionRects(hps, /* Handle of presentation space          */
  12808.               hrgn3,               /* Region to query                       */
  12809.               (PRECTL) NULL,       /* Gets all rectangles in region         */
  12810.               &rgnrc,              /* Structure with rectangle data         */
  12811.               arcl1);              /* Array of structures for coordinates   */
  12812.  
  12813.           cRects += rgnrc.crcReturned;
  12814.       } while (rgnrc.crcReturned == rgnrc.crc); /* While 5 rects retrieved  */
  12815.  
  12816.       //cRects = rgnrc.crcReturned + (rgnrc.ircStart - 1);
  12817.  
  12818.       rgnrc.ircStart = 0;                  /* Rectangle to start with       */
  12819.       rgnrc.crc = cRects;                  /* Number of rectangles to query */
  12820.  
  12821.       /* Allocate enough memory for all RECTL structures.                   */
  12822.       parcl = (PRECTL) malloc(cRects * sizeof(RECTL));
  12823.  
  12824.       /* Fill array with coordinates of all rectangles.                     */
  12825.       GpiQueryRegionRects(hps,     /* Handle of presentation space          */
  12826.           hrgn3,                   /* Region to query                       */
  12827.           (PRECTL) NULL,           /* Gets all rectangles in region         */
  12828.           &rgnrc,                  /* Structure with rectangle data         */
  12829.           parcl);                  /* Array of structures for coordinates   */
  12830.   } /* fncREGN05 */
  12831.  
  12832.  
  12833. ΓòÉΓòÉΓòÉ 14. Notices ΓòÉΓòÉΓòÉ
  12834.  
  12835. November 1996 
  12836.  
  12837. The following paragraph does not apply to the United Kingdom or any country 
  12838. where such provisions are inconsistent with local law:  INTERNATIONAL BUSINESS 
  12839. MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY 
  12840. KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
  12841. WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states 
  12842. do not allow disclaimer of express or implied warranties in certain 
  12843. transactions, therefore, this statement may not apply to you. 
  12844.  
  12845. This publication could include technical inaccuracies or typographical errors. 
  12846. Changes are periodically made to the information herein; these changes will be 
  12847. incorporated in new editions of the publication. IBM may make improvements 
  12848. and/or changes in the product(s) and/or the program(s) described in this 
  12849. publication at any time. 
  12850.  
  12851. It is possible that this publication may contain reference to, or information 
  12852. about, IBM products (machines and programs), programming, or services that are 
  12853. not announced in your country.  Such references or information must not be 
  12854. construed to mean that IBM intends to announce such IBM products, programming, 
  12855. or services in your country. 
  12856.  
  12857. Requests for technical information about IBM products should be made to your 
  12858. IBM reseller or IBM marketing representative. 
  12859.  
  12860.  
  12861. ΓòÉΓòÉΓòÉ 14.1. Copyright Notices ΓòÉΓòÉΓòÉ
  12862.  
  12863. COPYRIGHT LICENSE: This publication contains printed sample application 
  12864. programs in source language, which illustrate OS/2 programming techniques. You 
  12865. may copy, modify, and distribute these sample programs in any form without 
  12866. payment to IBM, for the purposes of developing, using, marketing or 
  12867. distributing application programs conforming to the OS/2 application 
  12868. programming interface. 
  12869.  
  12870. Each copy of any portion of these sample programs or any derivative work, which 
  12871. is distributed to others, must include a copyright notice as follows: "(C) 
  12872. (your company name) (year).  All rights reserved." 
  12873.  
  12874. (C) Copyright International Business Machines Corporation 1994,1996. All rights 
  12875. reserved. 
  12876. Note to U.S. Government Users - Documentation related to restricted rights - 
  12877. Use, duplication or disclosure is subject to restrictions set forth in GSA ADP 
  12878. Schedule Contract with IBM Corp. 
  12879.  
  12880.  
  12881. ΓòÉΓòÉΓòÉ 14.2. Disclaimers ΓòÉΓòÉΓòÉ
  12882.  
  12883. References in this publication to IBM products, programs, or services do not 
  12884. imply that IBM intends to make these available in all countries in which IBM 
  12885. operates. Any reference to an IBM product, program, or service is not intended 
  12886. to state or imply that only that IBM product, program, or service may be used. 
  12887. Subject to IBM's valid intellectual property or other legally protectable 
  12888. rights, any functionally equivalent product, program, or service may be used 
  12889. instead of the IBM product, program, or service. The evaluation and 
  12890. verification of operation in conjunction with other products, except those 
  12891. expressly designated by IBM, are the responsibility of the user. 
  12892.  
  12893. IBM may have patents or pending patent applications covering subject matter in 
  12894. this document. The furnishing of this document does not give you any license to 
  12895. these patents. You can send license inquiries, in writing, to: 
  12896.  
  12897.       IBM Director of Licensing 
  12898.       IBM Corporation 
  12899.       500 Columbus Avenue 
  12900.       Thornwood, NY  10594 
  12901.       U.S.A. 
  12902.  
  12903.  
  12904. ΓòÉΓòÉΓòÉ 14.3. Trademarks ΓòÉΓòÉΓòÉ
  12905.  
  12906. The following terms are trademarks of the IBM Corporation in the United States 
  12907. or other countries or both: 
  12908.  
  12909. IBM
  12910. PM
  12911. Presentation Manager
  12912. OS/2
  12913. SAA
  12914. System Application Architecture
  12915. Workplace Shell
  12916.  
  12917. The following terms are trademarks of other companies: 
  12918.  
  12919.  C++                 AT&T, Inc. 
  12920.  Helvetica           Linotype 
  12921.  
  12922.  
  12923. ΓòÉΓòÉΓòÉ 14.4. Double-Byte Character Set (DBCS) ΓòÉΓòÉΓòÉ
  12924.  
  12925. Throughout this publication, you will see references to specific value for 
  12926. character strings. The values are for single-byte character set (SBCS). If you 
  12927. use the double-byte character set (DBCS), note that one DBCS character equals 
  12928. two SBCS characters. 
  12929.  
  12930.  
  12931. ΓòÉΓòÉΓòÉ 15. Glossary ΓòÉΓòÉΓòÉ
  12932.  
  12933. This glossary defines many of the terms used in this book. It includes terms 
  12934. and definitions from the IBM Dictionary of Computing, as well as terms specific 
  12935. to the OS/2 operating system and the Presentation Manager. It is not a complete 
  12936. glossary for the entire OS/2 operating system; nor is it a complete dictionary 
  12937. of computer terms. 
  12938.  
  12939. Other primary sources for these definitions are: 
  12940.  
  12941.      The American National Standard Dictionary for Information Systems, ANSI 
  12942.       X3.172-1990, copyrighted 1990 by the American National Standards 
  12943.       Institute, 11 West 42nd Street, New York, New York 10036. These 
  12944.       definitions are identified by the symbol (A) after the definition. 
  12945.  
  12946.      The Information Technology Vocabulary, developed by Subcommittee 1, Joint 
  12947.       Technical Committee 1, of the International Organization for 
  12948.       Standardization and the International Electrotechnical Commission 
  12949.       (ISO/IEC JTC1/SC1). Definitions of published parts of this vocabulary are 
  12950.       identified by the symbol (I) after the definition; definitions taken from 
  12951.       draft international standards, committee drafts, and working papers being 
  12952.       developed by ISO/IEC JTC1/SC1 are identified by the symbol (T) after the 
  12953.       definition, indicating that final agreement has not yet been reached 
  12954.       among the participating National Bodies of SC1. 
  12955.  
  12956.  
  12957. ΓòÉΓòÉΓòÉ 15.1. Glossary Listing ΓòÉΓòÉΓòÉ
  12958.  
  12959. Select a starting letter of glossary terms: 
  12960.  
  12961.  A    N 
  12962.  B    O 
  12963.  C    P 
  12964.  D    Q 
  12965.  E    R 
  12966.  F    S 
  12967.  G    T 
  12968.  H    U 
  12969.  I    V 
  12970.  J    W 
  12971.  K    X 
  12972.  L    Y 
  12973.  M    Z 
  12974.  
  12975.  
  12976. ΓòÉΓòÉΓòÉ <hidden> Glossary - A ΓòÉΓòÉΓòÉ
  12977.  
  12978.  accelerator  -In SAA Common User Access architecture, a key or combination of 
  12979.    keys that invokes an application-defined function. 
  12980.  
  12981.  accelerator table  -A table used to define which key strokes are treated as 
  12982.    accelerators and the commands they are translated into. 
  12983.  
  12984.  access mode  -The manner in which an application gains access to a file it has 
  12985.    opened. Examples of access modes are read-only, write-only, and read/write. 
  12986.  
  12987.  access permission  -All access rights that a user has regarding an object. (I)
  12988.  
  12989.  action  -One of a set of defined tasks that a computer performs. Users request 
  12990.    the application to perform an action in several ways, such as typing a 
  12991.    command, pressing a function key, or selecting the action name from an 
  12992.    action bar or menu. 
  12993.  
  12994.  action bar  -In SAA Common User Access architecture, the area at the top of a 
  12995.    window that contains choices that give a user access to actions available in 
  12996.    that window. 
  12997.  
  12998.  action point  -The current position on the screen at which the pointer is 
  12999.    pointing. Contrast with hot spot and input focus. 
  13000.  
  13001.  active program  -A program currently running on the computer.  An active 
  13002.    program can be interactive (running and receiving input from the user) or 
  13003.    noninteractive (running but not receiving input from the user). See also 
  13004.    interactive program and noninteractive program. 
  13005.  
  13006.  active window  -The window with which the user is currently interacting. 
  13007.  
  13008.  address space  -(1) The range of addresses available to a program. (A)  (2) 
  13009.    The area of virtual storage available for a particular job. 
  13010.  
  13011.  alphanumeric video output  -Output to the logical video buffer when the video 
  13012.    adapter is in text mode and the logical video buffer is addressed by an 
  13013.    application as a rectangular array of character cells. 
  13014.  
  13015.  American National Standard Code for Information Interchange  -The standard 
  13016.    code, using a coded character set consisting of 7-bit coded characters (8 
  13017.    bits including parity check), that is used for information interchange among 
  13018.    data processing systems, data communication systems, and associated 
  13019.    equipment. The ASCII set consists of control characters and graphic 
  13020.    characters. (A) 
  13021.  
  13022.    Note:  IBM has defined an extension to ASCII code (characters 128-255). 
  13023.  
  13024.  anchor  -A window procedure that handles Presentation Manager message 
  13025.    conversions between an icon procedure and an application. 
  13026.  
  13027.  anchor block  -An area of Presentation-Manager-internal resources to allocated 
  13028.    process or thread that calls WinInitialize. 
  13029.  
  13030.  anchor point  -A point in a window used by a program designer or by a window 
  13031.    manager to position a subsequently appearing window. 
  13032.  
  13033.  ANSI  -American National Standards Institute. 
  13034.  
  13035.  APA  -All points addressable. 
  13036.  
  13037.  API  -Application programming interface. 
  13038.  
  13039.  application  -A collection of software components used to perform specific 
  13040.    types of work on a computer; for example, a payroll application, an airline 
  13041.    reservation application, a network application. 
  13042.  
  13043.  application object  -In SAA Advanced Common User Access architecture, a form 
  13044.    that an application provides for a user; for example, a spreadsheet form. 
  13045.    Contrast with user object. 
  13046.  
  13047.  application programming interface (API)  -A functional interface supplied by 
  13048.    the operating system or by a separately orderable licensed program that 
  13049.    allows an application program written in a high-level language to use 
  13050.    specific data or functions of the operating system or the licensed program. 
  13051.  
  13052.  application-modal  -Pertaining to a message box or dialog box for which 
  13053.    processing must be completed before further interaction with any other 
  13054.    window owned by the same application may take place. 
  13055.  
  13056.  area  -In computer graphics, a filled shape such as a solid rectangle. 
  13057.  
  13058.  ASCII  -American National Standard Code for Information Interchange. 
  13059.  
  13060.  ASCIIZ  -A string of ASCII characters that is terminated with a byte 
  13061.    containing the value 0. 
  13062.  
  13063.  aspect ratio  -In computer graphics, the width-to-height ratio of an area, 
  13064.    symbol, or shape. 
  13065.  
  13066.  asynchronous (ASYNC)  -(1) Pertaining to two or more processes that do not 
  13067.    depend upon the occurrence of specific events such as common timing 
  13068.    signals. (T)  (2) Without regular time relationship;  unexpected or 
  13069.    unpredictable with respect to the execution of program instructions. See 
  13070.    also synchronous. 
  13071.  
  13072.  atom  -A constant that represents a string. As soon as a string has been 
  13073.    defined as an atom, the atom can be used in place of the string to save 
  13074.    space. Strings are associated with their respective atoms in an atom table. 
  13075.    See also integer atom. 
  13076.  
  13077.  atom table  -A table used to relate atoms with the strings that they 
  13078.    represent. Also in the table is the mechanism by which the presence of a 
  13079.    string can be checked. 
  13080.  
  13081.  atomic operation  -An operation that completes its work on an object before 
  13082.    another operation can be performed on the same object. 
  13083.  
  13084.  attribute  -A characteristic or property that can be controlled, usually to 
  13085.    obtain a required appearance;  for example, the color of a line. See also 
  13086.    graphics attributes and segment attributes. 
  13087.  
  13088.  automatic link  -In Information Presentation Facility (IPF), a link that 
  13089.    begins a chain reaction at the primary window. When the user selects the 
  13090.    primary window, an automatic link is activated to display secondary windows. 
  13091.  
  13092.  AVIO  -Advanced Video Input/Output. 
  13093.  
  13094.  
  13095. ΓòÉΓòÉΓòÉ <hidden> Glossary - B ΓòÉΓòÉΓòÉ
  13096.  
  13097.  Bezier curve  -(1) A mathematical technique of specifying smooth continous 
  13098.    lines and surfaces, which require a starting point and a finishing point 
  13099.    with several intermediate points that influence or control the path of the 
  13100.    linking curve. Named after Dr. P. Bezier. (2) (D of C) In the AIX Graphics 
  13101.    Library, a cubic spline approximation to a set of four control points that 
  13102.    passes through the first and fourth control points and that has a continuous 
  13103.    slope where two spline segments meet. Named after Dr. P. Bezier. 
  13104.  
  13105.  background  -(1) In multiprogramming, the conditions under which low-priority 
  13106.    programs are executed. Contrast with foreground. (2) An active session that 
  13107.    is not currently displayed on the screen. 
  13108.  
  13109.  background color  -The color in which the background of a graphic primitive is 
  13110.    drawn. 
  13111.  
  13112.  background mix  -An attribute that determines how the background of a graphic 
  13113.    primitive is combined with the existing color of the graphics presentation 
  13114.    space. Contrast with mix. 
  13115.  
  13116.  background program  -In multiprogramming, a program that executes with a low 
  13117.    priority. Contrast with foreground program. 
  13118.  
  13119.  bit map  -A representation in memory of the data displayed on an APA device, 
  13120.    usually the screen. 
  13121.  
  13122.  block  -(1) A string of data elements recorded or transmitted as a unit. The 
  13123.    elements may be characters, words, or logical records. (T)  (2) To record 
  13124.    data in a block. (3) A collection of contiguous records recorded as a unit. 
  13125.    Blocks are separated by interblock gaps and each block may contain one or 
  13126.    more records. (A)
  13127.  
  13128.  block device  -A storage device that performs I/O operations on blocks of data 
  13129.    called sectors. Data on block devices can be randomly accessed. Block 
  13130.    devices are designated by a drive letter (for example, C:). 
  13131.  
  13132.  blocking mode  -A condition set by an application that determines when its 
  13133.    threads might block. For example, an application might set the Pipemode 
  13134.    parameter for the DosCreateNPipe function so that its threads perform I/O 
  13135.    operations to the named pipe block when no data is available. 
  13136.  
  13137.  border  -A visual indication (for example, a separator line or a background 
  13138.    color) of the boundaries of a window. 
  13139.  
  13140.  boundary determination  -An operation used to compute the size of the smallest 
  13141.    rectangle that encloses a graphics object on the screen. 
  13142.  
  13143.  breakpoint  -(1) A point in a computer program where execution may be halted. 
  13144.    A breakpoint is usually at the beginning of an instruction where halts, 
  13145.    caused by external intervention, are convenient for resuming 
  13146.    execution. (T)  (2) A place in a program, specified by a command or a 
  13147.    condition, where the system halts execution and gives control to the 
  13148.    workstation user or to a specified program. 
  13149.  
  13150.  broken pipe  -When all of the handles that access one end of a pipe have been 
  13151.    closed. 
  13152.  
  13153.  bucket  -One or more fields in which the result of an operation is kept. 
  13154.  
  13155.  buffer  -(1) A portion of storage used to hold input or output data 
  13156.    temporarily. (2) To allocate and schedule the use of buffers. (A)
  13157.  
  13158.  button  -A mechanism used to request or initiate an action. See also barrel 
  13159.    buttons, bezel buttons, mouse button, push button, and radio button. 
  13160.  
  13161.  byte pipe  -Pipes that handle data as byte streams. All unnamed pipes are byte 
  13162.    pipes. Named pipes can be byte pipes or message pipes. See byte stream. 
  13163.  
  13164.  byte stream  -Data that consists of an unbroken stream of bytes. 
  13165.  
  13166.  
  13167. ΓòÉΓòÉΓòÉ <hidden> Glossary - C ΓòÉΓòÉΓòÉ
  13168.  
  13169.  cache  -A high-speed buffer storage that contains frequently accessed 
  13170.    instructions and data; it is used to reduce access time. 
  13171.  
  13172.  cached micro presentation space  -A presentation space from a 
  13173.    Presentation-Manager-owned store of micro presentation spaces. It can be 
  13174.    used for drawing to a window only, and must be returned to the store when 
  13175.    the task is complete. 
  13176.  
  13177.  CAD  -Computer-Aided Design. 
  13178.  
  13179.  call  -(1) The action of bringing a computer program, a routine, or a 
  13180.    subroutine into effect, usually by specifying the entry conditions and 
  13181.    jumping to an entry point. (I)  (A)  (2) To transfer control to a procedure, 
  13182.    program, routine, or subroutine. 
  13183.  
  13184.  calling sequence  -A sequence of instructions together with any associated 
  13185.    data necessary to execute a call. (T)
  13186.  
  13187.  Cancel  -An action that removes the current window or menu without processing 
  13188.    it, and returns the previous window. 
  13189.  
  13190.  cascaded menu  -In the OS/2 operating system, a menu that appears when the 
  13191.    arrow to the right of a cascading choice is selected. It contains a set of 
  13192.    choices that are related to the cascading choice. Cascaded menus are used to 
  13193.    reduce the length of a menu. See also cascading choice. 
  13194.  
  13195.  cascading choice  -In SAA Common User Access architecture, a choice in a menu 
  13196.    that, when selected, produces a cascaded menu containing other choices.  An 
  13197.    arrow (->) appears to the right of the cascading choice. 
  13198.  
  13199.  CASE statement  -In PM programming, provides the body of a window procedure. 
  13200.    There is usually one CASE statement for each message type supported by an 
  13201.    application. 
  13202.  
  13203.  CGA  -Color graphics adapter. 
  13204.  
  13205.  chained list  -A list in which the data elements may be dispersed but in which 
  13206.    each data element contains information for locating the 
  13207.    next. (T)Synonymous with linked list. 
  13208.  
  13209.  character  -A letter, digit, or other symbol. 
  13210.  
  13211.  character box  -In computer graphics, the boundary that defines, in world 
  13212.    coordinates, the horizontal and vertical space occupied by a single 
  13213.    character from a character set. See also character mode. Contrast with 
  13214.    character cell. 
  13215.  
  13216.  character cell  -The physical, rectangular space in which any single character 
  13217.    is displayed on a screen or printer device. Position is addressed by row and 
  13218.    column coordinates. Contrast with character box. 
  13219.  
  13220.  character code  -The means of addressing a character in a character set, 
  13221.    sometimes called code point. 
  13222.  
  13223.  character device  -A device that performs I/O operations on one character at a 
  13224.    time. Because character devices view data as a stream of bytes, 
  13225.    character-device data cannot be randomly accessed. Character devices include 
  13226.    the keyboard, mouse, and printer, and are referred to by name. 
  13227.  
  13228.  character mode  -A mode that, in conjunction with the font type, determines 
  13229.    the extent to which graphics characters are affected by the character box, 
  13230.    shear, and angle attributes. 
  13231.  
  13232.  character set  -(1) An ordered set of unique representations called 
  13233.    characters; for example, the 26 letters of English alphabet, Boolean 0 and 
  13234.    1, the set of symbols in the Morse code, and the 128 ASCII 
  13235.    characters. (A)  (2) All the valid characters for a programming language or 
  13236.    for a computer system. (3) A group of characters used for a specific reason; 
  13237.    for example, the set of characters a printer can print. 
  13238.  
  13239.  check box  -In SAA Advanced Common User Access architecture, a square box with 
  13240.    associated text that represents a choice. When a user selects a choice, an X 
  13241.    appears in the check box to indicate that the choice is in effect. The user 
  13242.    can clear the check box by selecting the choice again. Contrast with radio 
  13243.    button. 
  13244.  
  13245.  check mark  - (1) (D of C) In SAA Advanced Common User Access architecture, a 
  13246.    symbol that shows that a choice is currently in effect. (2) The symbol that 
  13247.    is used to indicate a selected item on a pull-down menu. 
  13248.  
  13249.  child process  -In the OS/2 operating system, a process started by another 
  13250.    process, which is called the parent process. Contrast with parent process. 
  13251.  
  13252.  child window  -A window that appears within the border of its parent window 
  13253.    (either a primary window or another child window). When the parent window is 
  13254.    resized, moved, or destroyed, the child window also is resized, moved, or 
  13255.    destroyed; however, the child window can be moved or resized independently 
  13256.    from the parent window, within the boundaries of the parent window. Contrast 
  13257.    with parent window. 
  13258.  
  13259.  choice  -(1) An option that can be selected. The choice can be presented as 
  13260.    text, as a symbol (number or letter), or as an icon (a pictorial symbol). 
  13261.    (2) (D of C) In SAA Common User Access architecture, an item that a user can 
  13262.    select. 
  13263.  
  13264.  chord  -(1) To press more than one button on a pointing device while the 
  13265.    pointer is within the limits that the user has specified for the operating 
  13266.    environment. (2) (D of C) In graphics, a short line segment whose end points 
  13267.    lie on a circle. Chords are a means for producing a circular image from 
  13268.    straight lines. The higher the number of chords per circle, the smoother the 
  13269.    circular image. 
  13270.  
  13271.  class  -In object-oriented design or programming, a group of objects that 
  13272.    share a common definition and that therefore share common properties, 
  13273.    operations, and behavior. Members of the group are called instances of the 
  13274.    class. 
  13275.  
  13276.  class method  -In System Object Model, an action that can be performed on a 
  13277.    class object. Synonymous with factory method. 
  13278.  
  13279.  class object  -In System Object Model, the run-time implementation of a class. 
  13280.  
  13281.  class style  -The set of properties that apply to every window in a window 
  13282.    class. 
  13283.  
  13284.  client  -(1) A functional unit that receives shared services from a 
  13285.    server. (T)  (2) A user, as in a client process that uses a named pipe or 
  13286.    queue that is created and owned by a server process. 
  13287.  
  13288.  client area  -The part of the window, inside the border, that is below the 
  13289.    menu bar. It is the user's work space, where a user types information and 
  13290.    selects choices from selection fields.  In primary windows, it is where an 
  13291.    application programmer presents the objects that a user works on. 
  13292.  
  13293.  client program  -An application that creates and manipulates instances of 
  13294.    classes. 
  13295.  
  13296.  client window  -The window in which the application displays output and 
  13297.    receives input. This window is located inside the frame window, under the 
  13298.    window title bar and any menu bar, and within any scroll bars. 
  13299.  
  13300.  clip limits  -The area of the paper that can be reached by a printer or 
  13301.    plotter. 
  13302.  
  13303.  clipboard  -In SAA Common User Access architecture, an area of computer 
  13304.    memory, or storage, that temporarily holds data. Data in the clipboard is 
  13305.    available to other applications. 
  13306.  
  13307.  clipping  -In computer graphics, removing those parts of a display image that 
  13308.    lie outside a given boundary. (I)  (A)
  13309.  
  13310.  clipping area  -The area in which the window can paint. 
  13311.  
  13312.  clipping path  -A clipping boundary in world-coordinate space. 
  13313.  
  13314.  clock tick  -The minimum unit of time that the system tracks. If the system 
  13315.    timer currently counts at a rate of X Hz, the system tracks the time every 
  13316.    1/X of a second. Also known as time tick. 
  13317.  
  13318.  CLOCK$  -Character-device name reserved for the system clock. 
  13319.  
  13320.  code page  -An assignment of graphic characters and control-function meanings 
  13321.    to all code points. 
  13322.  
  13323.  code point  -(1) Synonym for character code. (2) (D of C) A 1-byte code 
  13324.    representing one of 256 potential characters. 
  13325.  
  13326.  code segment  -An executable section of programming code within a load module. 
  13327.  
  13328.  color dithering  -See dithering. 
  13329.  
  13330.  color graphics adapter (CGA)  -An adapter that simultaneously provides four 
  13331.    colors and is supported by all IBM Personal Computer and Personal System/2 
  13332.    models. 
  13333.  
  13334.  command  -The name and parameters associated with an action that a program can 
  13335.    perform. 
  13336.  
  13337.  command area  -An area composed of a command field prompt and a command entry 
  13338.    field. 
  13339.  
  13340.  command entry field  -An entry field in which users type commands. 
  13341.  
  13342.  command line  -On a display screen, a display line, sometimes at the bottom of 
  13343.    the screen, in which only commands can be entered. 
  13344.  
  13345.  command mode  -A state of a system or device in which the user can enter 
  13346.    commands. 
  13347.  
  13348.  command prompt  -A field prompt showing the location of the command entry 
  13349.    field in a panel. 
  13350.  
  13351.  Common Programming Interface (CPI)  -Definitions of those application 
  13352.    development languages and services that have, or are intended to have, 
  13353.    implementations on and a high degree of commonality across the SAA 
  13354.    environments. One of the three SAA architectural areas. See also Common User 
  13355.    Access architecture. 
  13356.  
  13357.  Common User Access (CUA) architecture  - Guidelines for the dialog between a 
  13358.    human and a workstation or terminal. One of the three SAA architectural 
  13359.    areas. See also Common Programming Interface. 
  13360.  
  13361.  compile  -To translate a program written in a higher-level programming 
  13362.    language into a machine language program. 
  13363.  
  13364.  composite window  -A window composed of other windows (such as a frame window, 
  13365.    frame-control windows, and a client window) that are kept together as a unit 
  13366.    and that interact with each other. 
  13367.  
  13368.  computer-aided design (CAD)  -The use of a computer to design or change a 
  13369.    product, tool, or machine, such as using a computer for drafting or 
  13370.    illustrating. 
  13371.  
  13372.  COM1, COM2, COM3  -Character-device names reserved for serial ports 1 through 
  13373.    3. 
  13374.  
  13375.  CON  -Character-device name reserved for the console keyboard and screen. 
  13376.  
  13377.  conditional cascaded menu  -A pull-down menu associated with a menu item that 
  13378.    has a cascade mini-push button beside it in an object's pop-up menu. The 
  13379.    conditional cascaded menu is displayed when the user selects the mini-push 
  13380.    button. 
  13381.  
  13382.  container  -In SAA Common User Access architecture, an object that holds other 
  13383.    objects. A folder is an example of a container object. See also folder and 
  13384.    object. 
  13385.  
  13386.  contextual help  -In SAA Common User Access Architecture, help that gives 
  13387.    specific information about the item the cursor is on. The help is contextual 
  13388.    because it provides information about a specific item as it is currently 
  13389.    being used. Contrast with extended help. 
  13390.  
  13391.  contiguous  -Touching or joining at a common edge or boundary, for example, an 
  13392.    unbroken consecutive series of storage locations. 
  13393.  
  13394.  control  -In SAA Advanced Common User Access architecture, a component of the 
  13395.    user interface that allows a user to select choices or type information; for 
  13396.    example, a check box, an entry field, a radio button. 
  13397.  
  13398.  control area  -A storage area used by a computer program to hold control information. (I)  (A)
  13399.  
  13400.  Control Panel  -In the Presentation Manager, a program used to set up user 
  13401.    preferences that act globally across the system. 
  13402.  
  13403.  Control Program  -(1) The basic functions of the operating system, including 
  13404.    DOS emulation and the support for keyboard, mouse, and video input/output. 
  13405.    (2) A computer program designed to schedule and to supervise the execution 
  13406.    of programs of a computer system. (I)  (A)
  13407.  
  13408.  control window  -A window that is used as part of a composite window to 
  13409.    perform simple input and output tasks. Radio buttons and check boxes are 
  13410.    examples. 
  13411.  
  13412.  control word  -An instruction within a document that identifies its parts or 
  13413.    indicates how to format the document. 
  13414.  
  13415.  coordinate space  -A two-dimensional set of points used to generate output on 
  13416.    a video display of printer. 
  13417.  
  13418.  Copy  -A choice that places onto the clipboard, a copy of what the user has 
  13419.    selected. See also Cut and Paste. 
  13420.  
  13421.  correlation  -The action of determining which element or object within a 
  13422.    picture is at a given position on the display. This follows a pick 
  13423.    operation. 
  13424.  
  13425.  coverpage window  -A window in which the application's help information is 
  13426.    displayed. 
  13427.  
  13428.  CPI  -Common Programming Interface. 
  13429.  
  13430.  critical extended attribute  -An extended attribute that is necessary for the 
  13431.    correct operation of the system or a particular application. 
  13432.  
  13433.  critical section  -(1) In programming languages, a part of an asynchronous 
  13434.    procedure that cannot be executed simultaneously with a certain part of 
  13435.    another asynchronous procedure. (I)
  13436.  
  13437.    Note:  Part of the other asynchronous procedure also is a critical section. 
  13438.    (2) A section of code that is not reentrant; that is, code that can be 
  13439.    executed by only one thread at a time. 
  13440.  
  13441.  CUA architecture  -Common User Access architecture. 
  13442.  
  13443.  current position  -In computer graphics, the position, in user coordinates, 
  13444.    that becomes the starting point for the next graphics routine, if that 
  13445.    routine does not explicitly specify a starting point. 
  13446.  
  13447.  cursor  -A symbol displayed on the screen and associated with an input device. 
  13448.    The cursor indicates where input from the device will be placed. Types of 
  13449.    cursors include text cursors, graphics cursors, and selection cursors. 
  13450.    Contrast with pointer and input focus. 
  13451.  
  13452.  Cut  -In SAA Common User Access architecture, a choice that removes a selected 
  13453.    object, or a part of an object, to the clipboard, usually compressing the 
  13454.    space it occupied in a window. See also Copy and Paste. 
  13455.  
  13456.  
  13457. ΓòÉΓòÉΓòÉ <hidden> Glossary - D ΓòÉΓòÉΓòÉ
  13458.  
  13459.  daisy chain  -A method of device interconnection for determining interrupt 
  13460.    priority by connecting the interrupt sources serially. 
  13461.  
  13462.  data segment  -A nonexecutable section of a program module; that is, a section 
  13463.    of a program that contains data definitions. 
  13464.  
  13465.  data structure  -The syntactic structure of symbolic expressions and their 
  13466.    storage-allocation characteristics. (T)
  13467.  
  13468.  data transfer  -The movement of data from one object to another by way of the 
  13469.    clipboard or by direct manipulation. 
  13470.  
  13471.  DBCS  -Double-byte character set. 
  13472.  
  13473.  DDE  -Dynamic data exchange. 
  13474.  
  13475.  deadlock  -(1) Unresolved contention for the use of a resource. (2) An error 
  13476.    condition in which processing cannot continue because each of two elements 
  13477.    of the process is waiting for an action by, or a response from, the other. 
  13478.    (3) An impasse that occurs when multiple processes are waiting for the 
  13479.    availability of a resource that will not become available because it is 
  13480.    being held by another process that is in a similar wait state. 
  13481.  
  13482.  debug  -To detect, diagnose, and eliminate errors in programs. (T)
  13483.  
  13484.  decipoint  -In printing, one tenth of a point.  There are 72 points in an 
  13485.    inch. 
  13486.  
  13487.  default procedure  -A function provided by the Presentation Manager Interface 
  13488.    that may be used to process standard messages from dialogs or windows. 
  13489.  
  13490.  default value  -A value assumed when no value has been specified. Synonymous 
  13491.    with assumed value. For example, in the graphics programming interface, the 
  13492.    default line-type is 'solid'. 
  13493.  
  13494.  definition list  -A type of list that pairs a term and its description. 
  13495.  
  13496.  delta  -An application-defined threshold, or number of container items, from 
  13497.    either end of the list. 
  13498.  
  13499.  descendant  -See child process. 
  13500.  
  13501.  descriptive text  -Text used in addition to a field prompt to give more 
  13502.    information about a field. 
  13503.  
  13504.  Deselect all  -A choice that cancels the selection of all of the objects that 
  13505.    have been selected in that window. 
  13506.  
  13507.  Desktop Manager  -In the Presentation Manager, a window that displays a list 
  13508.    of groups of programs, each of which can be started or stopped. 
  13509.  
  13510.  desktop window  -The window, corresponding to the physical device, against 
  13511.    which all other types of windows are established. 
  13512.  
  13513.  detached process  -A background process that runs independent of the parent 
  13514.    process. 
  13515.  
  13516.  detent  -A point on a slider that represents an exact value to which a user 
  13517.    can move the slider arm. 
  13518.  
  13519.  device context  -A logical description of a data destination such as memory, 
  13520.    metafile, display, printer, or plotter. See also direct device context, 
  13521.    information device context, memory device context, metafile device context, 
  13522.    queued device context, and screen device context. 
  13523.  
  13524.  device driver  -A file that contains the code needed to attach and use a 
  13525.    device such as a display, printer, or plotter. 
  13526.  
  13527.  device space  -(1) Coordinate space in which graphics are assembled after all 
  13528.    GPI transformations have been applied. Device space is defined in 
  13529.    device-specific units. (2) ( D of C) In computer graphics, a space defined 
  13530.    by the complete set of addressable points of a display device. (A)
  13531.  
  13532.  dialog  -The interchange of information between a computer and its user 
  13533.    through a sequence of requests by the user and the presentation of responses 
  13534.    by the computer. 
  13535.  
  13536.  dialog box  -In SAA Advanced Common User Access architecture, a movable 
  13537.    window, fixed in size, containing controls that a user uses to provide 
  13538.    information required by an application so that it can continue to process a 
  13539.    user request. See also message box, primary window, secondary window. Also 
  13540.    known as a pop-up window. 
  13541.  
  13542.  Dialog Box Editor  -A WYSIWYG editor that creates dialog boxes for 
  13543.    communicating with the application user. 
  13544.  
  13545.  dialog item  -A component (for example, a menu or a button) of a dialog box. 
  13546.    Dialog items are also used when creating dialog templates. 
  13547.  
  13548.  dialog procedure  -A dialog window that is controlled by a window procedure. 
  13549.    It is responsible for responding to all messages sent to the dialog window. 
  13550.  
  13551.  dialog tag language  -A markup language used by the DTL compiler to create 
  13552.    dialog objects. 
  13553.  
  13554.  dialog template  -The definition of a dialog box, which contains details of 
  13555.    its position, appearance, and window ID, and the window ID of each of its 
  13556.    child windows. 
  13557.  
  13558.  direct device context  -A logical description of a data destination that is a 
  13559.    device other than the screen (for example, a printer or plotter), and where 
  13560.    the output is not to go through the spooler. Its purpose is to satisfy 
  13561.    queries. See also device context. 
  13562.  
  13563.  direct manipulation  -The user's ability to interact with an object by using 
  13564.    the mouse, typically by dragging an object around on the Desktop and 
  13565.    dropping it on other objects. 
  13566.  
  13567.  direct memory access (DMA)  -A technique for moving data directly between main 
  13568.    storage and peripheral equipment without requiring processing of the data by 
  13569.    the processing unit.(T)
  13570.  
  13571.  directory  -A type of file containing the names and controlling information 
  13572.    for other files or other directories. 
  13573.  
  13574.  display point  -Synonym for pel. 
  13575.  
  13576.  dithering  -(1) The process used in color displays whereby every other pel is 
  13577.    set to one color, and the intermediate pels are set to another. Together 
  13578.    they produce the effect of a third color at normal viewing distances. This 
  13579.    process can only be used on solid areas of color; it does not work, for 
  13580.    example, on narrow lines. (2) (D of C ) In computer graphics, a technique of 
  13581.    interleaving dark and light pixels so that the resulting image looks 
  13582.    smoothly shaded when viewed from a distance. 
  13583.  
  13584.  DMA  -Direct memory access. 
  13585.  
  13586.  DOS Protect Mode Interface (DPMI)  -An interface between protect mode and real 
  13587.    mode programs. 
  13588.  
  13589.  double-byte character set (DBCS)  -A set of characters in which each character 
  13590.    is represented by two bytes.  Languages such as Japanese, Chinese, and 
  13591.    Korean, which contain more characters than can be represented by 256 code 
  13592.    points, require double-byte character sets. Since each character requires 
  13593.    two bytes, the entering, displaying, and printing of DBCS characters 
  13594.    requires hardware and software that can support DBCS. 
  13595.  
  13596.  doubleword  -A contiguous sequence of bits or characters that comprises two 
  13597.    computer words and is capable of being addressed as a unit. (A)
  13598.  
  13599.  DPMI  -DOS Protect Mode Interface. 
  13600.  
  13601.  drag  -In SAA Common User Access, to use a pointing device to move an object; 
  13602.    for example, clicking on a window border, and dragging it to make the window 
  13603.    larger. 
  13604.  
  13605.  dragging  -(1) In computer graphics, moving an object on the display screen as 
  13606.    if it were attached to the pointer. (2) (D of C) In computer graphics, 
  13607.    moving one or more segments on a display surface by translating. (I)  (A)
  13608.  
  13609.  drawing chain  -See segment chain. 
  13610.  
  13611.  drop  -To fix the position of an object that is being dragged, by releasing 
  13612.    the select button of the pointing device. 
  13613.  
  13614.  drop  -To fix the position of an object that is being dragged, by releasing 
  13615.    the select button of the pointing device. See also drag. 
  13616.  
  13617.  DTL  -Dialog tag language. 
  13618.  
  13619.  dual-boot function  -A feature of the OS/2 operating system that allows the 
  13620.    user to start DOS from within the operating system, or an OS/2 session from 
  13621.    within DOS. 
  13622.  
  13623.  duplex  -Pertaining to communication in which data can be sent and received at 
  13624.    the same time. Synonymous with full duplex. 
  13625.  
  13626.  dynamic data exchange (DDE)  -A message protocol used to communicate between 
  13627.    applications that share data. The protocol uses shared memory as the means 
  13628.    of exchanging data between applications. 
  13629.  
  13630.  dynamic data formatting  -A formatting procedure that enables you to 
  13631.    incorporate text, bit maps or metafiles in an IPF window at execution time. 
  13632.  
  13633.  dynamic link library  -A collection of executable programming code and data 
  13634.    that is bound to an application at load time or run time, rather than during 
  13635.    linking. The programming code and data in a dynamic link library can be 
  13636.    shared by several applications simultaneously. 
  13637.  
  13638.  dynamic linking  -The process of resolving external references in a program 
  13639.    module at load time or run time rather than during linking. 
  13640.  
  13641.  dynamic segments  -Graphics segments drawn in exclusive-OR mix mode so that 
  13642.    they can be moved from one screen position to another without affecting the 
  13643.    rest of the displayed picture. 
  13644.  
  13645.  dynamic storage  -(1) A device that stores data in a manner that permits the 
  13646.    data to move or vary with time such that the specified data is not always 
  13647.    available for recovery. (A)  (2) A storage in which the cells require 
  13648.    repetitive application of control signals in order to retain stored data. 
  13649.    Such repetitive application of the control signals is called a refresh 
  13650.    operation. A dynamic storage may use static addressing or sensing 
  13651.    circuits. (A)  (3) See also static storage. 
  13652.  
  13653.  dynamic time slicing  -Varies the size of the time slice depending on system 
  13654.    load and paging activity. 
  13655.  
  13656.  dynamic-link module  -A module that is linked at load time or run time. 
  13657.  
  13658.  
  13659. ΓòÉΓòÉΓòÉ <hidden> Glossary - E ΓòÉΓòÉΓòÉ
  13660.  
  13661.  EBCDIC  -Extended binary-coded decimal interchange code. A coded character set 
  13662.    consisting of 8-bit coded characters (9 bits including parity check), used 
  13663.    for information interchange among data processing systems, data 
  13664.    communications systems, and associated equipment. 
  13665.  
  13666.  edge-triggered  -Pertaining to an event semaphore that is posted then reset 
  13667.    before a waiting thread gets a chance to run. The semaphore is considered to 
  13668.    be posted for the rest of that thread's waiting period; the thread does not 
  13669.    have to wait for the semaphore to be posted again. 
  13670.  
  13671.  EGA  -Extended graphics adapter. 
  13672.  
  13673.  element  -An entry in a graphics segment that comprises one or more graphics 
  13674.    orders and that is addressed by the element pointer. 
  13675.  
  13676.  EMS  -Expanded Memory Specification. 
  13677.  
  13678.  encapsulation  -Hiding an object's implementation, that is, its private, 
  13679.    internal data and methods. Private variables and methods are accessible only 
  13680.    to the object that contains them. 
  13681.  
  13682.  entry field  -In SAA Common User Access architecture, an area where a user 
  13683.    types information. Its boundaries are usually indicated. See also selection 
  13684.    field. 
  13685.  
  13686.  entry panel  -A defined panel type containing one or more entry fields and 
  13687.    protected information such as headings, prompts, and explanatory text. 
  13688.  
  13689.  entry-field control  -The component of a user interface that provides the 
  13690.    means by which the application receives data entered by the user in an entry 
  13691.    field. When it has the input focus, the entry field displays a flashing 
  13692.    pointer at the position where the next typed character will go. 
  13693.  
  13694.  environment segment  -The list of environment variables and their values for a 
  13695.    process. 
  13696.  
  13697.  environment strings  -ASCII text strings that define the value of environment 
  13698.    variables. 
  13699.  
  13700.  environment variables  -Variables that describe the execution environment of a 
  13701.    process. These variables are named by the operating system or by the 
  13702.    application. Environment variables named by the operating system are PATH, 
  13703.    DPATH, INCLUDE, INIT, LIB, PROMPT, and TEMP. The values of environment 
  13704.    variables are defined by the user in the CONFIG.SYS file, or by using the 
  13705.    SET command at the OS/2 command prompt. 
  13706.  
  13707.  error message  -An indication that an error has been detected. (A)
  13708.  
  13709.  event semaphore  -A semaphore that enables a thread to signal a waiting thread 
  13710.    or threads that an event has occurred or that a task has been completed. The 
  13711.    waiting threads can then perform an action that is dependent on the 
  13712.    completion of the signaled event. 
  13713.  
  13714.  exception  -An abnormal condition such as an I/O error encountered in 
  13715.    processing a data set or a file. 
  13716.  
  13717.  exclusive system semaphore  -A system semaphore that can be modified only by 
  13718.    threads within the same process. 
  13719.  
  13720.  executable file  -(1) A file that contains programs or commands that perform 
  13721.    operations or actions to be taken. (2) A collection of related data records 
  13722.    that execute programs. 
  13723.  
  13724.  exit  -To execute an instruction within a portion of a computer program in 
  13725.    order to terminate the execution of that portion. Such portions of computer 
  13726.    programs include loops, subroutines, modules, and so on. (T)  Repeated exit 
  13727.    requests return the user to the point from which all functions provided to 
  13728.    the system are accessible. Contrast with cancel. 
  13729.  
  13730.  expanded memory specification (EMS)  -Enables DOS applications to access 
  13731.    memory above the 1MB real mode addressing limit. 
  13732.  
  13733.  extended attribute  -An additional piece of information about a file object, 
  13734.    such as its data format or category. It consists of a name and a value. A 
  13735.    file object may have more than one extended attribute associated with it. 
  13736.  
  13737.  extended help  -In SAA Common User Access architecture, a help action that 
  13738.    provides information about the contents of the application window from which 
  13739.    a user requested help. Contrast with contextual help. 
  13740.  
  13741.  extended-choice selection  -A mode that allows the user to select more than 
  13742.    one item from a window. Not all windows allow extended choice selection. 
  13743.    Contrast with multiple-choice selection. 
  13744.  
  13745.  extent  -Continuous space on a disk or diskette that is occupied by or 
  13746.    reserved for a particular data set, data space, or file. 
  13747.  
  13748.  external link  -In Information Presentation Facility, a link that connects 
  13749.    external online document files. 
  13750.  
  13751.  
  13752. ΓòÉΓòÉΓòÉ <hidden> Glossary - F ΓòÉΓòÉΓòÉ
  13753.  
  13754.  family-mode application  -An application program that can run in the OS/2 
  13755.    environment and in the DOS environment; however, it cannot take advantage of 
  13756.    many of the OS/2-mode facilities, such as multitasking, interprocess 
  13757.    communication, and dynamic linking. 
  13758.  
  13759.  FAT  -File allocation table. 
  13760.  
  13761.  FEA  -Full extended attribute. 
  13762.  
  13763.  field-level help  -Information specific to the field on which the cursor is 
  13764.    positioned. This help function is "contextual" because it provides 
  13765.    information about a specific item as it is currently used; the information 
  13766.    is dependent upon the context within the work session. 
  13767.  
  13768.  FIFO  -First-in-first-out. (A)
  13769.  
  13770.  file  -A named set of records stored or processed as a unit. (T)
  13771.  
  13772.  file allocation table (FAT)  -In IBM personal computers, a table used by the 
  13773.    operating system to allocate space on a disk for a file, and to locate and 
  13774.    chain together parts of the file that may be scattered on different sectors 
  13775.    so that the file can be used in a random or sequential manner. 
  13776.  
  13777.  file attribute  -Any of the attributes that describe the characteristics of a 
  13778.    file. 
  13779.  
  13780.  File Manager  -In the Presentation Manager, a program that displays 
  13781.    directories and files, and allows various actions on them. 
  13782.  
  13783.  file specification  -The full identifier for a file, which includes its drive 
  13784.    designation, path, file name, and extension. 
  13785.  
  13786.  file system  -The combination of software and hardware that supports storing 
  13787.    information on a storage device. 
  13788.  
  13789.  file system driver (FSD)  -A program that manages file I\O and controls the 
  13790.    format of information on the storage media. 
  13791.  
  13792.  fillet  -A curve that is tangential to the end points of two adjoining lines. 
  13793.    See also polyfillet. 
  13794.  
  13795.  filtering  -An application process that changes the order of data in a queue. 
  13796.  
  13797.  first-in-first-out (FIFO)  -A queuing technique in which the next item to be 
  13798.    retrieved is the item that has been in the queue for the longest time. (A)
  13799.  
  13800.  flag  -(1) An indicator or parameter that shows the setting of a switch. (2) A 
  13801.    character that signals the occurrence of some condition, such as the end of 
  13802.    a word. (A)  (3) (D of C) A characteristic of a file or directory that 
  13803.    enables it to be used in certain ways. See also archive flag, hidden flag, 
  13804.    and read-only flag. 
  13805.  
  13806.  focus  -See input focus. 
  13807.  
  13808.  folder  -A container used to organize objects. 
  13809.  
  13810.  font  -A particular size and style of typeface that contains definitions of 
  13811.    character sets, marker sets, and pattern sets. 
  13812.  
  13813.  Font Editor  -A utility program provided with the IBM Developers Toolkit that 
  13814.    enables the design and creation of new fonts. 
  13815.  
  13816.  foreground program  -(1) The program with which the user is currently 
  13817.    interacting. Also known as interactive program. Contrast with background 
  13818.    program. (2) (D of C) In multiprogramming,  a high-priority program. 
  13819.  
  13820.  frame  -The part of a window that can contain several different visual 
  13821.    elements specified by the application, but drawn and controlled by the 
  13822.    Presentation Manager. The frame encloses the client area. 
  13823.  
  13824.  frame styles  -Standard window layouts provided by the Presentation Manager. 
  13825.  
  13826.  FSD  -File system driver. 
  13827.  
  13828.  full-duplex  -Synonym for duplex. 
  13829.  
  13830.  full-screen application  -An application that has complete control of the 
  13831.    screen. 
  13832.  
  13833.  function  -(1) In a programming language, a block, with or without formal 
  13834.    parameters, whose execution is invoked by means of a call. (2) A set of 
  13835.    related control statements that cause one or more programs to be performed. 
  13836.  
  13837.  function key  -A key that causes a specified sequence of operations to be 
  13838.    performed when it is pressed, for example, F1 and Alt-K. 
  13839.  
  13840.  function key area  -The area at the bottom of a window that contains function 
  13841.    key assignments such as F1=Help. 
  13842.  
  13843.  
  13844. ΓòÉΓòÉΓòÉ <hidden> Glossary - G ΓòÉΓòÉΓòÉ
  13845.  
  13846.  GDT  -Global Descriptor Table. 
  13847.  
  13848.  general protection fault  -An exception condition that occurs when a process 
  13849.    attempts to use storage or a module that has some level of protection 
  13850.    assigned to it, such as I/O privilege level. See also IOPL code segment. 
  13851.  
  13852.  Global Descriptor Table (GDT)  -A table that defines code and data segments 
  13853.    available to all tasks in an application. 
  13854.  
  13855.  global dynamic-link module  -A dynamic-link module that can be shared by all 
  13856.    processes in the system that refer to the module name. 
  13857.  
  13858.  global file-name character  -Either a question mark (?) or an asterisk (*) 
  13859.    used as a variable in a file name or file name extension when referring to a 
  13860.    particular file or group of files. 
  13861.  
  13862.  glyph  -A graphic symbol whose appearance conveys information. 
  13863.  
  13864.  GPI  -Graphics programming interface. 
  13865.  
  13866.  graphic primitive  -In computer graphics, a basic element, such as an arc or a 
  13867.    line, that is not made up of smaller parts and that is used to create 
  13868.    diagrams and pictures. See also graphics segment. 
  13869.  
  13870.  graphics  -(1) A picture defined in terms of graphic primitives and graphics 
  13871.    attributes. (2) (D of C) The making of charts and pictures. (3) Pertaining 
  13872.    to charts, tables, and their creation. (4) See computer graphics, coordinate 
  13873.    graphics, fixed-image graphics, interactive graphics, passive graphics, 
  13874.    raster graphics. 
  13875.  
  13876.  graphics attributes  -Attributes that apply to graphic primitives. Examples 
  13877.    are color, line type, and shading-pattern definition. See also segment 
  13878.    attributes. 
  13879.  
  13880.  graphics field  -The clipping boundary that defines the visible part of the 
  13881.    presentation-page contents. 
  13882.  
  13883.  graphics mode  -One of several states of a display. The mode determines the 
  13884.    resolution and color content of the screen. 
  13885.  
  13886.  graphics model space  -The conceptual coordinate space in which a picture is 
  13887.    constructed after any model transforms have been applied. Also known as 
  13888.    model space. 
  13889.  
  13890.  Graphics programming interface  -The formally defined programming language 
  13891.    that is between an IBM graphics program and the user of the program. 
  13892.  
  13893.  graphics segment  -A sequence of related graphic primitives and graphics 
  13894.    attributes. See also graphic primitive. 
  13895.  
  13896.  graying  -The indication that a choice on a pull-down is unavailable. 
  13897.  
  13898.  group  -A collection of logically connected controls. For example, the buttons 
  13899.    controlling paper size for a printer could be called a group. See also 
  13900.    program group. 
  13901.  
  13902.  
  13903. ΓòÉΓòÉΓòÉ <hidden> Glossary - H ΓòÉΓòÉΓòÉ
  13904.  
  13905.  handle  -(1) An identifier that represents an object, such as a device or 
  13906.    window, to the Presentation Interface. (2) (D of C) In the Advanced DOS and 
  13907.    OS/2 operating systems, a binary value created by the system that identifies 
  13908.    a drive, directory, and file so that the file can be found and opened. 
  13909.  
  13910.  hard error  -An error condition on a network that requires either that the 
  13911.    system be reconfigured or that the source of the error be removed before the 
  13912.    system can resume reliable operation. 
  13913.  
  13914.  header  -(1) System-defined control information that precedes user data. (2) 
  13915.    The portion of a message that contains control information for the message, 
  13916.    such as one or more destination fields, name of the originating station, 
  13917.    input sequence number, character string indicating the type of message, and 
  13918.    priority level for the message. 
  13919.  
  13920.  heading tags  -A document element that enables information to be displayed in 
  13921.    windows, and that controls entries in the contents window controls placement 
  13922.    of push buttons in a window, and defines the shape and size of windows. 
  13923.  
  13924.  heap  -An area of free storage available for dynamic allocation by an 
  13925.    application. Its size varies according to the storage requirements of the 
  13926.    application. 
  13927.  
  13928.  help function  -(1) A function that provides information about a specific 
  13929.    field, an application panel, or information about the help facility. (2) (D 
  13930.    of C) One or more display images that describe how to use application 
  13931.    software or how to do a system operation. 
  13932.  
  13933.  Help index  -In SAA Common User Access architecture, a help action that 
  13934.    provides an index of the help information available for an application. 
  13935.  
  13936.  help panel  -A panel with information to assist users that is displayed in 
  13937.    response to a help request from the user. 
  13938.  
  13939.  help window  -A Common-User-Access-defined secondary window that displays 
  13940.    information when the user requests help. 
  13941.  
  13942.  hidden file  -An operating system file that is not displayed by a directory 
  13943.    listing. 
  13944.  
  13945.  hide button  -In the OS/2 operating system, a small, square button located in 
  13946.    the right-hand corner of the title bar of a window that, when selected, 
  13947.    removes from the screen all the windows associated with that window. 
  13948.    Contrast with maximize button. See also restore button. 
  13949.  
  13950.  hierarchical inheritance  -The relationship between parent and child classes. 
  13951.    An object that is lower in the inheritance hierarchy than another object, 
  13952.    inherits all the characteristics and behaviors of the objects above it in 
  13953.    the hierarchy. 
  13954.  
  13955.  hierarchy  -A tree of segments beginning with the root segment and proceeding 
  13956.    downward to dependent segment types. 
  13957.  
  13958.  high-performance file system (HPFS)  -In the OS/2 operating system, an 
  13959.    installable file system that uses high-speed buffer storage, known as a 
  13960.    cache, to provide fast access to large disk volumes. The file system also 
  13961.    supports the coexistence of multiple, active file systems on a single 
  13962.    personal computer, with the capability of multiple and different storage 
  13963.    devices. File names used with the HPFS can have as many as 254 characters. 
  13964.  
  13965.  hit testing  -The means of identifying which window is associated with which 
  13966.    input device event. 
  13967.  
  13968.  hook  -A point in a system-defined function where an application can supply 
  13969.    additional code that the system processes as though it were part of the 
  13970.    function. 
  13971.  
  13972.  hook chain  -A sequence of hook procedures that are "chained" together so that 
  13973.    each event is passed, in turn, to each procedure in the chain. 
  13974.  
  13975.  hot spot  -The part of the pointer that must touch an object before it can be 
  13976.    selected. This is usually the tip of the pointer. Contrast with action 
  13977.    point. 
  13978.  
  13979.  HPFS  -high-performance file system. 
  13980.  
  13981.  hypergraphic link  -A connection between one piece of information and another 
  13982.    through the use of graphics. 
  13983.  
  13984.  hypertext  -A way of presenting information online with connections between 
  13985.    one piece of information and another, called hypertext links. See also 
  13986.    hypertext link. 
  13987.  
  13988.  hypertext link  -A connection between one piece of information and another. 
  13989.  
  13990.  
  13991. ΓòÉΓòÉΓòÉ <hidden> Glossary - I ΓòÉΓòÉΓòÉ
  13992.  
  13993.  I/O operation  -An input operation to, or output operation from a device 
  13994.    attached to a computer. 
  13995.  
  13996.  I-beam pointer  -A pointer that indicates an area, such as an entry field in 
  13997.    which text can be edited. 
  13998.  
  13999.  icon  -In SAA Advanced Common User Access architecture, a graphical 
  14000.    representation of an object, consisting of an image, image background, and a 
  14001.    label. Icons can represent items (such as a document file) that the user 
  14002.    wants to work on, and actions that the user wants to perform. In the 
  14003.    Presentation Manager, icons are used for data objects, system actions, and 
  14004.    minimized programs. 
  14005.  
  14006.  icon area  -In the Presentation Manager, the area at the bottom of the screen 
  14007.    that is normally used to display the icons for minimized programs. 
  14008.  
  14009.  Icon Editor  -The Presentation Manager-provided tool for creating icons. 
  14010.  
  14011.  IDL  -Interface Definition Language. 
  14012.  
  14013.  image font  -A set of symbols, each of which is described in a rectangular 
  14014.    array of pels. Some of the pels in the array are set to produce the image of 
  14015.    one of the symbols. Contrast with outline font. 
  14016.  
  14017.  implied metaclass  -Subclassing the metaclass of a parent class without a 
  14018.    separate CSC for the resultant metaclass. 
  14019.  
  14020.  indirect manipulation  -Interaction with an object through choices and 
  14021.    controls. 
  14022.  
  14023.  information device context  -A logical description of a data destination other 
  14024.    than the screen (for example, a printer or plotter), but where no output 
  14025.    will occur. Its purpose is to satisfy queries. See also device context. 
  14026.  
  14027.  information panel  -A defined panel type characterized by a body containing 
  14028.    only protected information. 
  14029.  
  14030.  Information Presentation Facility (IPF)  -A facility provided by the OS/2 
  14031.    operating system, by which application developers can produce online 
  14032.    documentation and context-sensitive online help panels for their 
  14033.    applications. 
  14034.  
  14035.  inheritance  -The derivation of new (child) classes from existing (parent) 
  14036.    classes. The new class inherits all the data and methods of the parent class 
  14037.    without having to redefine them. 
  14038.  
  14039.  input focus  -(1) The area of a window where user interaction is possible 
  14040.    using an input device, such as a mouse or the keyboard. (2) The position in 
  14041.    the active window where a user's normal interaction with the keyboard will 
  14042.    appear. 
  14043.  
  14044.  input router  -An internal OS/2 process that removes messages from the system 
  14045.    queue. 
  14046.  
  14047.  input/output control  -A device-specific command that requests a function of a 
  14048.    device driver. 
  14049.  
  14050.  installable file system (IFS)  -A file system in which software is installed 
  14051.    when the operating system is started. 
  14052.  
  14053.  instance  -A single occurrence of an object class that has a particular 
  14054.    behavior. 
  14055.  
  14056.  instruction pointer  -In System/38, a pointer that provides addressability for 
  14057.    a machine interface instruction in a program. 
  14058.  
  14059.  integer atom  -An atom that represents a predefined system constant and 
  14060.    carries no storage overhead. For example, names of window classes provided 
  14061.    by Presentation Manager are expressed as integer atoms. 
  14062.  
  14063.  interactive graphics  -Graphics that can be moved or manipulated by a user at 
  14064.    a terminal. 
  14065.  
  14066.  interactive program  -(1) A program that is running (active) and is ready to 
  14067.    receive (or is receiving) input from a user. (2) A running program that can 
  14068.    receive input from the keyboard or another input device. Compare with active 
  14069.    program and contrast with noninteractive program. 
  14070.  
  14071.    Also known as a foreground program. 
  14072.  
  14073.  interchange file  -A file containing data that can be sent from one 
  14074.    Presentation Manager interface application to another. 
  14075.  
  14076.  Interface Definition Language (IDL)  -Language-neutral interface specification 
  14077.    for a SOM class. 
  14078.  
  14079.  interpreter  -A program that translates and executes each instruction of a 
  14080.    high-level programming language before it translates and executes. 
  14081.  
  14082.  interprocess communication (IPC)  -In the OS/2 operating system, the exchange 
  14083.    of information between processes or threads through semaphores, pipes, 
  14084.    queues, and shared memory. 
  14085.  
  14086.  interval timer  -(1) A timer that provides program interruptions on a 
  14087.    program-controlled basis. (2) An electronic counter that counts intervals of 
  14088.    time under program control. 
  14089.  
  14090.  IOCtl  -Input/output control. 
  14091.  
  14092.  IOPL  -Input/output privilege level. 
  14093.  
  14094.  IOPL code segment  -An IOPL executable section of programming code that 
  14095.    enables an application to directly manipulate hardware interrupts and ports 
  14096.    without replacing the device driver. See also privilege level. 
  14097.  
  14098.  IPC  -Interprocess communication. 
  14099.  
  14100.  IPF  -Information Presentation Facility. 
  14101.  
  14102.  IPF compiler  -A text compiler that interpret tags in a source file and 
  14103.    converts the information into the specified format. 
  14104.  
  14105.  IPF tag language  -A markup language that provides the instructions for 
  14106.    displaying online information. 
  14107.  
  14108.  item  -A data object that can be passed in a DDE transaction. 
  14109.  
  14110.  
  14111. ΓòÉΓòÉΓòÉ <hidden> Glossary - J ΓòÉΓòÉΓòÉ
  14112.  
  14113.  journal  -A special-purpose file that is used to record changes made in the 
  14114.    system. 
  14115.  
  14116.  
  14117. ΓòÉΓòÉΓòÉ <hidden> Glossary - K ΓòÉΓòÉΓòÉ
  14118.  
  14119.  Kanji  -A graphic character set used in Japanese ideographic alphabets. 
  14120.  
  14121.  KBD$  -Character-device name reserved for the keyboard. 
  14122.  
  14123.  kernel  -The part of an operating system that performs basic functions, such 
  14124.    as allocating hardware resources. 
  14125.  
  14126.  kerning  -The design of graphics characters so that their character boxes 
  14127.    overlap. Used to space text proportionally. 
  14128.  
  14129.  keyboard accelerator  -A keystroke that generates a command message for an 
  14130.    application. 
  14131.  
  14132.  keyboard augmentation  -A function that enables a user to press a keyboard key 
  14133.    while pressing a mouse button. 
  14134.  
  14135.  keyboard focus  -A temporary attribute of a window. The window that has a 
  14136.    keyboard focus receives all keyboard input until the focus changes to a 
  14137.    different window. 
  14138.  
  14139.  Keys help  -In SAA Common User Access architecture, a help action that 
  14140.    provides a listing of the application keys and their assigned functions. 
  14141.  
  14142.  
  14143. ΓòÉΓòÉΓòÉ <hidden> Glossary - L ΓòÉΓòÉΓòÉ
  14144.  
  14145.  label  -In a graphics segment, an identifier of one or more elements that is 
  14146.    used when editing the segment. 
  14147.  
  14148.  LAN  -local area network. 
  14149.  
  14150.  language support procedure  -A function provided by the Presentation Manager 
  14151.    Interface for applications that do not, or cannot (as in the case of COBOL 
  14152.    and FORTRAN programs), provide their own dialog or window procedures. 
  14153.  
  14154.  lazy drag  -See pickup and drop. 
  14155.  
  14156.  lazy drag set  -See pickup set. 
  14157.  
  14158.  LDT  -In the OS/2 operating system, Local Descriptor Table. 
  14159.  
  14160.  LIFO stack  -A stack from which data is retrieved in last-in, first-out order. 
  14161.  
  14162.  linear address  -A unique value that identifies the memory object. 
  14163.  
  14164.  linked list  -Synonym for chained list. 
  14165.  
  14166.  list box  -In SAA Advanced Common User Access architecture, a control that 
  14167.    contains scrollable choices from which a user can select one choice. 
  14168.  
  14169.    Note:  In CUA architecture, this is a programmer term. The end user term is 
  14170.    selection list. 
  14171.  
  14172.  list button  -A button labeled with an underlined down-arrow that presents a 
  14173.    list of valid objects or choices that can be selected for that field. 
  14174.  
  14175.  list panel  -A defined panel type that displays a list of items from which 
  14176.    users can select one or more choices and then specify one or more actions to 
  14177.    work on those choices. 
  14178.  
  14179.  load time  -The point in time at which a program module is loaded into main 
  14180.    storage for execution. 
  14181.  
  14182.  load-on-call  -A function of a linkage editor that allows selected segments of 
  14183.    the module to be disk resident while other segments are executing. Disk 
  14184.    resident segments are loaded for execution and given control when any entry 
  14185.    point that they contain is called. 
  14186.  
  14187.  local area network (LAN)  -(1) A computer network located on a user's premises 
  14188.    within a limited geographical area. Communication within a local area 
  14189.    network is not subject to external regulations;  however, communication 
  14190.    across the LAN boundary may be subject to some form of regulation. (T)
  14191.  
  14192.    Note:  A LAN does not use store and forward techniques. (2) A network 
  14193.    inwhich a set of devices are connected to one another for communication and 
  14194.    that can be connected to a larger network. 
  14195.  
  14196.  Local Descriptor Table (LDT)  -Defines code and data segments specific to a 
  14197.    single task. 
  14198.  
  14199.  lock  -A serialization mechanism by means of which a resource is restricted 
  14200.    for use by the holder of the lock. 
  14201.  
  14202.  logical storage device  -A device that the user can map to a physical (actual) 
  14203.    device. 
  14204.  
  14205.  LPT1, LPT2, LPT3  -Character-device names reserved for parallel printers 1 
  14206.    through 3. 
  14207.  
  14208.  
  14209. ΓòÉΓòÉΓòÉ <hidden> Glossary - M ΓòÉΓòÉΓòÉ
  14210.  
  14211.  main window  -The window that is positioned relative to the desktop window. 
  14212.  
  14213.  manipulation button  -The button on a pointing device a user presses to 
  14214.    directly manipulate an object. 
  14215.  
  14216.  map  -(1) A set of values having a defined correspondence with the quantities 
  14217.    or values of another set. (I)  (A)  (2) To establish a set of values having 
  14218.    a defined correspondence with the quantities or values of another set. (I)
  14219.  
  14220.  marker box  -In computer graphics, the boundary that defines, in world 
  14221.    coordinates, the horizontal and vertical space occupied by a single marker 
  14222.    from a marker set. 
  14223.  
  14224.  marker symbol  -A symbol centered on a point. Graphs and charts can use marker 
  14225.    symbols to indicate the plotted points. 
  14226.  
  14227.  marquee box  -The rectangle that appears during a selection technique in which 
  14228.    a user selects objects by drawing a box around them with a pointing device. 
  14229.  
  14230.  Master Help Index  -In the OS/2 operating system, an alphabetic list of help 
  14231.    topics related to using the operating system. 
  14232.  
  14233.  maximize  -To enlarge a window to its largest possible size. 
  14234.  
  14235.  media window  -The part of the physical device (display, printer, or plotter) 
  14236.    on which a picture is presented. 
  14237.  
  14238.  memory block  -Part memory within a heap. 
  14239.  
  14240.  memory device context  -A logical description of a data destination that is a 
  14241.    memory bit map. See also device context. 
  14242.  
  14243.  memory management  -A feature of the operating system for allocating, sharing, 
  14244.    and freeing main storage. 
  14245.  
  14246.  memory object  -Logical unit of memory requested by an application, which 
  14247.    forms the granular unit of memory manipulation from the application 
  14248.    viewpoint. 
  14249.  
  14250.  menu  -In SAA Advanced Common User Access architecture, an extension of the 
  14251.    menu bar that displays a list of choices available for a selected choice in 
  14252.    the menu bar. After a user selects a choice in menu bar, the corresponding 
  14253.    menu appears. Additional pop-up windows can appear from menu choices. 
  14254.  
  14255.  menu bar  -In SAA Advanced Common User Access architecture, the area near the 
  14256.    top of a window, below the title bar and above the rest of the window, that 
  14257.    contains choices that provide access to other menus. 
  14258.  
  14259.  menu button  -The button on a pointing device that a user presses to view a 
  14260.    pop-up menu associated with an object. 
  14261.  
  14262.  message  -(1) In the Presentation Manager, a packet of data used for 
  14263.    communication between the Presentation Manager interface and Presentation 
  14264.    Manager applications (2) In a user interface, information not requested by 
  14265.    users but presented to users by the computer in response to a user action or 
  14266.    internal process. 
  14267.  
  14268.  message box  -(1) A dialog window predefined by the system and used as a 
  14269.    simple interface for applications, without the necessity of creating 
  14270.    dialog-template resources or dialog procedures. (2) (D of C) In SAA Advanced 
  14271.    Common User Access architecture, a type of window that shows messages to 
  14272.    users. See also dialog box, primary window, secondary window. 
  14273.  
  14274.  message filter  -The means of selecting which messages from a specific window 
  14275.    will be handled by the application. 
  14276.  
  14277.  message queue  -A sequenced collection of messages to be read by the 
  14278.    application. 
  14279.  
  14280.  message stream mode  -A method of operation in which data is treated as a 
  14281.    stream of messages.  Contrast with  byte stream. 
  14282.  
  14283.  metacharacter  -See global file-name character. 
  14284.  
  14285.  metaclass  -The conjunction of an object and its class information; that is, 
  14286.    the information pertaining to the class as a whole, rather than to a single 
  14287.    instance of the class. Each class is itself an object, which is an instance 
  14288.    of the metaclass. 
  14289.  
  14290.  metafile  -A file containing a series of attributes that set color, shape and 
  14291.    size, usually of a picture or a drawing. Using a program that can interpret 
  14292.    these attributes, a user can view the assembled image. 
  14293.  
  14294.  metafile device context  -A logical description of a data destination that is 
  14295.    a metafile, which is used for graphics interchange. See also device context. 
  14296.  
  14297.  metalanguage  -A language used to specify another language. For example, data 
  14298.    types can be described using a metalanguage so as to make the descriptions 
  14299.    independent of any one computer language. 
  14300.  
  14301.  method  -A function that defines a behavior for a class or object. 
  14302.  
  14303.  method override  -The replacement, by a child class, of the implementation of 
  14304.    a method inherited from a parent and an ancestor class. 
  14305.  
  14306.  mickey  -A unit of measurement for physical mouse motion whose value depends 
  14307.    on the mouse device driver currently loaded. 
  14308.  
  14309.  micro presentation space  -A graphics presentation space in which a restricted 
  14310.    set of the GPI function calls is available. 
  14311.  
  14312.  minimize  -To remove from the screen all windows associated with an 
  14313.    application and replace them with an icon that represents the application. 
  14314.  
  14315.  mix  -An attribute that determines how the foreground of a graphic primitive 
  14316.    is combined with the existing color of graphics output. Also known as 
  14317.    foreground mix. Contrast with background mix. 
  14318.  
  14319.  mixed character string  -A string containing a mixture of one-byte and Kanji 
  14320.    or Hangeul (two-byte) characters. 
  14321.  
  14322.  mnemonic  -(1) A method of selecting an item on a pull-down by means of typing 
  14323.    the highlighted letter in the menu item. (2) (D of C) In SAA Advanced Common 
  14324.    User Access architecture, usually a single character, within the text of a 
  14325.    choice, identified by an underscore beneath the character. If all characters 
  14326.    in a choice already serve as mnemonics for other choices, another character, 
  14327.    placed in parentheses immediately following the choice, can be used. When a 
  14328.    user types the mnemonic for a choice, the choice is either selected or the 
  14329.    cursor is moved to that choice. 
  14330.  
  14331.  modal dialog box  -In SAA Advanced Common User Access architecture, a type of 
  14332.    movable window, fixed in size, that requires a user to enter information 
  14333.    before continuing to work in the application window from which it was 
  14334.    displayed. Contrast with modeless dialog box. Also known as a serial dialog 
  14335.    box. Contrast with parallel dialog box. 
  14336.  
  14337.    Note:  In CUA architecture, this is a programmer term. The end user term is 
  14338.    pop-up window. 
  14339.  
  14340.  model space  -See graphics model space. 
  14341.  
  14342.  modeless dialog box  -In SAA Advanced Common User Access architecture, a type 
  14343.    of movable window, fixed in size, that allows users to continue their dialog 
  14344.    with the application without entering information in the dialog box. Also 
  14345.    known as a parallel dialog box. Contrast with modal dialog box. 
  14346.  
  14347.    Note:  In CUA architecture, this is a programmer term. The end user term is 
  14348.    pop-up window. 
  14349.  
  14350.  module definition file  -A file that describes the code segments within a load 
  14351.    module. For example, it indicates whether a code segment is loadable before 
  14352.    module execution begins (preload), or loadable only when referred to at run 
  14353.    time (load-on-call). 
  14354.  
  14355.  mouse  -In SAA usage, a device that a user moves on a flat surface to position 
  14356.    a pointer on the screen. It allows a user to select a choice o function to 
  14357.    be performed or to perform operations on the screen, such as dragging or 
  14358.    drawing lines from one position to another. 
  14359.  
  14360.  MOUSE$  -Character-device name reserved for a mouse. 
  14361.  
  14362.  multiple-choice selection  -In SAA Basic Common User Access architecture, a 
  14363.    type of field from which a user can select one or more choices or select 
  14364.    none. See also check box. Contrast with extended-choice selection. 
  14365.  
  14366.  multiple-line entry field  -In SAA Advanced Common User Access architecture, a 
  14367.    control into which a user types more than one line of information. See also 
  14368.    single-line entry field. 
  14369.  
  14370.  multitasking  -The concurrent processing of applications or parts of 
  14371.    applications. A running application and its data are protected from other 
  14372.    concurrently running applications. 
  14373.  
  14374.  mutex semaphore  -(Mutual exclusion semaphore). A semaphore that enables 
  14375.    threads to serialize their access to resources. Only the thread that 
  14376.    currently owns the mutex semaphore can gain access to the resource, thus 
  14377.    preventing one thread from interrupting operations being performed by 
  14378.    another. 
  14379.  
  14380.  muxwait semaphore  -(Multiple wait semaphore). A semaphore that enables a 
  14381.    thread to wait either for multiple event semaphores to be posted or for 
  14382.    multiple mutex semaphores to be released. Alternatively, a muxwait semaphore 
  14383.    can be set to enable a thread to wait for any ONE of the event or mutex 
  14384.    semaphores in the muxwait semaphore's list to be posted or released. 
  14385.  
  14386.  
  14387. ΓòÉΓòÉΓòÉ <hidden> Glossary - N ΓòÉΓòÉΓòÉ
  14388.  
  14389.  named pipe  -A named buffer that provides client-to-server, server-to-client, 
  14390.    or full duplex communication between unrelated processes. Contrast with 
  14391.    unnamed pipe. 
  14392.  
  14393.  national language support (NLS)  -The modification or conversion of a United 
  14394.    States English product to conform to the requirements of another language or 
  14395.    country. This can include the enabling or retrofitting of a product and the 
  14396.    translation of nomenclature, MRI, or documentation of a product. 
  14397.  
  14398.  nested list  -A list that is contained within another list. 
  14399.  
  14400.  NLS  -national language support. 
  14401.  
  14402.  non-8.3 file-name format  -A file-naming convention in which file names can 
  14403.    consist of up to 255 characters. See also 8.3 file-name format. 
  14404.  
  14405.  noncritical extended attribute  -An extended attribute that is not necessary 
  14406.    for the function of an application. 
  14407.  
  14408.  nondestructive read  -Reading that does not erase the data in the source 
  14409.    location. (T)
  14410.  
  14411.  noninteractive program  -A running program that cannot receive input from the 
  14412.    keyboard or other input device. Compare with active program, and contrast 
  14413.    with interactive program. 
  14414.  
  14415.  nonretained graphics  -Graphic primitives that are not remembered by the 
  14416.    Presentation Manager interface when they have been drawn. Contrast with 
  14417.    retained graphics. 
  14418.  
  14419.  null character (NUL)  -(1) Character-device name reserved for a nonexistent 
  14420.    (dummy) device. (2) (D of C) A control character that is used to accomplish 
  14421.    media-fill or time-fill and that may be inserted into or removed from a 
  14422.    sequence of characters without affecting the meaning of the sequence; 
  14423.    however, the control of equipment or the format may be affected by this 
  14424.    character. (I)  (A)
  14425.  
  14426.  null-terminated string  -A string of (n+1) characters where the (n+1)th 
  14427.    character is the 'null' character (0x00) Also known as 'zero-terminated' 
  14428.    string and 'ASCIIZ' string. 
  14429.  
  14430.  
  14431. ΓòÉΓòÉΓòÉ <hidden> Glossary - O ΓòÉΓòÉΓòÉ
  14432.  
  14433.  object  -A set of data and actions that can be performed on that data. 
  14434.  
  14435.  Object Interface Definition Language (OIDL)  -Specification language used in 
  14436.    SOM Version 1 for defining classes. Replaced by Interface Definition 
  14437.    Language (IDL). 
  14438.  
  14439.  object window  -A window that does not have a parent but which might have 
  14440.    child windows. An object window cannot be presented on a device. 
  14441.  
  14442.  OIDL  -Object Interface Definition Language. 
  14443.  
  14444.  open  -To start working with a file, directory, or other object. 
  14445.  
  14446.  ordered list  -Vertical arrangements of items, with each item in the list 
  14447.    preceded by a number or letter. 
  14448.  
  14449.  outline font  -A set of symbols, each of which is created as a series of lines 
  14450.    and curves.  Synonymous with vector font. Contrast with image font. 
  14451.  
  14452.  output area  -An area of storage reserved for output. (A)
  14453.  
  14454.  owner window  -A window into which specific events that occur in another 
  14455.    (owned) window are reported. 
  14456.  
  14457.  ownership  -The determination of how windows communicate using messages. 
  14458.  
  14459.  owning process  -The process that owns the resources that might be shared with 
  14460.    other processes. 
  14461.  
  14462.  
  14463. ΓòÉΓòÉΓòÉ <hidden> Glossary - P ΓòÉΓòÉΓòÉ
  14464.  
  14465.  page  -(1) A 4KB segment of contiguous physical memory. (2) (D of C) A defined 
  14466.    unit of space on a storage medium. 
  14467.  
  14468.  page viewport  -A boundary in device coordinates that defines the area of the 
  14469.    output device in which graphics are to be displayed. The presentation-page 
  14470.    contents are transformed automatically to the page viewport in device space. 
  14471.  
  14472.  paint  -(1) The action of drawing or redrawing the contents of a window. (2) 
  14473.    In computer graphics, to shade an area of a display image;  for example, 
  14474.    with crosshatching or color. 
  14475.  
  14476.  panel  -In SAA Basic Common User Access architecture, a particular arrangement 
  14477.    of information that is presented in a window or pop-up. If some of the 
  14478.    information is not visible, a user can scroll through the information. 
  14479.  
  14480.  panel area  -An area within a panel that contains related information. The 
  14481.    three major Common User Access-defined panel areas are the action bar, the 
  14482.    function key area, and the panel body. 
  14483.  
  14484.  panel area separator  -In SAA Basic Common User Access architecture, a solid, 
  14485.    dashed, or blank line that provides a visual distinction between two 
  14486.    adjacent areas of a panel. 
  14487.  
  14488.  panel body  -The portion of a panel not occupied by the action bar, function 
  14489.    key area, title or scroll bars. The panel body can contain protected 
  14490.    information, selection fields, and entry fields. The layout and content of 
  14491.    the panel body determine the panel type. 
  14492.  
  14493.  panel body area  -See client area. 
  14494.  
  14495.  panel definition  -A description of the contents and characteristics of a 
  14496.    panel. A panel definition is the application developer's mechanism for 
  14497.    predefining the format to be presented to users in a window. 
  14498.  
  14499.  panel ID  -In SAA Basic Common User Access architecture, a panel identifier, 
  14500.    located in the upper-left corner of a panel.  A user can choose whether to 
  14501.    display the panel ID. 
  14502.  
  14503.  panel title  -In SAA Basic Common User Access architecture, a particular 
  14504.    arrangement of information that is presented in a window or pop-up. If some 
  14505.    of the information is not visible, a user can scroll through the 
  14506.    information. 
  14507.  
  14508.  paper size  -The size of paper, defined in either standard U.S. or European 
  14509.    names (for example, A, B, A4), and measured in inches or millimeters 
  14510.    respectively. 
  14511.  
  14512.  parallel dialog box  -See modeless dialog box. 
  14513.  
  14514.  parameter list  -A list of values that provides a means of associating 
  14515.    addressability of data defined in a called program with data in the calling 
  14516.    program. It contains parameter names and the order in which they are to be 
  14517.    associated in the calling and called program. 
  14518.  
  14519.  parent process  -In the OS/2 operating system, a process that creates other 
  14520.    processes. Contrast with child process. 
  14521.  
  14522.  parent window  -In the OS/2 operating system, a window that creates a child 
  14523.    window. The child window is drawn within the parent window. If the parent 
  14524.    window is moved, resized, or destroyed, the child window also will be moved, 
  14525.    resized, or destroyed. However, the child window can be moved and resized 
  14526.    independently from the parent window, within the boundaries of the parent 
  14527.    window. Contrast with child window. 
  14528.  
  14529.  partition  -(1) A fixed-size division of storage. (2) On an IBM personal 
  14530.    computer fixed disk, one of four possible storage areas of variable size; 
  14531.    one may be accessed by DOS, and each of the others may be assigned to 
  14532.    another operating system. 
  14533.  
  14534.  Paste  -A choice in the Edit pull-down that a user selects to move the 
  14535.    contents of the clipboard into a preselected location. See also Copy and 
  14536.    Cut. 
  14537.  
  14538.  path  -The route used to locate files; the storage location of a file. A fully 
  14539.    qualified path lists the drive identifier, directory name, subdirectory name 
  14540.    (if any), and file name with the associated extension. 
  14541.  
  14542.  PDD  -Physical device driver. 
  14543.  
  14544.  peeking  -An action taken by any thread in the process that owns the queue to 
  14545.    examine queue elements without removing them. 
  14546.  
  14547.  pel  -(1) The smallest area of a display screen capable of being addressed and 
  14548.    switched between visible and invisible states. Synonym for display point, 
  14549.    pixel, and picture element. (2) (D of C) Picture element. 
  14550.  
  14551.  persistent object  -An object whose instance data and state are preserved 
  14552.    between system shutdown and system startup. 
  14553.  
  14554.  physical device driver (PDD)  -A system interface that handles hardware 
  14555.    interrupts and supports a set of input and output functions. 
  14556.  
  14557.  pick  -To select part of a displayed object using the pointer. 
  14558.  
  14559.  pickup  -To add an object or set of objects to the pickup set. 
  14560.  
  14561.  pickup and drop  -A drag operation that does not require the direct 
  14562.    manipulation button to be pressed for the duration of the drag. 
  14563.  
  14564.  pickup set  -The set of objects that have been picked up as part of a pickup 
  14565.    and drop operation. 
  14566.  
  14567.  picture chain  -See segment chain. 
  14568.  
  14569.  picture element  -(1) Synonym for pel. (2) (D of C) In computer graphics, the 
  14570.    smallest element of a display surface that can be independently assigned 
  14571.    color and intensity. (T)  . (3) The area of the finest detail that can be 
  14572.    reproduced effectively on the recording medium. 
  14573.  
  14574.  PID  -Process identification. 
  14575.  
  14576.  pipe  -(1) A named or unnamed buffer used to pass data between processes. A 
  14577.    process reads from or writes to a pipe as if the pipe were a standard-input 
  14578.    or standard-output file. See also named pipe and unnamed pipe. (2) (D of C) 
  14579.    To direct data so that the output from one process becomes the input to 
  14580.    another process. The standard output of one command can be connected to the 
  14581.    standard input of another with the pipe operator (|). 
  14582.  
  14583.  pixel  -(1) Synonym for pel. (2) (D of C) Picture element. 
  14584.  
  14585.  plotter  -An output unit that directly produces a hardcopy record of data on a 
  14586.    removable medium, in the form of a two-dimensional graphic representation. (T)
  14587.  
  14588.  PM  -Presentation Manager. 
  14589.  
  14590.  pointer  -(1) The symbol displayed on the screen that is moved by a pointing 
  14591.    device, such as a mouse. The pointer is used to point at items that users 
  14592.    can select. Contrast with cursor. (2) A data element that indicates the 
  14593.    location of another data element. (T)
  14594.  
  14595.  POINTER$  -Character-device name reserved for a pointer device (mouse screen 
  14596.    support). 
  14597.  
  14598.  pointing device  -In SAA Advanced Common User Access architecture, an 
  14599.    instrument, such as a mouse, trackball, or joystick, used to move a pointer 
  14600.    on the screen. 
  14601.  
  14602.  pointings  -Pairs of x-y coordinates produced by an operator defining 
  14603.    positions on a screen with a pointing device, such as a mouse. 
  14604.  
  14605.  polyfillet  -A curve based on a sequence of lines. The curve is tangential to 
  14606.    the end points of the first and last lines, and tangential also to the 
  14607.    midpoints of all other lines. See also fillet. 
  14608.  
  14609.  polygon  -One or more closed figures that can be drawn filled, outlined, or 
  14610.    filled and outlined. 
  14611.  
  14612.  polyline  -A sequence of adjoining lines. 
  14613.  
  14614.  polymorphism  -The ability to have different implementations of the same 
  14615.    method for two or more classes of objects. 
  14616.  
  14617.  pop  -To retrieve an item from a last-in-first-out stack of items. Contrast 
  14618.    with push. 
  14619.  
  14620.  pop-up menu  -A menu that lists the actions that a user can perform on an 
  14621.    object. The contents of the pop-up menu can vary depending on the context, 
  14622.    or state, of the object. 
  14623.  
  14624.  pop-up window  -(1) A window that appears on top of another window in a 
  14625.    dialog. Each pop-up window must be completed before returning to the 
  14626.    underlying window. (2) (D of C) In SAA Advanced Common User Access 
  14627.    architecture, a movable window, fixed in size, in which a user provides 
  14628.    information required by an application so that it can continue to process a 
  14629.    user request. 
  14630.  
  14631.  presentation drivers  -Special purpose I/O routines that handle field 
  14632.    device-independent I/O requests from the PM and its applications. 
  14633.  
  14634.  Presentation Manager (PM)  -The interface of the OS/2 operating system that 
  14635.    presents, in windows a graphics-based interface to applications and files 
  14636.    installed and running under the OS/2 operating system. 
  14637.  
  14638.  presentation page  -The coordinate space in which a picture is assembled for 
  14639.    display. 
  14640.  
  14641.  presentation space (PS)  -(1) Contains the device-independent definition of a 
  14642.    picture. (2) (D of C) The display space on a display device. 
  14643.  
  14644.  primary window  -In SAA Common User Access architecture, the window in which 
  14645.    the main interaction between the user and the application takes place. In a 
  14646.    multiprogramming environment, each application starts in its own primary 
  14647.    window. The primary window remains for the duration of the application, 
  14648.    although the panel displayed will change as the user's dialog moves forward. 
  14649.    See also secondary window. 
  14650.  
  14651.  primitive  -In computer graphics, one of several simple functions for drawing 
  14652.    on the screen, including, for example, the rectangle, line, ellipse, 
  14653.    polygon, and so on. 
  14654.  
  14655.  primitive attribute  -A specifiable characteristic of a graphic primitive. See 
  14656.    graphics attributes. 
  14657.  
  14658.  print job  -The result of sending a document or picture to be printed. 
  14659.  
  14660.  Print Manager  -In the Presentation Manager, the part of the spooler that 
  14661.    manages the spooling process. It also allows users to view print queues and 
  14662.    to manipulate print jobs. 
  14663.  
  14664.  privilege level  -A protection level imposed by the hardware architecture of 
  14665.    the IBM personal computer.  There are four privilege levels (number 0 
  14666.    through 3).  Only certain types of programs are allowed to execute at each 
  14667.    privilege level.  See also IOPL code segment. 
  14668.  
  14669.  procedure call  -In programming languages, a language construct for invoking 
  14670.    execution of a procedure. 
  14671.  
  14672.  process  -An instance of an executing application and the resources it is 
  14673.    using. 
  14674.  
  14675.  program  -A sequence of instructions that a computer can interpret and 
  14676.    execute. 
  14677.  
  14678.  program details  -Information about a program that is specified in the Program 
  14679.    Manager window and is used when the program is started. 
  14680.  
  14681.  program group  -In the Presentation Manager, several programs that can be 
  14682.    acted upon as a single entity. 
  14683.  
  14684.  program name  -The full file specification of a program. Contrast with program 
  14685.    title. 
  14686.  
  14687.  program title  -The name of a program as it is listed in the Program Manager 
  14688.    window. Contrast with program name. 
  14689.  
  14690.  prompt  -A displayed symbol or message that requests input from the user or 
  14691.    gives operational information; for example, on the display screen of an IBM 
  14692.    personal computer, the DOS A> prompt. The user must respond to the prompt in 
  14693.    order to proceed. 
  14694.  
  14695.  protect mode  -A method of program operation that limits or prevents access to 
  14696.    certain instructions or areas of storage. Contrast with real mode. 
  14697.  
  14698.  protocol  -A set of semantic and syntactic rules that determines the behavior 
  14699.    of functional units in achieving communication. (I)
  14700.  
  14701.  pseudocode  -An artificial language used to describe computer program 
  14702.    algorithms without using the syntax of any particular programming language. (A)
  14703.  
  14704.  pull-down  -(1) An action bar extension that displays a list of choices 
  14705.    available for a selected action bar choice. After users select an action bar 
  14706.    choice, the pull-down appears with the list of choices. Additional pop-up 
  14707.    windows may appear from pull-down choices to further extend the actions 
  14708.    available to users. (2) (D of C) In SAA Common User Access architecture, 
  14709.    pertaining to a choice in an action bar pull-down. 
  14710.  
  14711.  push  -To add an item to a last-in-first-out stack of items. Contrast with 
  14712.    pop. 
  14713.  
  14714.  push button  -In SAA Advanced Common User Access architecture, a rectangle 
  14715.    with text inside. Push buttons are used in windows for actions that occur 
  14716.    immediately when the push button is selected. 
  14717.  
  14718.  putback  -To remove an object or set of objects from the lazy drag set. This 
  14719.    has the effect of undoing the pickup operation for those objects 
  14720.  
  14721.  putdown  -To drop the objects in the lazy drag set on the target object. 
  14722.  
  14723.  
  14724. ΓòÉΓòÉΓòÉ <hidden> Glossary - Q ΓòÉΓòÉΓòÉ
  14725.  
  14726.  queue  -(1) A linked list of elements waiting to be processed in FIFO order. 
  14727.    For example, a queue may be a list of print jobs waiting to be printed. (2) 
  14728.    (D of C) A line or list of items waiting to be processed; for example, work 
  14729.    to be performed or messages to be displayed. 
  14730.  
  14731.  queued device context  -A logical description of a data destination (for 
  14732.    example, a printer or plotter) where the output is to go through the 
  14733.    spooler. See also device context. 
  14734.  
  14735.  
  14736. ΓòÉΓòÉΓòÉ <hidden> Glossary - R ΓòÉΓòÉΓòÉ
  14737.  
  14738.  radio button  -(1) A control window, shaped like a round button on the screen, 
  14739.    that can be in a checked or unchecked state. It is used to select a single 
  14740.    item from a list. Contrast with check box. (2) In SAA Advanced Common User 
  14741.    Access architecture, a circle with text beside it. Radio buttons are 
  14742.    combined to show a user a fixed set of choices from which only one can be 
  14743.    selected. The circle is partially filled when a choice is selected. 
  14744.  
  14745.  RAS  -Reliability, availability, and serviceability. 
  14746.  
  14747.  raster  -(1) In computer graphics, a predetermined pattern of lines that 
  14748.    provides uniform coverage of a display space. (T)  (2) The coordinate grid 
  14749.    that divides the display area of a display device.  (A)
  14750.  
  14751.  read-only file  -A file that can be read from but not written to. 
  14752.  
  14753.  real mode  -A method of program operation that does not limit or prevent 
  14754.    access to any instructions or areas of storage.  The operating system loads 
  14755.    the entire program into storage and gives the program access to all system 
  14756.    resources. Contrast with protect mode. 
  14757.  
  14758.  realize  -To cause the system to ensure, wherever possible, that the physical 
  14759.    color table of a device is set to the closest possible match in the logical 
  14760.    color table. 
  14761.  
  14762.  recursive routine  -A routine that can call itself, or be called by another 
  14763.    routine that was called by the recursive routine. 
  14764.  
  14765.  reentrant  -The attribute of a program or routine that allows the same copy of 
  14766.    the program or routine to be used concurrently by two or more tasks. 
  14767.  
  14768.  reference phrase  -(1) A word or phrase that is emphasized in a 
  14769.    device-dependent manner to inform the user that additional information for 
  14770.    the word or phrase is available. (2) (D of C) In hypertext, text that is 
  14771.    highlighted and preceded by a single-character input field used to signify 
  14772.    the existence of a hypertext link. 
  14773.  
  14774.  reference phrase help  -In SAA Common User Access architecture, highlighted 
  14775.    words or phrases within help information that a user selects to get 
  14776.    additional information. 
  14777.  
  14778.  refresh  -To update a window, with changed information, to its current status. 
  14779.  
  14780.  region  -A clipping boundary in device space. 
  14781.  
  14782.  register  -A part of internal storage having a specified storage capacity and 
  14783.    usually intended for a specific purpose. (T)
  14784.  
  14785.  remote file system  -A file-system driver that gains access to a remote system 
  14786.    without a block device driver. 
  14787.  
  14788.  resource  -The means of providing extra information used in the definition of 
  14789.    a window. A resource can contain definitions of fonts, templates, 
  14790.    accelerators, and mnemonics; the definitions are held in a resource file. 
  14791.  
  14792.  resource file  -A file containing information used in the definition of a 
  14793.    window. Definitions can be of fonts, templates, accelerators, and mnemonics. 
  14794.  
  14795.  restore  -To return a window to its original size or position following a 
  14796.    sizing or moving action. 
  14797.  
  14798.  retained graphics  -Graphic primitives that are remembered by the Presentation 
  14799.    Manager interface after they have been drawn. Contrast with nonretained 
  14800.    graphics. 
  14801.  
  14802.  return code  -(1) A value returned to a program to indicate the results of an 
  14803.    operation requested by that program. (2) A code used to influence the 
  14804.    execution of succeeding instructions.(A) 
  14805.  
  14806.  reverse video  -(1) A form of highlighting a character, field, or cursor by 
  14807.    reversing the color of the character, field, or cursor with its background; 
  14808.    for example, changing a red character on a black background to a black 
  14809.    character on a red background. (2) In SAA Basic Common User Access 
  14810.    architecture, a screen emphasis feature that interchanges the foreground and 
  14811.    background colors of an item. 
  14812.  
  14813.  REXX Language  -Restructured Extended Executor. A procedural language that 
  14814.    provides batch language functions along with structured programming 
  14815.    constructs such as loops; conditional testing and subroutines. 
  14816.  
  14817.  RGB  -(1) Color coding in which the brightness of the additive primary colors 
  14818.    of light, red, green, and blue, are specified as three distinct values of 
  14819.    white light. (2) Pertaining to a color display that accepts signals 
  14820.    representing red, green, and blue. 
  14821.  
  14822.  roman  -Relating to a type style with upright characters. 
  14823.  
  14824.  root segment  -In a hierarchical database, the highest segment in the tree 
  14825.    structure. 
  14826.  
  14827.  round-robin scheduling  -A process that allows each thread to run for a 
  14828.    specified amount of time. 
  14829.  
  14830.  run time  -(1) Any instant at which the execution of a particular computer 
  14831.    program takes place. (T)  (2) The amount of time needed for the execution of 
  14832.    a particular computer program. (T)  (3) The time during which an instruction 
  14833.    in an instruction register is decoded and performed. Synonym for execution 
  14834.    time. 
  14835.  
  14836.  
  14837. ΓòÉΓòÉΓòÉ <hidden> Glossary - S ΓòÉΓòÉΓòÉ
  14838.  
  14839.  SAA  -Systems Application Architecture. 
  14840.  
  14841.  SBCS  -Single-byte character set. 
  14842.  
  14843.  scheduler  -A computer program designed to perform functions such as 
  14844.    scheduling, initiation, and termination of jobs. 
  14845.  
  14846.  screen  -In SAA Basic Common User Access architecture, the physical surface of 
  14847.    a display device upon which information is shown to a user. 
  14848.  
  14849.  screen device context  -A logical description of a data destination that is a 
  14850.    particular window on the screen. See also device context. 
  14851.  
  14852.  SCREEN$  -Character-device name reserved for the display screen. 
  14853.  
  14854.  scroll bar  -In SAA Advanced Common User Access architecture, a part of a 
  14855.    window, associated with a scrollable area, that a user interacts with to see 
  14856.    information that is not currently allows visible. 
  14857.  
  14858.  scrollable entry field  -An entry field larger than the visible field. 
  14859.  
  14860.  scrollable selection field  -A selection field that contains more choices than 
  14861.    are visible. 
  14862.  
  14863.  scrolling  -Moving a display image vertically or horizontally in a manner such 
  14864.    that new data appears at one edge, as existing data disappears at the 
  14865.    opposite edge. 
  14866.  
  14867.  secondary window  -A window that contains information that is dependent on 
  14868.    information in a primary window and is used to supplement the interaction in 
  14869.    the primary window. 
  14870.  
  14871.  sector  -On disk or diskette storage, an addressable subdivision of a track 
  14872.    used to record one block of a program or data. 
  14873.  
  14874.  segment  -See graphics segment. 
  14875.  
  14876.  segment attributes  -Attributes that apply to the segment as an entity, as 
  14877.    opposed to the individual primitives within the segment. For example, the 
  14878.    visibility or detectability of a segment. 
  14879.  
  14880.  segment chain  -All segments in a graphics presentation space that are defined 
  14881.    with the 'chained' attribute. Synonym for picture chain. 
  14882.  
  14883.  segment priority  -The order in which segments are drawn. 
  14884.  
  14885.  segment store  -An area in a normal graphics presentation space where retained 
  14886.    graphics segments are stored. 
  14887.  
  14888.  select  -To mark or choose an item. Note that select means to mark or type in 
  14889.    a choice on the screen; enter means to send all selected choices to the 
  14890.    computer for processing. 
  14891.  
  14892.  select button  -The button on a pointing device, such as a mouse, that is 
  14893.    pressed to select a menu choice.  Also known as button 1. 
  14894.  
  14895.  selection cursor  -In SAA Advanced Common User Access architecture, a visual 
  14896.    indication that a user has selected a choice. It is represented by outlining 
  14897.    the choice with a dotted box. See also text cursor. 
  14898.  
  14899.  selection field  -(1) In SAA Advanced Common User Access architecture, a set 
  14900.    of related choices. See also entry field. (2) In SAA Basic Common User 
  14901.    Access architecture, an area of a panel that cannot be scrolled and contains 
  14902.    a fixed number of choices. 
  14903.  
  14904.  semantics  -The relationships between symbols and their meanings. 
  14905.  
  14906.  semaphore  -An object used by applications for signalling purposes and for 
  14907.    controlling access to serially reusable resources. 
  14908.  
  14909.  separator  -In SAA Advanced Common User Access architecture, a line or color 
  14910.    boundary that provides a visual distinction between two adjacent areas. 
  14911.  
  14912.  serial dialog box  -See modal dialog box. 
  14913.  
  14914.  serialization  -The consecutive ordering of items. 
  14915.  
  14916.  serialize  -To ensure that one or more events occur in a specified sequence. 
  14917.  
  14918.  serially reusable resource (SRR)  -A logical resource or object that can be 
  14919.    accessed by only one task at a time. 
  14920.  
  14921.  session  -(1) A routing mechanism for user interaction via the console; a 
  14922.    complete environment that determines how an application runs and how users 
  14923.    interact with the application. OS/2 can manage more than one session at a 
  14924.    time, and more than one process can run in a session. Each session has its 
  14925.    own set of environment variables that determine where OS/2 looks for 
  14926.    dynamic-link libraries and other important files. (2) (D of C) In the OS/2 
  14927.    operating system, one instance of a started program or command prompt. Each 
  14928.    session is separate from all other sessions that might be running on the 
  14929.    computer. The operating system is responsible for coordinating the resources 
  14930.    that each session uses, such as computer memory, allocation of processor 
  14931.    time, and windows on the screen. 
  14932.  
  14933.  Settings Notebook  -A control window that is used to display the settings for 
  14934.    an object and to enable the user to change them. 
  14935.  
  14936.  shadow  -An object that refers to another object. A shadow is not a copy of 
  14937.    another object, but is another representation of the object. 
  14938.  
  14939.  shadow box  -The area on the screen that follows mouse movements and shows 
  14940.    what shape the window will take if the mouse button is released. 
  14941.  
  14942.  shared data  -Data that is used by two or more programs. 
  14943.  
  14944.  shared memory  -In the OS/2 operating system, a segment that can be used by 
  14945.    more than one program. 
  14946.  
  14947.  shear  -In computer graphics, the forward or backward slant of a graphics 
  14948.    symbol or string of such symbols relative to a line perpendicular to the 
  14949.    baseline of the symbol. 
  14950.  
  14951.  shell  -(1) A software interface between a user and the operating system of a 
  14952.    computer. Shell programs interpret commands and user interactions on devices 
  14953.    such as keyboards, pointing devices, and touch-sensitive screens, and 
  14954.    communicate them to the operating system. (2) Software that allows a kernel 
  14955.    program to run under different operating-system environments. 
  14956.  
  14957.  shutdown  -The process of ending operation of a system or a subsystem, 
  14958.    following a defined procedure. 
  14959.  
  14960.  sibling processes  -Child processes that have the same parent process. 
  14961.  
  14962.  sibling windows  -Child windows that have the same parent window. 
  14963.  
  14964.  simple list  -A list of like values; for example, a list of user names. 
  14965.    Contrast with mixed list. 
  14966.  
  14967.  single-byte character set (SBCS)  -A character set in which each character is 
  14968.    represented by a one-byte code.  Contrast with double-byte character set. 
  14969.  
  14970.  slider box  -In SAA Advanced Common User Access architecture: a part of the 
  14971.    scroll bar that shows the position and size of the visible information in a 
  14972.    window relative to the total amount of information available. Also known as 
  14973.    thumb mark. 
  14974.  
  14975.  SOM  -System Object Model. 
  14976.  
  14977.  source file  -A file that contains source statements for items such as 
  14978.    high-level language programs and data description specifications. 
  14979.  
  14980.  source statement  -A statement written in a programming language. 
  14981.  
  14982.  specific dynamic-link module  -A dynamic-link module created for the exclusive 
  14983.    use of an application. 
  14984.  
  14985.  spin button  -In SAA Advanced Common User Access architecture, a type of entry 
  14986.    field that shows a scrollable ring of choices from which a user can select a 
  14987.    choice. After the last choice is displayed, the first choice is displayed 
  14988.    again.  A user can also type a choice from the scrollable ring into the 
  14989.    entry field without interacting with the spin button. 
  14990.  
  14991.  spline  -A sequence of one or more Bezier curves. 
  14992.  
  14993.  spooler  -A program that intercepts the data going to printer devices and 
  14994.    writes it to disk. The data is printed or plotted when it is complete and 
  14995.    the required device is available.  The spooler prevents output from 
  14996.    different sources from being intermixed. 
  14997.  
  14998.  stack  -A list constructed and maintained so that the next data element to be 
  14999.    retrieved is the most recently stored. This method is characterized as 
  15000.    last-in-first-out (LIFO). 
  15001.  
  15002.  standard window  -A collection of window elements that form a panel. The 
  15003.    standard window can include one or more of the following window elements: 
  15004.    sizing borders, system menu icon, title bar, maximize/minimize/restore 
  15005.    icons, action bar and pull-downs, scroll bars, and client area. 
  15006.  
  15007.  static control  -The means by which the application presents descriptive 
  15008.    information (for example, headings and descriptors) to the user. The user 
  15009.    cannot change this information. 
  15010.  
  15011.  static storage  -(1) A read/write storage unit in which data is retained in 
  15012.    the absence of control signals. (A)  Static storage may use dynamic 
  15013.    addressing or sensing circuits. (2) Storage other than dynamic storage. (A)
  15014.  
  15015.  style  -See window style. 
  15016.  
  15017.  subclass  -A class that is a child of another class. See also Inheritance. 
  15018.  
  15019.  subdirectory  -In an IBM personal computer, a file referred to in a root 
  15020.    directory that contains the names of other files stored on the diskette or 
  15021.    fixed disk. 
  15022.  
  15023.  swapping  -(1) A process that interchanges the contents of an area of real 
  15024.    storage with the contents of an area in auxiliary storage. (I)  (A)  (2) In 
  15025.    a system with virtual storage, a paging technique that writes the active 
  15026.    pages of a job to auxiliary storage and reads pages of another job from 
  15027.    auxiliary storage into real storage. (3) The process of temporarily removing 
  15028.    an active job from main storage, saving it on disk, and processing another 
  15029.    job in the area of main storage formerly occupied by the first job. 
  15030.  
  15031.  switch  -(1) In SAA usage, to move the cursor from one point of interest to 
  15032.    another;  for example, to move from one screen or window to another or from 
  15033.    a place within a displayed image to another place on the same displayed 
  15034.    image. (2) In a computer program, a conditional instruction and an indicator 
  15035.    to be interrogated by that instruction. (3) A device or programming 
  15036.    technique for making a selection, for example, a toggle, a conditional jump. 
  15037.  
  15038.  switch list  -See Task List. 
  15039.  
  15040.  symbolic identifier  -A text string that equates to an integer value in an 
  15041.    include file, which is used to identify a programming object. 
  15042.  
  15043.  symbols  -In Information Presentation Facility, a document element used to 
  15044.    produce characters that cannot be entered from the keyboard. 
  15045.  
  15046.  synchronous  -Pertaining to two or more processes that depend upon the 
  15047.    occurrence of specific events such as common timing signals. (T)  See also 
  15048.    asynchronous. 
  15049.  
  15050.  System Menu  -In the Presentation Manager, the pull-down in the top left 
  15051.    corner of a window that allows it to be moved and sized with the keyboard. 
  15052.  
  15053.  System Object Model (SOM)  -A mechanism for language-neutral, object-oriented 
  15054.    programming in the OS/2 environment. 
  15055.  
  15056.  system queue  -The master queue for all pointer device or keyboard events. 
  15057.  
  15058.  system-defined messages  -Messages that control the operations of applications 
  15059.    and provides input an other information for applications to process. 
  15060.  
  15061.  Systems Application Architecture (SAA)  -A set of IBM software interfaces, 
  15062.    conventions, and protocols that provide a framework for designing and 
  15063.    developing applications that are consistent across systems. 
  15064.  
  15065.  
  15066. ΓòÉΓòÉΓòÉ <hidden> Glossary - T ΓòÉΓòÉΓòÉ
  15067.  
  15068.  table tags  -In Information Presentation Facility, a document element that 
  15069.    formats text in an arrangement of rows and columns. 
  15070.  
  15071.  tag  -(1) One or more characters attached to a set of data that contain 
  15072.    information about the set, including its identification. (I)  (A)  (2) In 
  15073.    Generalized Markup Language markup, a name for a type of document or 
  15074.    document element that is entered in the source document to identify it. 
  15075.  
  15076.  target object  -An object to which the user is transferring information. 
  15077.  
  15078.  Task List  -In the Presentation Manager, the list of programs that are active. 
  15079.    The list can be used to switch to a program and to stop programs. 
  15080.  
  15081.  terminate-and-stay-resident (TSR)  -Pertaining to an application that modifies 
  15082.    an operating system interrupt vector to point to its own location (known as 
  15083.    hooking an interrupt). 
  15084.  
  15085.  text  -Characters or symbols. 
  15086.  
  15087.  text cursor  -A symbol displayed in an entry field that indicates where typed 
  15088.    input will appear. 
  15089.  
  15090.  text window  -Also known as the VIO window. 
  15091.  
  15092.  text-windowed application  -The environment in which the operating system 
  15093.    performs advanced-video input and output operations. 
  15094.  
  15095.  thread  -A unit of execution within a process. It uses the resources of the 
  15096.    process. 
  15097.  
  15098.  thumb mark  -The portion of the scroll bar that describes the range and 
  15099.    properties of the data that is currently visible in a window. Also known as 
  15100.    a slider box. 
  15101.  
  15102.  thunk  -Term used to describe the process of address conversion, stack and 
  15103.    structure realignment, etc., necessary when passing control between 16-bit 
  15104.    and 32-bit modules. 
  15105.  
  15106.  tilde  -A mark used to denote the character that is to be used as a mnemonic 
  15107.    when selecting text items within a menu. 
  15108.  
  15109.  time slice  -(1) An interval of time on the processing unit allocated for use 
  15110.    in performing a task. After the interval has expired, processing-unit time 
  15111.    is allocated to another task, so a task cannot monopolize processing-unit 
  15112.    time beyond a fixed limit. (2) In systems with time sharing, a segment of 
  15113.    time allocated to a terminal job. 
  15114.  
  15115.  time-critical process  -A process that must be performed within a specified 
  15116.    time after an event has occurred. 
  15117.  
  15118.  timer  -A facility provided under the Presentation Manager, whereby 
  15119.    Presentation Manager will dispatch a message of class WM_TIMER to a 
  15120.    particular window at specified intervals. This capability may be used by an 
  15121.    application to perform a specific processing task at predetermined 
  15122.    intervals, without the necessity for the application to explicitly keep 
  15123.    track of the passage of time. 
  15124.  
  15125.  timer tick  -See clock tick. 
  15126.  
  15127.  title bar  -In SAA Advanced Common User Access architecture, the area at the 
  15128.    top of each window that contains the window title and system menu icon. When 
  15129.    appropriate, it also contains the minimize, maximize, and restore icons. 
  15130.    Contrast with panel title. 
  15131.  
  15132.  TLB  -Translation lookaside buffer. 
  15133.  
  15134.  transaction  -An exchange between a workstation and another device that 
  15135.    accomplishes a particular action or result. 
  15136.  
  15137.  transform  -(1) The action of modifying a picture by scaling, shearing, 
  15138.    reflecting, rotating, or translating. (2) The object that performs or 
  15139.    defines such a modification; also referred to as a transformation. 
  15140.  
  15141.  Translation lookaside buffer (TLB)  -A hardware-based address caching 
  15142.    mechanism for paging information. 
  15143.  
  15144.  Tree  -In the Presentation Manager, the window in the File Manager that shows 
  15145.    the organization of drives and directories. 
  15146.  
  15147.  truncate  -(1) To terminate a computational process in accordance with some 
  15148.    rule (A)  (2) To remove the beginning or ending elements of a string. (3) To 
  15149.    drop data that cannot be printed or displayed in the line width specified or 
  15150.    available. (4) To shorten a field or statement to a specified length. 
  15151.  
  15152.  TSR  -Terminate-and-stay-resident. 
  15153.  
  15154.  unnamed pipe  -A circular buffer, created in memory, used by related processes 
  15155.    to communicate with one another. Contrast with named pipe. 
  15156.  
  15157.  unordered list  -In Information Presentation Facility, a vertical arrangement 
  15158.    of items in a list, with each item in the list preceded by a special 
  15159.    character or bullet. 
  15160.  
  15161.  update region  -A system-provided area of dynamic storage containing one or 
  15162.    more (not necessarily contiguous) rectangular areas of a window that are 
  15163.    visually invalid or incorrect, and therefore are in need of repainting. 
  15164.  
  15165.  user interface  -Hardware, software, or both that allows a user to interact 
  15166.    with and perform operations on a system, program, or device. 
  15167.  
  15168.  User Shell  -A component of OS/2 that uses a graphics-based, windowed 
  15169.    interface to allow the user to manage applications and files installed and 
  15170.    running under OS/2. 
  15171.  
  15172.  utility program  -(1) A computer program in general support of computer 
  15173.    processes; for example, a diagnostic program, a trace program, a sort 
  15174.    program. (T)  (2) A program designed to perform an everyday task such as 
  15175.    copying data from one storage device to another. (A)
  15176.  
  15177.  
  15178. ΓòÉΓòÉΓòÉ <hidden> Glossary - U ΓòÉΓòÉΓòÉ
  15179.  
  15180. There are no glossary terms for this starting letter. 
  15181.  
  15182.  
  15183. ΓòÉΓòÉΓòÉ <hidden> Glossary - V ΓòÉΓòÉΓòÉ
  15184.  
  15185.  value set control  -A visual component that enables a user to select one 
  15186.    choice from a group of mutually exclusive choices. 
  15187.  
  15188.  vector font  -A set of symbols, each of which is created as a series of lines 
  15189.    and curves. Synonymous with outline font. Contrast with image font. 
  15190.  
  15191.  VGA  -Video graphics array. 
  15192.  
  15193.  view  -A way of looking at an object's information. 
  15194.  
  15195.  viewing pipeline  -The series of transformations applied to a graphic object 
  15196.    to map the object to the device on which it is to be presented. 
  15197.  
  15198.  viewing window  -A clipping boundary that defines the visible part of model 
  15199.    space. 
  15200.  
  15201.  VIO  -Video Input/Output. 
  15202.  
  15203.  virtual memory (VM)  -Synonymous with virtual storage. 
  15204.  
  15205.  virtual storage  -(1) The storage space that may be regarded as addressable 
  15206.    main storage by the user of a computer system in which virtual addresses are 
  15207.    mapped into real addresses. The size of virtual storage is limited by the 
  15208.    addressing scheme of the computer system and by the amount of auxiliary 
  15209.    storage available, not by the actual number of main storage 
  15210.    locations. (I)  (A)  (2) Addressable space that is apparent to the user as 
  15211.    the processor storage space, from which the instructions and the data are 
  15212.    mapped into the processor storage locations. (3) Synonymous with virtual 
  15213.    memory. 
  15214.  
  15215.  visible region  -A window's presentation space, clipped to the boundary of the 
  15216.    window and the boundaries of any overlying window. 
  15217.  
  15218.  volume  -(1) A file-system driver that uses a block device driver for input 
  15219.    and output operations to a local or remote device. (I)  (2) A portion of 
  15220.    data, together with its data carrier, that can be handled conveniently as a 
  15221.    unit. 
  15222.  
  15223.  
  15224. ΓòÉΓòÉΓòÉ <hidden> Glossary - W ΓòÉΓòÉΓòÉ
  15225.  
  15226.  wildcard character  -Synonymous with global file-name character. 
  15227.  
  15228.  window  -(1) A portion of a display surface in which display images pertaining 
  15229.    to a particular application can be presented. Different applications can be 
  15230.    displayed simultaneously in different windows. (A)  (2) An area of the 
  15231.    screen with visible boundaries within which information is displayed. A 
  15232.    window can be smaller than or the same size as the screen. Windows can 
  15233.    appear to overlap on the screen. 
  15234.  
  15235.  window class  -The grouping of windows whose processing needs conform to the 
  15236.    services provided by one window procedure. 
  15237.  
  15238.  window coordinates  -A set of coordinates by which a window position or size 
  15239.    is defined; measured in device units, or pels. 
  15240.  
  15241.  window handle  -Unique identifier of a window, generated by Presentation 
  15242.    Manager when the window is created, and used by applications to direct 
  15243.    messages to the window. 
  15244.  
  15245.  window procedure  -Code that is activated in response to a message. The 
  15246.    procedure controls the appearance and behavior of its associated windows. 
  15247.  
  15248.  window rectangle  -The means by which the size and position of a window is 
  15249.    described in relation to the desktop window. 
  15250.  
  15251.  window resource  -A read-only data segment stored in the .EXE file of an 
  15252.    application o the .DLL file of a dynamic link library. 
  15253.  
  15254.  window style  -The set of properties that influence how events related to a 
  15255.    particular window will be processed. 
  15256.  
  15257.  window title  -In SAA Advanced Common User Access architecture, the area in 
  15258.    the title bar that contains the name of the application and the OS/2 
  15259.    operating system file name, if applicable. 
  15260.  
  15261.  Workplace Shell  -The OS/2 object-oriented, graphical user interface. 
  15262.  
  15263.  workstation  -(1) A display screen together with attachments such as a 
  15264.    keyboard, a local copy device, or a tablet. (2) (D of C) One or more 
  15265.    programmable or nonprogrammable devices that allow a user to do work. 
  15266.  
  15267.  world coordinates  -A device-independent Cartesian coordinate system used by 
  15268.    the application program for specifying graphical input and output. (I)  (A)
  15269.  
  15270.  world-coordinate space  -Coordinate space in which graphics are defined before 
  15271.    transformations are applied. 
  15272.  
  15273.  WYSIWYG  -What-You-See-Is-What-You-Get. A capability of a text editor to 
  15274.    continually display pages exactly as they will be printed. 
  15275.  
  15276.  
  15277. ΓòÉΓòÉΓòÉ <hidden> Glossary - X ΓòÉΓòÉΓòÉ
  15278.  
  15279. There are no glossary terms for this starting letter. 
  15280.  
  15281.  
  15282. ΓòÉΓòÉΓòÉ <hidden> Glossary - Y ΓòÉΓòÉΓòÉ
  15283.  
  15284. There are no glossary terms for this starting letter. 
  15285.  
  15286.  
  15287. ΓòÉΓòÉΓòÉ <hidden> Glossary - Z ΓòÉΓòÉΓòÉ
  15288.  
  15289.  z-order  -The order in which sibling windows are presented. The topmost 
  15290.    sibling window obscures any portion of the siblings that it overlaps; the 
  15291.    same effect occurs down through the order of lower sibling windows. 
  15292.  
  15293.  zooming  -The progressive scaling of an entire display image in order to give 
  15294.    the visual impression of movement of all or part of a display group toward 
  15295.    or away from an observer. (I)  (A)
  15296.  
  15297.  8.3 file-name format  -A file-naming convention in which file names are 
  15298.    limited to eight characters before and three characters after a single dot. 
  15299.    Usually pronounced "eight-dot-three." See also non-8.3 file-name format. 
  15300.  
  15301.  
  15302. ΓòÉΓòÉΓòÉ <hidden> IBM Trademark ΓòÉΓòÉΓòÉ
  15303.  
  15304. Trademark of the IBM Corporation. 
  15305.  
  15306.  
  15307. ΓòÉΓòÉΓòÉ <hidden> Trademarks ΓòÉΓòÉΓòÉ
  15308.  
  15309. Trademark of AT&T, Inc. 
  15310.  
  15311.  
  15312. ΓòÉΓòÉΓòÉ <hidden> Trademarks ΓòÉΓòÉΓòÉ
  15313.  
  15314. Trademark of the Adobe Systems Inc. 
  15315.  
  15316.  
  15317. ΓòÉΓòÉΓòÉ <hidden> Trademarks ΓòÉΓòÉΓòÉ
  15318.  
  15319. Trademark of the Microsoft Corporation. 
  15320.  
  15321.  
  15322. ΓòÉΓòÉΓòÉ <hidden> Trademarks ΓòÉΓòÉΓòÉ
  15323.  
  15324. Trademark of Linotype. 
  15325.  
  15326.  
  15327. ΓòÉΓòÉΓòÉ <hidden> Trademarks ΓòÉΓòÉΓòÉ
  15328.  
  15329. Trademark of Monotype Corporation, Limited. 
  15330.  
  15331.  
  15332. ΓòÉΓòÉΓòÉ <hidden> Trademarks ΓòÉΓòÉΓòÉ
  15333.  
  15334. Trademark of Intel Coporation.