メインコンテンツまでスキップ

付録 A: GKSM メタファイル (その 2)

E.4 メタファイルの解釈​

E.4.1 はじめに​

GKS におけるメタファイルの解釈は [14] の 4.9 に記述されている。あらゆる種類のメタファイル項目に対する INTERPRET ITEM の効果を、以下の各節で説明する。項目は機能のクラスごとにまとめている。

E.4.2 制御項目​

このクラスの項目の解釈は、E.5 の各項目の定義のなかで記述している。([14] には「E.5」ではなく「E.2.4」と書かれているが、これは誤りだと考える。)

E.4.3 出力プリミティブ​

このクラスの項目を解釈すると、プリミティブ関数に対応する出力が生成される。ただし、点の座標は NDC で表される。プリミティブに結び付けられるプリミティブ属性は、このメタファイルにおけるプリミティブ属性項目の解釈に由来するものである (E.4.4 を参照)。

E.4.4 出力プリミティブ属性​

このクラスの項目を解釈すると、以後このメタファイルから生じるプリミティブの表示に使う値が設定される (E.4.3 を参照)。GKS 状態リストのエントリは変更されない。

E.4.5 ワークステーション属性​

このクラスの項目を解釈すると、表 E1 に示す対応する GKS 関数を呼び出した場合と同じ効果が得られる。GKS 関数は、すべての活性ワークステーションに対して実行される。

E.4.6 変換​

クリッピング矩形項目を解釈すると、以後このメタファイルから生じる出力プリミティブのクリッピングに使う値が設定される。GKS 状態リストのエントリは変更されない。このクラスのその他の項目 (WORKSTATION WINDOW と WORKSTATION VIEWPORT) を解釈すると、すべての活性ワークステーションで、対応する GKS 関数が呼び出される。

E.4.7 セグメント操作​

このクラスの項目を解釈すると、表 E1 に示す対応する GKS 関数を呼び出した場合と同じ効果が得られる。(項目 84 は DELETE SEGMENT の呼び出しを引き起こす。)

E.4.8 セグメント属性​

このクラスの項目を解釈すると、表 E1 に示す対応する GKS 関数を呼び出した場合と同じ効果が得られる。

E.5 制御項目​

FILE HEADER

   | GKSM | N | D | V | H | T | L | I | R | F | RI | ZERO | ONE |

All fields in the file header item have fixed length.  Numbers are
formated according to ISO 6093 - Format F1.

General Information:

GKSM    4 bytes   containing string 'GKSM'
N       40 bytes  containing name of author/installation
D       8 bytes   date (year/month/day, e.g., 79/12/31)
V       2 bytes   version number: the metafile described here has
                  version number 1
H       2 bytes   integer specifying how many bytes of the string 'GKSM'
                  are repeated at the beginning of each record.
                  Possible values:  0, 1, 2, 3, 4

T       2 bytes   length of item type indicator field
L       2 bytes   length of item data record length indicator field
I       2 bytes   length of field for each integer in the
                  item data record (applied to all data marked (i)
                  in the item description)
R       2 bytes   length of field for each real in the item data record
                  (applies to all data marked (r) in the item
                  description).

Specification of Number Representation:

F       2 bytes   Possible values:  1, 2.  This applies to all data
                  in the items marked (i) or (r) and to item type
                  and item data record length:
                  1:  all numbers are formatted according to ISO 6093
                  2:  all numbers (except in the file header) are
                  stored in an internal binary format
RI      2 bytes   Possible values:  1, 2.  This is the number
                  representation for data marked (r):
                  1 = real, 2 = integer
ZERO    11 bytes  integer equivalent to 0.0, if RI = 2
ONE     11 bytes  integer equivalent to 1.0, if RI = 2

   After the file header, which is in fixed format, all values in
   the following items are in the format defined by the file
   header. For the following description, the setting:

                    H = 4; T = 3; F = 1

   is assumed. In addition to formats (c), (i) and (r), which are
   already described, (p) denotes a point represented by a pair of
   real numbers (2r). The notation allows the single letter to be
   preceded by an expression, indicating the number of values of
   that type.

   {Explanatory comments have been added to some item
   specifications; these are not part of the GKS Appendix E and
   they are enclosed in braces {}. A complete definition of the
   generation and interpretation of the GKSM items is given by the
   definition of the corresponding GKS functions [14].}

END ITEM

   | 'GKSM 0' | L |

   Last item of every GKS Metafile. Sets condition for the error.

CLEAR WORKSTATION

   | 'GKSM 1' | L | C |

   Requests CLEAR WORKSTATION on all active workstations.

   C(i):  clearing control flag
          (0 = CONDITIONAL, 1 = ALWAYS)

REDRAW ALL SEGMENTS ON WORKSTATION

   | 'GKSM  3' | L | R |

   Requests UPDATE WORKSTATION on all active workstations.

   R(i):  regeneration flag
          (0 = PERFORM, 1 = SUSPEND)

DEFERRAL STATE

   | 'GKSM  4' | L | D | R |

   Requests SET DEFERRAL STATE on all active workstations.

   D(i): deferral mode
         (0 = ASAP, 1 = BNIG, 2 = BNIL, 3 = ASTI)

   R(i):  implicit regeneration mode
          (0 = ALLOWED, 1 = SUPPRESSED)

   {This item provides control over the occurrence of the visual
   effect of GKS functions in order to optimize the use of
   workstation capabilities according to application needs.}

MESSAGE

   | 'GKSM  5' | L | N | T |

   Requests MESSAGE on all active workstations.
   N(i):   number of characters in string
   T(Nc):  string with N characters.

   {The message is not part of a metafile output primitives; the
   message is only for interpretation by workstation operators.}

ESCAPE

   | 'GKSM  6' | L | FI | L | M | I | R |

   Requests ESCAPE

   FI(i):  function identifier
   L(i):   length of integer data in data record
   M(i):   length of real data in data record
   I(Li):  integer data
   R(Mr):  real data.

   {This item permits the invocation of a specific non-standard
   escape function FI. The execution of the function with the
   given parameters must not alter the GKS state list nor produce
   geometrical output.}