1、INTERNATIONAL STANDARD ISO/tEC 7942-1 Second edition 1994-l l-01 Information technology - Computer graphics and image processing - Graphical Kernel System (GKS) - Part 1: Functional description Technologies de /information - lnfographie et traitement dimage - Syst&me graphique GKS - Partie I: Descri
2、ption fonctionnelte Reference number ISOAEC 7942-l :I 994(E) ISO/IEC 7942-l: 1994(E) Contents Foreword viii Introduction ix 1 scope .l 2 Normative references. .2 3 Definitions .3 4 Conformance .9 4.1 Specification . .9 4.2 Registration .9 5 Concepts . .I0 5.1 Pictures 10 5.2 Output primitive classes
3、 and attributes . .10 5.3 Workstations .10 5.4 Coordinate systems and transformations .14 5.5 Logical input devices .14 5.6 Picture part store . .14 5.7 State lists .14 5.8 Description tables . .14 5.9 M&files and archives .14 5.10 Routing to the backdrop . .15 5.11 Audit trail . .15 5.12 Segments .
4、15 5.13 Compatibility with IS0 7942: 1985 .15 5.14 Summary .15 6 The Graphical Kernel System .17 6.1 6.2 6.3 6.4 6.5 6.6 6.7 Initialization . .17 Graphical output . .17 6.2.1 Output primitive classes . .17 6.2.2 Output primitive attributes .17 Normalization transformations . .19 Picture part store .
5、 .20 6.4-l Picture part creation . 2 0 6.4.2 Picture part functions .20 6.4.3 Adding picture parts 2 0 6.4.4 Picture part archiving .20 The NDC picture .20 6.5.1 Introduction .20 6.5.2 NDC picture operations .21 6.5.3 NDC metafiles .21 Selection criterion . .21 Graphical input . .22 6.7.1 Introducti
6、on to logical input devices .22 6.7.2 Logical input device model .23 6.7.3 Operating modes of logical input devices .24 6.7.4 Input queue and current event report .25 0 ISOlIEC 1994 All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form
7、 or by any means, electronic or mechanical, including photocopying and microfilm, without permission in writing from the publisher. ISO/IEC Copyright Office l Case postale 56 l CH-1211 Geneve 20 l Switzerland Printed in Switzerland OISO/IEC ISO/IEC 7942-1:1994(E) 6.8 Inquiry functions 26 6.9 Error h
8、andling . 26 6.10 Special interfaces between GKS and the application program . 2 6 6.11 Backdrop .26 6.12 Audit and playback 27 7 Workstation dependent control 28 7.1 Introduction . 28 7.2 Workstation characteristics .28 7.3 Selecting a workstation 2 9 7.4 Selection criteria . .29 7.5 Viewing . 30 7
9、.6 Workstation transformations .30 7.7 Output primitives .31 7.8 Colour .32 7.9 Setting representations . 33 7.10 Removing a backdrop . .34 7.11 Visual effect state . .34 7.12 Realized metafile . 34 7.13 Logical input devices . 34 7.13.1 Introduction -34 7.13.2 Initialization of logical input device
10、s 35 7.13.3 Definition of logical and composite input devices 3 5 7.14 Sending messages to a workstation . 35 8 Output primitives . .36 8.1 Introduction . 36 8.2 Curve output primitives .36 8.2.1 Curve primitives 36 8.2.2 Curve attributes . .37 8.3 Marker output primitives .37 8.4 Area output primit
11、ives . 38 8.4.1 Area primitives 38 8.4.2 Definition of interior 38 8.4.3 Area attributes . .38 8.5 Character output primitives . 40 8.5.1 Introduction .40 8.5.2 Glyph specification 41 8.5.3 Glyph size . 42 . 8.5.4 Text extent .42 8.5.5 Text skewing . 43 . 8.5.6 Text alignment .44 8.5.7 Text orientat
12、ion . 46 . 8.5.8 Transformed text 47 8.5.9 Precision . .47 8.5.10 Estimate of text extent . 48 8.6 Image output primitives .48 8.7 Design output primitives . .49 8.7.1 Introduction . 49 8.7.2 Stencils .50 8.7.3 Stencil attributes 52 8.7.4 Stencil composition . 53 8.7.5 Tiling store .57 8.7.6 Stencil
13、 and tiling functions 59 . . . 111 ISO/IEC 7942-1:1994(E) OISO/IEC 8.8 Generalized drawing primitive . .59 9 Logical input device classes . .60 9.1 Introduction .60 9.2 Measures of each logical input device class . .60 9.3 Transformation of LOCATOR and STROKE input . .61 9.3.1 Transformation of LOCA
14、TOR input .61 9.3.2 Transformation of STROKE input . .63 9.4 Prompt and echo types .63 9.4.1 LOCATOR prompt and echo types .63 9.4.2 STROKE prompt and echo types . .64 9.4.3 VALUATOR prompt and echo types . .64 9.4.4 CHOICE prompt and echo types .65 9.4.5 PICK prompt and echo types .65 9.4.6 STRING
15、prompt and echo types .66 10 Segments and workstation activation . .67 10.1 Introduction .67 10.2 Selection criteria . .67 10.3 Segment state list .68 10.4 Workstation activation .68 10.5 Segment creation .68 10.6 Segment manipulation .68 10.7 Segment attributes .69 10.8 Segment storage .69 10.9 Cle
16、ar workstation .69 11 Data types .70 11.1 Data type definitions . .70 11.1.1 Notational conventions . .70 11.1.2 Basic types .72 11.1.3 Data types for GKS control .73 11.1.4 Data types for output primitives . .73 11.1.5 Data types for output attributes .75 11.1.6 Data types for transformations . .78
17、 11.1.7 Data types for NDC picture .79 11.1.8 Data types for metafiles .79 11.1.9 Data types for picture parts and archives . .79 11.1.10 Data types for utility functions . .80 11.1.11 Data types for segments .80 11.1.12 Data types for input .81 11.1.13 Data types for workstation control . .82 11.1.
18、14 Data types for inquiry functions . .83 11.1.15 Data types for operating state . .83 11.1.16 Data types for font and glyph functions . .84 11.1.17 Data types for audit trails .84 11.1.18 Data types for selection criteria . . 11.1.19 Data types for paths, tilings and stencils .85 11.2 Data type def
19、initions for state lists and description tables .87 11.2.1 Introduction .87 11.2.2 Operating state list (OSL). .87 11.2.3 GKS description table (GDT). .87 11.2.4 GKS state list (GSL) . .87 11.2.5 Workstation state list (WSL) .88 11.2.6 Workstation description table (WDT) .88 iv OISO/IEC ISO/IEC 7942
20、-1:1994(E) 11.2.7 Error state list (ESL) 90 11.2.8 Segment state list (SSL) . 90 11.2.9 Stencil state list (STSL). . .90 11.3 Initial values of state lists and description tables . .90 11.3.1 Operating state list . 90 11.3.2 GKS description table 90 11.3.3 GKS state list .90 11.3.4 Workstation state
21、 list .92 11.3.5 Generic workstation description table .92 11.3.6 Error state list .92 11.3.7 Segment state list .92 11.3.8 Stencil state list 92 12 Workstation independent functions .93 12.1 Control functions .93 12.2 Output functions 94 12.3 Design output functions .95 12.4 Output attributes . .97
22、 12.5 Normalization transformation functions 98 12.6 NIX picture functions . 99 12.7 Metafile functions 100 12.8 Picture part store functions 100 12.9 Input functions .103 12.10 Font and glyph functions .104 12.11 Audit and playback functions . .ll 12.12 Inquiry functions . .105 12.13 Utility functi
23、ons .107 12.14 Utility functions for output primitives .107 13 Workstation functions .109 13.1 Control functions .109 13.2 Inquiry functions . .112 13.3 Retrieval functions .114 13.4 Viewing utility functions .115 13.5 Colour utility functions 115 14 Segment and workstation activation functions . .1
24、16 14.1 Segment functions .116 14.2 Workstation activation functions .118 14.3 Utility functions .119 Annexes Function and data type list .120 A.1 Functions alphabetic . .120 A.2 Functions order of appearance .122 A.3 Data types alphabetic .126 Error list . .128 B.l Function error list . .128 B.2 Er
25、ror list ordered by error number .138 Language binding considerations . .140 Allowable differences .146 D.l General . .146 D.2 Global differences .146 D.3 Workstation dependent differences .146 Colour models .149 Bibliography .150 V ISO/IEC 7942-1:1994(E) QISO/IEC G An approach to compatibility with
26、 IS0 7942: 1985 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1 G.l G.2 G.3 G.4 G.5 G.6 G.7 G.8 G3 G.10 G.ll Introduction .151 Format . 151 G.2.1 Compatibility aspects .15 1 G.2.2 Language binding . .151 G.2.3 Notation used in this annex .151 Data structures . 151
27、G.3.1 Introduction . 151 G.3.2 Compatibility data types . .152 G.3.3 Compatibility operating state list (COSL) .152 G.3.4 Compatibility GKS state list (CGSL) . .152 G.3.5 Compatibility workstation state list (CWSL) . .152 G.3.6 Compatibility segment state list (CSSL) .153 Control functions .153 G.4.
28、1 OPEN GKS . .153 G.4.2 OPEN WORKSTATION . .153 G.4.3 CLOSE WORKSTATION 154 G.4.4 ACTIVATE WORKSTATION .154 G.4.5 DEACTIVATE WORKSTATION .155 G.4.6 CLEAR WORKSTATION . .155 G.4.7 Deferral states 155 Output and attribute functions .156 Transformation functions . .156 G.6.1 SET VIEWPORT 156 G.6.2 SET
29、WINDOW . .157 G.63 SELECT NORMALIZATION TRANSFORMATION . .157 Workstation transformation functions .157 Segment functions . 157 GA1 Introduction .157 G.8.2 CREATE SEGMENT . .157 GA3 DELETE SEGMENT FROM WORKSTATION15 7 G.8.4 ASSOCIATE SEGMENT WITH WORKSTATION158 GA5 COPY SEGMENT TO WORKSTATION . .158
30、 G.8.6 INSERT SEGMENT .158 GS.7 Segment attributes .158 Input functions .158 G.9.1 Introduction . 158 G.9.2 Simultaneous events . .159 G.9.3 Pick input .160 GKSM .160 G.lO.l READ ITEM FROM GKSM .160 G.10.2 GET ITEM FROM GKSM . .160 G.10.3 INTERPRET ITEM .160 G.10.4 WRITE ITEM TO GKSM . 161 Inquiry f
31、unctions . .161 G.ll.l Inquiry functions for operating state value . .161 G.11.2 Inquiry functions for GKS description table .161 G.11.3 Inquiry functions for GKS state list. 161 G.11.4 Inquiry functions for workstation state list . .161 G.11.5 Inquiry functions for workstation description table .16
32、1 vi OISO/IEC ISO/IEC 7942-1:1994(E) G.11.6 Inquiry functions for segment state list .162 G.11.7 Pixel inquiries . .162 G.11.8 Inquiry functions for GKS error state list . .162 G.12 Utility functions . 162 G.13 Error handling .162 G.13.1 Matching error numbers . .162 G.13.2 Using the utility functio
33、n .162 G.14 Conclusions . 163 I-l Compatibility with the Computer Graphics Reference Model ISO/IEC 11072: 1992 (informative). .164 H.l Introduction . 164 H.2 Environments. .164 H.3 Fan-out and fan-in .164 H.4 External interfaces .164 H.5 Processing elements . 164 H.6 Compositions 164 H.7 Collections
34、 164 H.8 Clipping .164 vii ISO/IEC 7942-1:1994(E) OISO/IEC Foreword IS0 (the International Organization for Standardization) and IEC (the International Electrotechnical Commis- sion) form the specialized system for worldwide standardization. National bodies that are members of IS0 or IEC participate
35、 in the development of International Standards through technical committees established by the respective organization to deal with particular fields of technical activity. IS0 and IEC technical committees collaborate in fields of mutual interest. Other international organizations, governmental and
36、non- governmental, in liaison with IS0 and IEC, also take part in the work. In the field of information technology, IS0 and IEC have established a joint technical committee, ISO/IEC JTCl. Draft International Standards adopted by the joint technical committee are circulated to national bodies for vot
37、ing. Publication as International Standard requires approval by at least 75% of the national bodies cast- ing a vote. International Standard ISO/IEC 7942-l was prepared by Joint Technical Committee ISO/IEC JTCl, Informa- tion technology, Sub-Committee 24, Computer graphics and image processing. This
38、 second edition cancels and replaces the first edition (IS0 7942: 1985) which has been technically revised. ISO/IEC 7942 consists of the following parts, under the general title Information technology - Computer graphics and image processing - Graphical Kernel System (GKS): Part I : Functional descr
39、iption Part 2: NDC metafile Part 3: Audit trail Part 4: Picture part archive Annexes A and B form an integral part of this part of ISO/IEC 7942. Annexes C, D, E, F, G, and H are for information only. . . . VIII OISO/IEC ISO/IEC 7942-1:1994(E) Introduction The Graphical Kernel System (GKS) provides a
40、 set of functions for computer graphics programming that can be used by a range of applications. The main motivations for standardization are to improve portability of pro- grams and to define a basic methodology. Portability is achieved by providing all the capabilities necessary in a device indepe
41、ndent way. The following principles are used in specifying GKS: a) Design: the three goals are consistency of approach, compatibility with related standards and orthogonal functionality where possible. b) Functionality: the goals are completeness with the minimal set of functions. Organization of fu
42、nctions should be such as to achieve compact programs. Richness should be provided by utilities and toolkits on top of GKS rather than non-standard extensions to GKS. c) Clarity: the underlying concepts should be easily understood, especially by the application programmer. To achieve this, GKS is de
43、fined using a small set of functions with precise specification of the data struc- tures that define the state of GKS and the effect that functions have on this state. d) Error handling: all errors caused by incorrect function invocations or internal failures are logged with the application having c
44、ontrol over the action taken. e) Separation of device dependent functionality: in GKS there is a clear separation between the functional- ity that is device dependent and device independent. GKS has the concept of a workstation which deals with all device dependent functions. f) Implementation: GKS
45、should be realizable in a wide range of host languages. The support GKS requires from the operating system should not be excessive. GKS should be efficient to implement on commonly available hardware and it should be easy to produce a robust product. This International Standard (known informally as
46、“GKS-94”) has a strong relationship to the principles and functionality of IS0 7942:1985 (known informally as “GKS-85”). However, it has been updated to provide additional functionality, cleaner concepts and an International Standard for modem hardware. Minor changes made include some additional pri
47、mitives, some minor extensions to input, a clearer definition of the NDC pic- ture and simplification of deferral. A nameset attribute has been added and this is used as a selection criterion for a range of functions. As a result, the equivalent of the IS0 7942: 1985 segment (picture part) no longer
48、 needs attributes separate from the primitive attributes. The segment facilities of IS0 7942:1985 are provided in terms of the new picture part store. The IS0 7942:1985 metafile is replaced by an audit trail and an NDC metafile based on the Computer Graph- ics Metafile (ISO/IEC 8632). ISOAEC 7942-l:
49、 1994(E) OISO/IEC Introduction INTERNATIONAL STANDARD OISO/IEC ISO/IEC 7942-1:1994(E) Information technology - Computer graphics and image processing - Graphical Kernel System (GKS) - Part 1: Functional description 1 Scope This part of ISO/IEC 7942 specifies a set of functions for computer graphics programming, the Graphical Ker- nel System (GKS). It provides functions for two dimensional graphical output, the storage and dynamic modification of pictures, and operator input. GKS functions and datatypes are specified independently of pro- gramming languages. GKS establishes a system for devi