1、INCITS/ISO/IEC 9636-6-1991(R1997)(formerly ANSI/ISO/IEC 9636-6-1991 (R1997) for Information Technology -Computer Graphics -interfacing Techniques forDialogues with Graphical Devices (CGI) -Functional Specification -Part 6: RasterAmericanNationalStandardApproval of an American National Standard requi
2、res review by ANSI that therequirements for due process, consensus, and other criteria for approval havebeen met by the standards developer.Consensus is established when, in the judgment of the ANSI Board of StandardsReview, substantial agreement has been reached by directly and materiallyaffected i
3、nterests. Substantial agreement means much more than a simplemajority, but not necessarily unanimity. Consensus requires that all views andobjections be considered, and that a concerted effort be made toward theirresolution.The use of American National Standards is completely voluntary; their existe
4、ncedoes not in any respect preclude anyone, whether he has approved the standardsor not, from manufacturing, marketing, purchasing, or using products, processes,or procedures not conforming to the standards.The American National Standards Institute does not develop standards and will inno circumstan
5、ces give an interpretation of any American National Standard.Moreover, no person shall have the right or authority to issue an interpretation ofan American National Standard in the name of the American National StandardsInstitute. Requests for interpretations should be addressed to the secretariat o
6、rsponsor whose name appears on the title page of this standard.CAUTION NOTICE: This American National Standard may be revised orwithdrawn at any time. The procedures of the American National StandardsInstitute require that action be taken periodically to reaffirm, revise, or withdrawthis standard. P
7、urchasers of American National Standards may receive currentinformation on all standards by calling or writing the American National StandardsInstitute.Published byAmerican National Standards Institute11 West 42nd Street, New York, New York 10036Copyright 1991 by Information Technology Industry Coun
8、cil (ITI)All rights reserved.These materials are subject to copyright claims of International Standardization Organization (ISO),International Electrotechnical Commission (IEC), American National Standards Institute (ANSI), andInformation Technology Industry Council (ITI). Not for resale. No part of
9、 this publication may bereproduced in any form, including an electronic retrieval system, without the prior written permission of ITI.All requests pertaining to this standard should be submitted to ITI, 1250 Eye Street NW, Washington, DC20005.Printed in the United States of AmericaANSI/ISO/IEC 9636-
10、6-l 991 Redesignation of ANSI X3.1 61 (never published) American National Standard for Information Technology - Computer Graphics - Interfacing Techniques for Dialogues with Graphical Devices (CGI)- Functional Specification - Part 6: Raster Secretariat Computer and Business Equipment Manufacturers A
11、ssociation Approved August 6,1992 American National Standards Institute, Inc. Contents Foreword . iV Iluduction . V 1 scape . 1 2 Normative references 2 3 Rastaconcepts . 3 3.1 Introduction . 3 33 Arcbitectaalconcepf . 3 302.1 Bitrrmps . 3 3.2.2 Displayable bitmaps 3 3.23 Nondisplayabe bitmaps 4 3.2
12、.4 Bitmap identifiers 5 3.3 Control of bitmap manipulations 5 33.1 The drawing bitmap 5 33.2 Two-operand bitblts 5 333 Tile three-operand bitblt . 6 33.4 Bitmqs regions used as patterns 6 335 Drawing modes . 6 33.6 TraMparmcy . 7 33.7 Raster operation functions with mapped bitmaps . 7 33.8 Rendering
13、 in hc.-jY _-._ -I_ -_ Foreword (This foreword is not part of American National Standard ANSI/ISO/IEC 9636-6-l 991. This document is identical to ISO/IEC 9636-6-l 991, and the following five paragraphs are the original foreword as it appeared in that document.) IS0 (the International Organization fo
14、r Standardization) and IEC (the International Electrotechnical Commission) form the specialized system for worldwide standardization. National bodies that are members of IS0 or IEC participate in the development of International Standards through technical committees established by the respective or
15、ganization to deal with particular fields of technical activity. IS0 and IEC technical committees collaborate in fields of mutual interest. Other international organizations, governmental and non-governmental, in liaison with IS0 and IEC, also take part in the work. In the field of information techn
16、ology, IS0 and IEC have established a joint technical committee, ISO/IEC JTC 1. Draft International Standards adopt- ed by the joint technical committee are circulated to national bodies for voting. Publication as an International Standard requires approval by at least 75% of the national bodies cas
17、ting a vote. International Standard ISO/IEC 9636-6 was prepared by Joint Technical Committee ISO/IEC JTC 1, information technology. ISO/IEC 9636 consists of the following parts, under the general title Information technology - Computer graphics - Interfacing techniques for dialogues with graphical d
18、evices (CGI) - Functional specification: - Part 7: Overview, profiles, and conformance - Part 2: Control - Part 3: Output - Part 4: Segments - Part 5: Input and echoing - Part 6: Raster Annexes A and B form an integral part of this part of ISO/IEC 9636. Annexes C, D, E, and F are for information onl
19、y. Requests for interpretation, suggestions for improvement or addenda, or defect reports are welcome. They should be sent to the X3 Secretariat, Computer and Business Equipment Manufacturers Association, 1250 Eye Street, NW, Suite 200, Washington, DC 20005. This standard was processed and approved
20、for submittal to ANSI by Accredited Standards Committee on Information Processing Systems, X3. Committee approval of the standard does not necessarily imply that all committee members voted for its approval. At the time it approved this standard, the X3 Committee had the following members: (Position
21、 Vacant), Chair Donald C. Loughry, Vice-Chair Joanne Flanagan, Secretary Organization Represented Name of Representative Allen-Bradley Company . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ronald Reimer Joe Lenner (Alt.) American Library As
22、sociation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Paul Peters iv Organization Represented Name of Representative American Nuclear Society . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Geraldine C.
23、 Main Sally Harttell (Ah.) AMP, Inc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Edward Kelly Edward Mikoski (Alt.) Apple Computer, Inc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
24、 . . . . . . . . . . . . . . . . . . . . . . . . . . . Karen Higginbottom Association of the Institute for Certification of Computer Professionals (AICCP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Kenneth Zemrowski Eugene Dwyer (Alt.) AT for example, in window-managed environment
25、s. Whether or not such spontaneous change in the displayable bitmap dimensions is allowed is indicated by an entry in the Output Device Description Table defined in ISO/IEC %36-2. If such spontaneous change in dimensions is allowed, the device coordinate information in the Bitmap State List for the
26、currently displayed bitmap will be modified to reflect the change. Thus, to detect such a spontaneous change, periodic polling by the client of this information is necessary. Alternatively, the CGI client may receive asynchronous notification of a change of dimensions by the environment via a non- C
27、GI interface. When the currently selected display bitmap does not completely cover the display surface, the CGI allows latitude about whether the contents of previous displayable bitmaps are visible in those regions of the display surface not covered by the currently selected display bitmap. The Pre
28、vious Display Bitmap Data entry in the Raster Description Table specifies the implemented behaviour, which may be either CLEARED or PRESERVED. A value of PRESERVED indicates that it is possible for the display surface to be dirty even though the drawing surface is clear. If the contents of a previou
29、s displayable bitmap are visible and the bitmap is selected as the current drawing bitmap, it is implementation-dependent whether changes to the bitmap are visible. 3 ISOIIEC 9636-6 : 1991 (E) Baster concepts Architectural concepts 3.2.3 Non-displayable bitmaps These bitmaps cannot be displayed dire
30、ctly, but the information within a non-displayable bitmap may be moved to or combined with a displayable bitmap. Pixels in a non-displayable bitmap are treated as if their aspect ratio is the same as that of pixels in a displayable bitmap for the I_- 2 .“ otherwise, the pixel value is set to “foregr
31、ound value”. 5.2.7 MAPPED BITMAP BACKGROUND COLOUR Parameters: In colour specifier co Effect: The Mapped Bitmap Background Colour entry in the Raster State List is set to the value specified and will be used as the colour to which the background pixels of a mapped bitmap are expanded. when mapped bi
32、tmaps are used in bitblt operations, the background pixels are expanded to Mapped Bitmap Background Colour and the foreground pixels are expanded to Mapped Bitmap Foreground Colour before performing any pixel combining operations. Additionally, when the destination bitmap is a mapped bitmap, if the
33、result of the operation has tlte same value as Mapped Bitmap Background Colour the cotresponding pixel value is set to “background value”; otherwise, the pixel value is set to “foreground value”. 53.8 TRANSPARENT COLOUR Parameters: In colour specifiir Etfct: The Transpamnt Colour entry in the Raster
34、 State List is set to the value specified. co 16 ISOlIEC 9636-6 : 1991 (E) Raster control functions Abstract specification of functions When a raster operation function is performed in which the transparency parameter is TRANSPARENT, the pixels of the destination bitmap region are not modified in po
35、sitions corresponding to pixels in the source bitmap region whose value is the same as that of Transparent Colour. 5.3 Raster attribute functions 5.3.1 DRAWING MODE Parameters: In drawing mode (-n-l,ln).(-nn) mm Effect: The Drawing Mode entry in the Raster State List is set to the specified value. T
36、he current value of Drawing Mode is associated with graphic objects created by the graphic primitive functions defined in ISO/IEC %36-3. Drawing mode is a compound data type that defines the pixel operation between the source and destination during all output operations. The first component specifie
37、s a class of drawing modes, while the second component specifies a particular element within the class, see table 1. Pixel operations are performed on the actual pixel values stored within the bitmap. A pixel operation performed on a specified destination pixel affects no other pixel in the destinat
38、ion bitmap region. For example, an (1.3) operation, d = d MINLlS s, which underfIows will not borrow from an adjacent pixel. The standardized classes of drawing mode are: 1) ADDITIVEOP: A class of drawing mode pixel operations based on normal unsigned twos complement operations between source and de
39、stination pixel values. The operations include: PLUS and MINUS, which are standard addition and subtraction allowing ovefflow or underflow; ADDCAP. addition which does not overllow, but “caps” the value at the highest possible (unsigned) pixel vaiue; MINUSCAP subtraction which does not underflow, bu
40、t “caps” the value at the lowest possible (unsigned) pixel value. 2) BOOLEANOP: A class of drawing mode pixel operations based on the standard boolean operations between source and destination pixel values. The operations include: NOT, ones complement; AND, bitwise “and”; OR. bitwise “inclusive-or”;
41、 XOR, bitwise “exclusive-or”. and “replace”. 3) COMPARATIVEOP: A class of drawing mode pixel operations based on unsigned comparisons between source and destination pixel values. The operations include: MAX, the maximum of a source and destination pixel; MIN, the minimum of a source and destination
42、pixel. Class values above 3 are reserved for registration; negative values are available for private use. The operands for the standardized operations are defined in table 1. For the boolean operations, each bit n of a pixel value can be determined algorithmicaIly by applying the following formula:
43、I negative values are available for private use. 17 ISO/IEC 9636-6 : 1991 (E) Abstract specification of functions Raster attribute functions Table 1 - Drawing modes d=sAND(NOTd) (BOOLEANOP, 4) (BoolJzANOP, 5) (WCKEANOP, 6) (BDOLEANOP, 7) (ROOLEANOP, 8) (BODLEANOP, 9) (J3OoLEANOP, 10) (BOOLEANOP. 11)
44、 DDLEANOP 12 d=NOT(sORd) d = NOT (s XOR d) d=sOR(NOTd) (ADDDTVEOP, 1) (ADDlTlVEDP. 2) (ADDTITVEOP, 3) (ADDlTlVEOP, 4) OMPARATIVEOP, Note - (d = original destination pixel value, s = original source pixel value, d = resulting destination pixel value) Errors: Ertor identifzr: 3503 cause: Unsupported d
45、rawing mode / transparency requested Reaction: The Drawing Mode entry in the Raster State List is set to the specified value; at interpretation time, the default drawing mode and transparency is used. 53.2 FILL BITMAP Parameters: In bitmap identifier BN In pattem bitmap region 2P Effect: Ihe Fill Bi
46、tmap Identifzr and Fill Bitmap Region entries of the Fill Attributes State List defined in ISO/lEC 9636-3 are set to the specified values. If the Fill Bitmap Identifr specifies a bitmap that does not exist, the default Fill Bitmap will be used until such time as the referenced bitmap is created. The
47、 pattern bitmup region is defined in the Fill Bitmaps VDC space and is not subject to transformations other than the VDC-to-Device Mapping. When the fill bitmap is being used as a pattern for drawing, pixel (1, ny) of the Fill Bitmap Region is positioned at the Fill Reference point in the current dr
48、awing bitmaps VDC space, (see figure 3) as specified in ISO/IEC 9636-3.3.10.2.1. The data of the Fill Bitmap Region is then conceptually replicated as a tile over the entire drawing bitmaps VDC Extent for use in the fill operation. The associated attributes of TRANSPARENCY and AUXILIARY COLOUR are a
49、pplied. If the value of the associated TRANSPARENCY attribute is OPAQUE, the Fill Bitmap Region is replicated without regard to ISO/IEC 9636.6 : 1991 (E) Raster attribute functions Abstract specifkation of functions the AUXILIARY COLOUR attribute. If the value of the associated TRANSPARENCY attribute is TRANSPARENT, then those pixels in the Fill Bitmap Region that have the same colour as the AUXILIARY COLOUR attribute value shall not affect the pixels in the drawing bitmap. 5.4 Raster operation functions 5.4.1 PIXEL ARRAY Parameters: In origin point In nx, ny In x scale