GB/T 15121.1-1994 Information processing systems - Metadata for computer graphics storage and transmission of graphic description information - Part 1: Functional description
Some standard content:
National Standard of the People's Republic of China
Information processing systems--Computer graphics-Metafilefor storage and transfer of picture description informationPart 1; Functional specificationGB/T.15121..1--94
ISO 8632-1-1987
This standard is equivalent to the international standard ISO8632-1-1987 "Information processing systems--Computer graphics-Metafilefor storage and transfer of picture description informationPart 1: Functional specification". 0 IntroductionWww.bzxZ.net
0.1 Purpose
The computer graphics metafile provides a suitable file format for the storage and retrieval of picture information. The file format consists of a set of elements that can be used to describe pictures in a way that is compatible between systems of different structures and between devices with different capabilities and designs. 0.2 Reasons for the Development of this Standard
The main reasons for developing a standard computer graphics metafile are: to enable image information to be stored in an organized manner within a graphics software system; p.
to facilitate the transfer of image information between different graphics software systems; to enable the transfer of image information between graphics devices; to enable the transfer of image information between different computer graphics devices. 0.3 Design Requirements
The following design principles were adopted to achieve the above goals: the metafile should provide a set of elements suitable for transferring a wide range of image information; a.
The metafile should directly contain the more common and basic features available on the graphics device, and b.
access to less common facilities through an escape mechanism;
The design of the metafile should not hinder the future expansion of this standard to cover facilities not currently included; c.
d. GKS (Graphics Kernel System, GB9544) should be enabled to use metatext through metatext input and metatext output functions; for different applications with conflicting requirements in terms of metatext size, generation or interpretation speed, readability, editability and ease of transmission between different transmission mechanisms, this standard should deal with their various requirements. 0.4 Design criteria
The above requirements are used to form the following criteria, which are used to choose between different design possibilities. .Completeness: In any field, the functions specified in this standard should be complete in themselves; a.
b. Conciseness: Avoid redundant elements or parameters; Consistency: Avoid contradictory elements; d. Extensibility: The ability to add new elements and generality to this standard should not be excluded; Approved by the State Administration of Technical Supervision on July 16, 1994 and implemented on March 1, 1995
GB/T 15121.1--94
Accuracy: The minimum results and characteristics of the elements should be well defined; e.
Realizability: Each element should be effectively supported on most host systems and/or graphics hardware; f.
Orthogonality: The elements of the metafile are independent of each other, and their dependencies should be structured and clearly defined; g.
Predictability: This standard should ensure that each standard element used in a recommended or appropriate manner can obtain the correct result; Standard practice: Only those elements that reflect existing practices, are necessary to support existing practices, or are necessary to support the proposed standard are standardized; j. Practicality: The function should be capable enough to complete useful tasks, k. Well-structured: Elements should make minimal assumptions about each other, and an element should have a well-defined interface and a simple, unconditional purpose. Multiple-purpose elements and their side effects should be avoided. 0.5 Metatext Access
Although the primary use of metatext will be for fully sequential access, it is designed so that non-sequential access is possible. Once the basic environment of the metatext is established, individual pictures can be accessed if the media, encodings, and implementation support it. 0.6 Metatext Generation and Interpretation
While this standard describes the expected results of metatext generation and interpretation, it does not describe the specific mechanisms. The basic set of metatext elements includes the ability to append application-dependent data that does not have a graphical meaning, and this standard does not describe the expected interpretation results.
0.7 Distinction between Formal Specification and Encoding
The functionality provided by metatext is separate from the standardization of any particular encoding format. This series of standards specifies standard and private encodings of the elements described in this standard. Annex B (Informative) describes private encoding guidelines. Part 2, Part 3 and Part 4 of this series of standards specify three standard codes respectively. Each standard code can express all the functions described in this standard. The various standardized codes can be converted to each other without losing picture information, although different codes have different quantization precisions, which may not produce exactly the same data stream when interpreting the subsequent code as the original code. The character code specified in Part 2 of this series of standards is used to provide a minimum size code. In the scope of the complete coding system, it follows the code expansion rules specified in GB2311. It is particularly suitable for transmission in networks that do not support binary transmission. The binary code specified in Part 3 of this series of standards provides a code that requires the least amount of work when generated or interpreted on many systems.
The clear text code specified in Part 4 of this series of standards provides a code that can be generated, viewed and edited with a standard text editor. Therefore, it is also suitable for transmission in networks that only support text volume transmission. 0.8 Relationship with other standards
This series of standards fully uses the graphics core system GKS (GB9544) as the model of its graphics system. In addition, the metatext specified in this series of standards can be used by GKS as a still picture capture metatext. The relationship between this series of standards and GKS (i.e., GKS uses a subset of the elements of this series of standards as a still picture capture metatext) will be explained in Appendix E (reference). The character encoding specified in Part 2 of this series of standards follows the code expansion technology specified in GB2311. The binary encoding specified in Part 3 of this series of standards uses the floating point representation mechanism described in ANSI/IEEE754--1986.
For some elements, CGM specifies the value ranges of certain parameters reserved for registration. The meaning of these values will be defined by the registration authority of the graphic item according to the determined procedures (see 4.11). These procedures do not apply to the definition of values or value ranges reserved for special use; no standardized provisions are made for special values or value ranges.
0.9 Notes on appendices
The appendices of this standard are all reference documents.
1 Subject content and scope of application
GB/T 15121.1-94
This series of standards provides a file format suitable for the storage and transmission of picture description information. The file format consists of an ordered collection of elements that can be used to describe pictures in a way that is compatible between systems of different architectures and between devices of different capabilities and designs.
The elements described provide for the representation of a variety of pictures on a variety of graphics device domains. The elements are divided into groups that delimit the main structure (metatext and pictures), determine the representation method used within the metatext, control the display of pictures, perform basic drawing actions, control the properties of basic drawing actions, and provide the ability to access nonstandard devices. The metatext is defined in such a way that access to individual pictures is well specified in addition to sequential access to the entire metatext. Which one is valid in any system using this standard depends on the media, encoding, and implementation. In addition to the functional description, three standard encodings of the metatext syntax are specified. These encodings meet the requirements of applications that require the smallest metatext size, the least amount of work to generate and interpret, and the greatest flexibility. This standard also describes the formal syntax format. The other three parts of this series of standards describe three standardized encodings that follow this syntax: Part 2 describes character encoding, which follows the code extension rules described in GB 2311 within the scope of the complete encoding system, Part 3 describes binary encoding, and Part 4 describes clear text encoding. 2 Referenced standards
GB 1988
Seven-bit coded character set for information interchange
Information processing
GB 2311 Information processing Code extension technology for seven-bit and eight-bit coded character sets GB 9544 Information processing system Computer graphics Functional description of graphics core system (GKS) GB 12054 Registration procedures for data processing escape sequences 3 Terms and abbreviations
3.1 Terms
This standard uses the following terms.
Note: This standard uses generally accepted graphics terms as much as possible. 3.1.1 Aspect ratio
The ratio of the width to the height of a rectangular area such as a window or viewport. For example, an aspect ratio of 2.0 means that the width of the area is twice its height.
3.1.2 Aspect Source Flag (ASF) Aspect SourceFlag acts as an indicator to specify whether a particular attribute is selected as "individual" or "bundled". 3.1.3 Aspects of primitives Methods by which the appearance of a primitive can be changed. Some appearances are controlled directly by the primitive, while others are controlled indirectly through the bundle table.
3.1.4 Attribute elements Metatext elements that describe the appearance of a graphics element. 3.1.5 Bundle
A collection of attributes associated with one of the following graphics element types: line, token, text, and padding. 3.1.6 Bundle indexbundle index
An index into the bundle table for a particular output primitive. 3.1.7 Bundle table
A table of indices consisting of each index representing a collection of attributes. 3.1.8 Clip indicator209
GB/T 15121.1—94
Indicator indicating whether the metatext graphic element is clipped within the clipping rectangle. 3.1.9 Clip rectangle clip rectangle A rectangle defined in VDC (virtual device coordinate system) space that is used as the clipping boundary when the metatext graphic element is clipped. 3.1.10 Clipping
Removes the part of each display element that is outside the given boundary. 3.1.11 Colour selection mode An indicator indicating whether the colour selection is "direct" (described by RGB values) or "indexed" (described by an index in a table of RGB values).
3.1.12 Colour table A table used to map a colour index to a corresponding colour. See 3.1.21 and 3.1.30. 3.1.13 Colour value colourvalue
A value consisting of the RGB (red, green, blue) components that describe a colour. 3.1.14 Computer Graphics Interface (CGI) Computer Graphics Interface Technical specification for the interface used to talk to a graphics device. 3.1.15 Computer Graphics Metafile (CGM) Computer Graphics Metafile Specification for the mechanism for storing and transmitting information describing pictures. 3.1.16 Conjugate Diameter Pair (CDP) Conjugate Diameter Pair It is a pair of diameters D, d of an ellipse such that the end point of one of the diameters is parallel to the tangent to the other diameter. 3.1.17 Control elements control elements Metatext elements used to determine address space, clipping boundaries, picture delimitation, and metatext element description format. 3.1.18 Data interface data interface The interface between a software module and a device that consists of a packet of one or more opcodes and data. It is contrasted with a subroutine interface.
3.1.19 descriptor elements metatext elements that describe the functional content, format, default conditions, identification and characteristics of the metatext. 3.1.20 device driver device driver the device-dependent part of a graphics implementation that supports a physical device and produces device-dependent output. 3.1.21 direct colour direct colour
a mode of colour selection in which colour values are determined directly without the need for an intermediate mapping through a colour table. See 3.1.12 and 3.1.30. 3.1.22 display surface
the part of a graphics device that can display images. For example, a monitor screen, plotter paper. 3.1.23 escape elements escape elements metatext elements that describe those device-dependent or system-dependent elements used to construct images, but which are not otherwise standardized. 3.1.24 external elements metatext elements that convey information not directly related to image generation. 3.1.25 font font
The typeface or style of a character, which is independent of other text attributes such as size, rotation, etc. Fonts are different from character sets. 3.1.26 graphical elements graphical elements Metatext elements that describe images in a metatext. 3.1.27 Graphical Kernel System (GKS) Graphical Kernel System A standardized interface between application programmers and graphics. 3.1.28 graphics device graphicsdevice The device on which images can be displayed. For example, a refresh monitor, a storage tube display, or a plotter. 210
3.1.29 hatch style
GB/T 15121.1—94
The format for filling a closed figure. A hatch style consists of one or more sets of lines that represent the interior of the figure to be filled. 3.1.30 indexed colour indexed colour A colour selection mode that uses a colour index to retrieve a colour value from a colour table. See 3.1.12 and 3.1.21. 3.1.31 message message
A string of characters used to convey information to an operator during metatext interpretation. 3.1.32 metafile
A mechanism for the storage and transfer of graphics data and control information. This information includes device-independent descriptions of one or more images.
3.1.33 Metafile Descriptor (MD) Metafile Descriptor A metafile element used to describe the metatext format (but not its encoding method) and the intended function of a metafile interpreter. 3.1.34 Metafile Element A functional item that can be used to construct images or to transfer information. 3.1.35 Metafile Generator A process or device that generates computer graphics metafiles. 3.1.36 Metafile Interpreter A process or device that reads computer graphics metafiles and interprets their contents. In order to drive a computer graphics interface (CGI) or other device interface to obtain a picture that resembles the intended picture as closely as possible, an interpreter may be required. 3.1.37 Normalized Device Coordinates (NDC) Normalized Device Coordinates Coordinates specified in a device-independent coordinate system and normalized to a range (typically 0.0 to 1.0). See 3.1.46, 3.1.47, 3.1.48, and 3.1.45.
3.1.38 Pattern Style A format for filling a closed shape with a pattern. A pattern style consists of an array of pixels of multiple colors or hatches. 3.1.39 Picture Descriptor (PD) A collection of metafile elements used by PictureDescriptor to set the interpretation of attribute elements for the entire picture. 3.1.40 Pixel
The smallest unit on the viewing surface that can be assigned a color independently. 3.1.41 Realized Edge A zero-width imaginary border of a filled area when the edge is invisible; a finite-width displayed border when the edge is visible.
3.1.42 realized interior The part of a filled area element that extends to and ends at the realized edge. 3.1.43 view surface
See 3.1.22.
3.1.44 virtual device An imaginary graphics device that expresses a set of graphics capabilities to graphics software or a graphics system through the Computer Graphics Interface (CGI). 3.1.45 Virtual Device Coordinates (VDC) Coordinates used to specify locations in VDC space. These are absolute two-dimensional coordinates. See 3.1.48. 3.1.46 VDC extent
The useful rectangular area contained in the VDC area. See 3.1.47 and 3.1.48.3.1.47 VDC range
A rectangular area in VDC space consisting of the set of all coordinates that can be expressed in the encoding format of the declared coordinate type, precision, and metatext. See 3.1.46 and 3.1.48.
3.1.48 VDC space
GB/T 15121.1—94
A two-dimensional Cartesian coordinate space with no precision or range restrictions. Only a subset of the VDC space (VDC range) can be implemented in the metatext. See 3.1.46, 3.1.47 and 3.1.45. 3.2 Abbreviations
The following abbreviations apply to the various parts of this series of standards: ASF
4 Concepts
4.1 Overview
Appearance Source Flag
Conjugate Diameter Pair
Computer Graphics Interface
Computer Graphics Metatext
Graphics Kernel System
Metatext Descriptor
Normalized Device Coordinates
Picture Descriptor
Virtual Device Coordinates
The goal of the computer graphics metatext is to specify the description, storage and transfer of graphics information in a device-independent manner. To this end, this series of standards defines the form (syntax) and functional characteristics (semantics) of the set of elements that may appear in the metatext. The following element types are defined: delimiter elements, which define the valid structure of a metatext; metatext descriptor elements, which describe the functional content, default conditions, flags and characteristics of the CGM; picture descriptor elements, which set the interpretation of attribute elements for each picture; control elements, which enable the modification of picture boundaries and coordinate representations; graphics primitive elements, which describe the visual components of each picture in the CGM; attribute elements, which describe the appearance of graphics primitive elements; escape elements, which describe device-dependent or system-dependent elements used to construct pictures, but are not further standardized;
extrinsic elements, which convey information not directly related to the generation of a graphics image. Computer graphics metatext is a collection of elements from this standardized set. The "metatext start" and "metatext end" elements appear only once each in a complete metatext, and the appearance of other types of elements can be determined as needed. In order to display the picture content of a metatext on a graphics device, it needs to be interpreted. Descriptor elements give the interpreter enough data to interpret the metatext element and make clear provisions for the resources required for display.
Any CGM contains some delimiter elements; in addition, it may include: control elements for metatext interpretation, picture descriptor elements for describing the parameter mode of attribute elements, graphic primitive elements for defining graphic entities, attribute elements for defining the appearance of graphic primitive elements, escape elements for handling non-standard features of specific devices, and external elements for exchanging information outside the CGM picture definition. The minimum correct metatext volume includes a metatext volume descriptor composed of "metatext volume start", "metatext volume version number" and "metatext volume element table" and "metatext volume end".
4.2 Delimiter elements
Each metatext volume starts with a "metatext volume start" element and ends with a "metatext volume end" element. Multiple metatext volumes are allowed to be stored and transmitted together.
Each picture starts with a "picture start" element and ends with a "picture end" element. Between these two delimiter elements, the picture descriptor element is separated from the picture body by a "picture body start" element. Once the metatext volume descriptor element is read, access to individual pictures in a random as opposed to a sequential 212
manner can be done reliably if the encoding, access mechanism, and implementation permit. The "metatext volume start" element and the "picture start" element have name parameters that are used to identify the metatext volume and picture. 4.3 Metatext volume descriptor element
The metatext volume descriptor element (MD) is an element that describes the functional capabilities required for CGM interpretation. The elements are: METAFILE VERSION ||tt | INDEX
COLOUR VALUE EXTENT
METAFILE ELEMENT LIST
METAFILEDEFAULTREPLACEMENT
FONT LIST
CHARACTER SET LIST
CHARACTER CODING ANNOUNCER
Metatext volume version number
Metatext volume description
VDC type
Integer precision
Real precision
Index precision
Color precision
Color index precision
Maximum color index
Color value range
Metatext volume element table
Metatext volume default substitution
Font table
Character set table
Character encoding declaration
In a particular metatext volume, the metatext volume element table lists at least the standardized elements that appear in the metatext volume. This allows the CGM interpreter to know the capabilities required to successfully interpret the CGM metatext volume. The CGM contains a single metatext volume descriptor, which immediately follows the metatext volume start element in a metatext volume (with the possible exception of intervening external elements and escape elements). 4.3.1 Identification
The identification information includes the version description of this series of standards and the source, owner, generation date, etc. of the metatext volume. 4.3.2 Functional Capabilities
The content of CGM is defined by the "Metatext Volume Element Table" element. It contains the control elements, graphic primitive elements and attribute elements used in a metatext volume. Two abbreviated names of CGM elements are provided for use in the metatext volume element table. These abbreviated names should not be regarded as macro names, nor can they be regarded as the level of conformance.
4.3.2.1 Drawing Set
A drawing set contains the mandatory CGM elements (i.e., elements that will appear in every conforming CGM) and most graphics primitive elements and attribute elements. A drawing set is identified by the abbreviated name DRAWINGSET. The elements contained in a drawing set are:
BEGIN METAFILE
END METAFILE
BEGIN PICTURE
BEGIN PICTURE BODY
END PICTURE
METAFILE VERSION
METAFILE DESCRIPTION
VDC TYPE
METAFILE ELEMENT LIST
AUXILIARY COLOUR
TRANSPARENCY
Metatext volume start
Metatext volume end
Picture start
Picture body start
Picture end
Metatext volume version number
Metatext volume description
VDC (virtual device coordinate) type
Metatext volume element table
Secondary color
Transparency
CLIP RECTANGLE
CLIP INDICATOR
VDC EXTENT
BACKGROUND COLOUR
COLOUR SELECTION MODE
POLY LINE
DISJOINT POLY LINE
POLYMARKER
RESTRICTED TEXT
APPEND TEXT | | tt | POINT CLOSE | | tt | COLOUR
MARKER BUNDLE INDEX
MARKER TYPE
MARKER SIZE
MARKER COLOUR
TEXT BUNDLE INDEX
TEXT FONT INDEX
TEXT PRECISION
CHARACTER EXPANSION FACTOR
CHARACTER SPACING
TEXT COLOUR
CHARACTER HEIGHT
CHARACTER ORIENTATION
TEXT PATH
TEXT ALIGNMENT
FILL BUNDLE INDEX
Clipping Rectangle
Clipping Indicator
VDC Range
Background color
Color selection method
Disconnected polyline
Multi-point mark
Restricted text
Supplementary text
Polygon
Polygon set
Pixel array
Generalized drawing primitives
Three-point arc
Three-point closed arc
Central circular arc
Central closed circular arc
Ellipse arc
Closed elliptical arc
Line bundle INDEX
LINE COLOR
TOKEN BUNDLE INDEX
TOKEN TYPE
TOKEN SIZE
TOKEN COLOR
BODY BUNDLE INDEX
BODY FONT INDEX
BODY ACCURACY
CHARACTER EXPANSION FACTOR
CHARACTER SPACING
BODY COLOR
CHARACTER HEIGHT
CHARACTER DIRECTION
BODY PATH
BODY ALIGNMENT
FILLING BUNDLE INDEX
INTERIOR STYLE | | tt | | FILL COLOUR | POINT
PATTERN TABLE
PATTERN SIZE
ASPECT SOURCE FLAGS
ESCAPE
MESSAGE
APPLICATION DATA
4.3.2.2 Drawing plus control set
GB/T 15121. 1-94
Internal Style
Fill Color
Hatch Index
Pattern Index
Edge Bundle Index
Edge Type
Edge Color
Edge Visibility
Fill Reference Point
Pattern Table
Pattern Size
Appearance Source Flags
Application Data
The drawing plus control set can be used to indicate all the elements in the drawing set, plus additional controls, metatext descriptors, picture descriptors, and attribute elements. It is identified by the abbreviated name DRAWINGPLUSCONTROLSET. The elements included in the drawing plus control set are all elements in the drawing set plus the following:INTEGER PRECISION
REAL PRECISION
INDEX PRECISION
COLOUR PRECISION
COLOUR INDEX PRECISION
MAXIMUM COLOUR INDEX
COLOUR VALUE EXTENT
METAFILEDEFAULTSREPLACEMENT
FONT LIST
CHARACTER SET LIST
CHARACTER CODING ANNOUNCER
VDC INTEGER PRECISION
VDC REAL PRECISION
SCALING MODE
LINE WIDTH SPECIFICATION MODEMARKER SIZE SPECIFICATION MODEEDGE WIDTH SPECIFICATION MODECHARACTER SET INDEX
ALTERNATECHARACTERSETINDEX
4.3.3Default metatext state
Integer precision
Real type precision
Index precision
Color precision
Color index precision
Maximum color index
Color value range
Metatext default substitution
Font table
Character set table
Character encoding declaration
VDC integer precision
VDC real type precision
Ratio mode
Line width specification mode
Mark size specification mode
Margin width specification mode
Character set index
Supplementary character set index
The default state is the state to which the interpreter is returned at the beginning of each picture. The default states of all metatext elements are defined in Chapter 6. These default values can be selectively replaced using the "Metatext default substitution" element. The correspondence between the character set index and the registered or special character set and the meaning given to the text font index is also specified by the metatext descriptor. 215
4.4 Image descriptor elements
GB/T 15121.1—-94
Image descriptor elements include: elements that describe the parameter mode of other elements of the entire image, elements that lay out the effective space in the image, and elements that set the color of the image after the viewing surface is cleared at the beginning of the image. These elements are:SCALING MODE
COLOUR SELECTIONMODE
LINE WIDTH SPECIFICATION MODEMARKER SIZE SPECIFICATION MODEEDGE WIDTH SPECIFICATION MODEVDC EXTENT
BACKGROUND COLOUR
Scaling mode
Color selection mode
Line width specification mode
Marker size specification mode
Edge width specification mode
VDC extent
Background color
If included in an image, they will appear after the "image start" element and before the "image body start" element. "Escape" elements and external elements are allowed to appear in the image description part. 4.4.1 Scaling mode
VDC space can be either an abstract space that can be mapped to any size on a physical device or a metric space that will be mapped to a specific size. The "Scale Mode" element allows you to select the mode to use on a per-image basis. This "Scale Mode" element provides a flag to select between abstract or metric space and, when metric space is selected, a scale factor to specify how many millimeters each VDC unit is converted to. 4.4.2 Color Selection Mode
The "Color Selection Mode" element determines whether the image is "indexed" or "direct" (RGB color description, and is further described under the color attribute.
4.4.3 Description Mode
Line width, mark size, and margin width can be described in a variety of ways. For example, line width can be specified as a measure of VDC units, or it can be specified as a scaling factor applied to the device-dependent nominal line width when interpreted. For each attribute element with such multiple modes, there is an associated control element that defines the parameter mode of the attribute element. 4.4.4 VDC Range
There is a metatext element that defines the VDC range. The range is set by the "VDC Range" element by specifying the addresses of the lower left and upper right corners of the range as the observer looks at the image in VDC space. In the CGM element, values outside the VDC range are allowed, which indicates that the visible part of an image is contained within the VDC range. This gives a The frame of the effective area of the picture: the coordinate values in any one dimension can increase or decrease from the lower left corner to the upper right corner. For example, on a device with the upper left corner as the origin, an image can be described with coordinates that map directly to the device; but it can also be displayed correctly on a device with the lower left corner as the origin. Figure 1 illustrates these concepts.
VDC range determines the orientation of VDC space (i.e., the direction of the positive axis (+α) and the positive axis (+y) and whether the positive axis is 90° clockwise or 90° counterclockwise from the positive axis). In particular, the VDC range determines the direction of positive and negative angles as follows: Positive: A 90° angle is defined as the angle from the positive axis to the positive axis (see Figure 1). Note: Some attributes, such as text attributes (e.g., the direction of the vertical vector and basis vectors of the character direction, and the meaning of the enumerated values "right", "left", "up", and "down") are closely related to these definitions. The default state of the range is specified in Chapter 6 and can be changed using the "metatext volume default replacement" element in the MD, such as, at the beginning of each picture, the "VDC The range returns to the default state. 4.4.5 Tailoring of CGM
The ability to determine VDC areas and VDC ranges provides the flexibility to construct metatext addressing capabilities in any desired way. It can be constructed as an abstract, normalized addressing area to achieve maximum device independence. In order to take advantage of the characteristics of a specific device, it can also be constructed to emulate the addressing capabilities of a specific target device. This device-specific metatext addressing area is another normalized addressing area of the normalized range inherent in the VDC element, so device independence is maintained. 216
Lower left corner point
VDC range 0.0, 0.0, 1.0, 0.75
Lower left corner point
VDC range 0.0, 8.5, 11.0, 0.0
GB/T 15121.1—94
y increasing direction
Y increasing direction
Figure 1 VDC range determines the direction of positive and negative angles Upper right corner point
Upper right corner point
This coordinate clipping capability in the metatext volume eliminates the need for coordinate conversion to the target device when the metatext volume is interpreted. The ability to determine the VDC range allows the metatext volume coordinates to be correctly recorded as addressable points on the target graphics device. Using "VDC range\" to encode world coordinates of dynamically large or very small areas may result in performance loss when interpreting the metatext; if this VDC range exceeds the VDC range of the metatext interpreter with smaller capabilities that is compatible with it, it will lead to reduced portability.
In addition to VDC tailoring, a metatext generator can limit or tailor the functional content of a metatext to suit specific devices or applications, and declare such functional tailoring by using the "Metatext Element Table" element. 4.4.6 Background color
Each picture defines a graphic image that is independent of other images in a metatext. The background color of the image can be specified by the picture descriptor 217
GB/T 15121.1-94
element "background color". If this element is not included in the picture descriptor, the background color of the image takes the default background color value, which may be specified as specified in Chapter 6 or in the "Metatext Default Replacement Element". Regardless of the current value of "Color Selection Mode", the parameters of the "Background Color" element are always RGB. If the "Color Selection Mode" element is indexed, then for this picture, "Background Color" defines the initial representation of color index 0. 4.5 Control Elements
Control elements determine the addressing space, clipping boundaries and format specifications of CGM elements. Some format specifications can be controlled by the "Metatext Descriptor Elements", while other controls are completed by control elements that may appear in the picture body of the metatext. For a given metatext, those items of the former type are fixed, while those of the latter type are variable, that is, they can change within a picture. 4.5.1 VDC Space and Area
The graphics primitive elements of a metatext define a virtual image. The coordinates of these elements (i.e., the addressing of points in the image) are absolute two-dimensional virtual device coordinates (VDC). The VDC space is a two-dimensional coordinate space of variable precision and range, and only a subset of the VDC space can be implemented. The VDC region includes all coordinates that can be represented in the format determined by the specified VDC type and (depending on the type) "VDC integer precision" or "VDC real precision". The VDC region cannot be directly configured: it is entirely determined by the "VDC type" and "VDC integer precision" or "VDC real precision" in a metatext volume. These elements are controllable, some by dynamic elements of the metatext volume and some by static elements in the MD. Note that the VDC region defined in this way (a rectangular subregion of the VDC space) does not take continuous values, but discrete values. Regardless of the aspect ratio of the VDC region and the granularity of the region, it is implicitly specified that one VDC unit in the alpha direction and one VDC unit in the direction represent the same distance.
4.5.2 Clipping
In order to delay the clipping of graphic primitive elements (especially extensible elements such as "circle", "three-point arc", "text", etc.) until the meta-text interpretation, a clipping control feature is provided in CGM. Clipping control is obtained by defining a "clip rectangle" in the VDC space. Whether clipping is performed within the clip rectangle during meta-text interpretation is controlled by the "clip indicator" element, which sets the meta-text mode to "on" or "off". The default values of "clip rectangle" and "clip indicator" are listed in Chapter 6. 4.6 Graphics Primitive Elements
Graphics primitive elements are those that describe the visible components of an image. Their coordinate variables are determined in VDC units. CGM provides the following graphics primitive elements:
POLYLINE
DISJOINT POLYLINE
POLYMARKER
RESTRICTED TEXT
APPEND TEXT
POLYGON
POLYGON SET
CELL ARRAY
GENERALIZEDDRAWINGPRIMITIVE(GDP)RECTANGLE
CIRCLE
CIRCULAR ARC 3 POINT
CIRCULAR ARC 3 POINT CLOSE
CIRCULAR ARC CENTRE
CIRCULAR ARC CENTRE CLOSE
ELLIPSE
Disconnected Polyline
Multipoint Notation
Restricted Text
Supplementary Text
Polygon
Polygon Set
Pixel Array
Generalized Drawing Primitives
Three-point Arc
Three-point Closed Arc
Central Arc
Central Closed Arc
Tip: This standard content only shows part of the intercepted content of the complete standard. If you need the complete standard, please go to the top to download the complete standard document for free.