フォーム

form is a self-contained description of any arbitrary geometric graphics, text, or raster graphics that are to be imaged multiple times, either on one page or on several pages. ]]> フォームとは,1個のページ上にも複数のページ上にも繰り返し描画すること のできる,任意の幾何学図形,テキスト又はラスター図形の自己完結した記述と する。

フォームのモデル

RESOURCE DEFINITION, and is bound to the value of an INTERNAL RESOURCE IDENTIFIER in a RESOURCE DECLARATION. ]]> フォームは,資源定義構造要素を介して構造のレベルで定義さ れ, 資源宣言構造要素内で 内部資源識別子構造要素の値に結び付けられる。 フォームの外観は,作画演算子群を実行する手続きによって記述される。 FindResource operator is used in content to obtain a form, which is represented in content by a Form Object, and is imaged by providing the Form Object as an operand to the ExecuteForm operator. ]]> 内容中でフォームを取得するためにFindResoure演算子が用いられる。 フォームは,内容中ではフォームオブジェクトによって表現され, フォームオブジェクトをExecuteForm演算子にオペランドとして 与えることにより描画される。 Form Object type in SPDL; rather the term is used as a convenient term to describe both references to the particular objects of type Dictionary which represent a form and its associated parameters (and are obtained via the FindResource operator) and to the Dictionaries themselves. ]]> SPDLにフォームオブジェクト型という型が存在するわけではない。 そうではなくて,この語は,フォームとその関連パラメータ群を表現する (そしてFindResource演算子を介して取得される)辞書型の特定の オブジェクトへの参照,及びそれらの辞書そのものの両方を示すための 便宜的な用語として用いられる。 すなわち,フォームオブジェクトという語は,辞書参照及び辞書の両方に 用いられる。 どちらを意図して用いられたかは,分脈から明らかとなる。

ExecuteForm operator. ]]> この節の残りの部分では,フォーム辞書の内容及びExecuteForm演算子の 意味について記述する。

フォーム辞書

フォームは,フォームオブジェクトによって表現される。このフォーム オブジェクトは,作画されるべきフォームを完全に記述する規定された内容をもつ フォーム辞書への参照とする。 form coordinate system, which is defined by concatenating the value bound to the Matrix key in the Form Dictionary with the CurrentTransformation each time the Form Objects's PaintProc (the Procedure in the Form Dictionary that images the form) is executed. ]]> フォームは,その固有の座標系であるフォーム座標系内で定義される。 フォーム座標系は,フォーム辞書のPaintProc (フォームの作画を行う フォーム辞書中の手続き)が実行されるたびに,フォーム辞書の中の Matrixキーに結び付けられた値とCurrentTransformation とを連結することによって定義される。 BBox parameter in the Form Dictionary is interpreted in the form coordinate system; the PaintProc is executed in that coordinate system. ]]> フォーム辞書の中のBBoxパラメータは,フォーム座標系内で解釈される。 PaintProcは,この座標系において実行される。

からまでで,フォーム辞書の内容について述べる。 PaintProc (see ). ]]> これから述べる内容に加えて,フォーム辞書は,PaintProc (参照)が 必要とする他の(定数)情報をも含むことができる。

BBox

is a 4-element Vector of type Number specifying the bounding box of the form in the form coordinate system. ]]> 必す(須)のキーと値との対<は,フォーム座標系内でフォームの境界く(矩)形 領域を指定する,数型の4個の要素からなるベクタとする。 この境界く(矩)形領域は,フォームをクリップするのに用いられる。 このベクタの四つの要素は,それぞれ境界く(矩)形領域の左下のx座標,左下のy座標, 右上のx座標及び右上のy座標を指定する。

  • [llx lly urx ury]

    Matrix

    is the Transformation to be concatenated with the CurrentTransformation to produce the Transformation that defines the form coordinate system. ]]> 必す(須)のキーと値との対<は,フォーム座標系を定義する 座標変換を作るためにCurrentTransformationと連結される座標変換とする。

    PaintProc

    specifies the Procedure used to paint the form. ]]> 必す(須)のキーと値との対<は,フォームを描くために用いられる 手続きを指定する。 PaintProc takes one operand ]]> PaintProcは,次に示す1個のオペランドをとり,結果を返さない。 ]]> <

    FormDict is a reference to the Form Dictionary containing PaintProc, and returns no results. ]]> ここで,FormDictは,PaintProcを含むフォーム辞書への参照とする。 PaintProc is to image one instance of the form. ]]> PaintProcを実行すると,そのフォームのインスタンスが1個 描かれる。 PaintProc is described in . ]]> PaintProcのための解釈文脈は,で述べる。

    PaintProc executes the ImageRasterElement or MaskBitMap imaging operators, none of the underlying Data Sources for the operator may be DataSource::Document. ]]> PaintProcがImageRasterElement又はMaskBitMap作画演算子を 実行する場合,その操作に用いられるデータソースは,いずれも DataSource::Documentであってはならない。 FindResource operator to obtain the StreamObject shall occur within PaintProc. ]]> このデータソースのいずれかが外部データソースから引き出されたストリーム オブジェクトである場合,このストリームオブジェクトを得るための FindResource演算子が,PaintProc内部で実行されなければならない。 PaintProc may be executed at unpredictable times and in unpredictable contexts. ]]> 多くの実装では,最近使用されたフォームのキャッシュを管理することによって 実行を最適化することが予想されるので,PaintProcは,予測できない回数 及び文脈のもとで実行される可能性がある。 PaintProc should rely only on the operators in SystemDict, on the contents of its FormDict operand, and the Graphics State Variables not set to their default values according to . ]]> したがって,PaintProcは,SystemDict中の演算子, そのFormDictオペランドの内容,及びでの規定に従って無指定時値に 設定されるもの以外の作図状態変数群にだけ依存するべきである。 PaintProcは,常に同じ結果となるべきである。 PaintProcは,フォームを描画する以外の副作用をもたないようにすべきで ある。

    UniqueID

    is designed to uniquely identify, for caching purposes, a form that is to be used by multiple documents. ]]> 任意選択のキーと値との対<は,キャッシュ処理のために, 複数の文書によって用いられるフォームを一意に識別するために用意されている。 キャッシュの実装において発生し得るメモリ資源の浪費を防ぐため,単一の 文書内で指定されかつ使用されるフォームのフォーム辞書は,このキーを含むべきでは ない。

    Implementation

    is added to the Form Dictionary by the ExecuteForm operator. ]]> キーと値との対<は,ExecuteForm演算子によりフォーム 辞書の中に加えられる。 これは,フォームのキャッシュ処理を補助する情報を保持するために, 実装によって用いられるためのものとする。 このキーの型及び値は,実装依存とする。 Implementation is placed in a Form Dictionary by the TOKENSEQUENCE that defines the Dictionary, its value may be overwritten by the ExecuteForm operator. ]]> Implementationキーをもったキーと値との対が,辞書を定義する トークン列構造要素によってあるフォーム辞書の中に置かれた場合, その値は,ExecuteForm演算子によって書き換えられてもよい。

    内容の中で使用するフォーム辞書の取得

    ExecuteForm operator is obtained via execution of the FindResource operator. ]]> ExecuteForm演算子のオペランドとして用いられるフォームオブジェクトは, FindResource演算子の実行を介して取得される。 FindResource operator takes as an operand an INTERNAL RESOURCE IDENTIFIER that has been previously bound to a Form resource in structure by a RESOURCE DECLARATION, and returns a Form Object. ]]> FindResource演算子は,あらかじめ資源宣言構造要素によって構造中の フォーム資源に結び付けられていた内部資源識別子構造要素をオペランドとし, フォームオブジェクトを返す。 FindResource operator does not examine the Form Dictionary referenced by the Form Object to ensure that the required keys are present and of the correct type; this function is performed by the ExecuteForm operator. ]]> FindResource演算子は,必要なキーが存在し,かつそれらが正しい型である ことを保証するためにフォームオブジェクトによって参照されるフォーム辞書を調べる ことはしない。この機能は,ExecuteForm演算子によって実行される。

    フォームの作画

    ExecuteForm operator, which in turn executes the PaintProc in the Form Objects's Form Dictionary. ]]> フォームは,ExecuteForm演算子の実行を介して作画される。それは,つまり, そのフォームオブジェクトのフォーム辞書中のPaintProcを実行すること となる。 ExecuteForm operator, a document should set appropriate parameters in the graphics state; in particular, it should alter the CurrentTransformation in order to control the position, size, and orientation of the form in User Coordinate Space. ]]> ExecuteForm演算子の実行に先だって,文書は,作図状態の中に適切な パラメータを設定しておくべきである。特に,ユーザ座標空間内におけるフォームの 位置,大きさ及び向きを制御するため,CurrentTransformationを変更すべき である。

    PaintProc, the following Graphics State Variables are reset to their default values (see for the default value for each): ]]> PaintProcの実行に先立って,次に示す作図状態変数群はその無指定時値に リセットされる。(各無指定時値については,参照。)

    • PaintProc in imaging the form. ]]> 上の作図状態変数群の無指定時値以外の値が欲しい場合には, 作図状態変数の値又はその他の情報を表現するための付加的なキーと値との対を フォーム辞書中に定義しておいてもよい。 それらは,フォームの作画に際して,PaintProcによって利用することができる 。

      PaintProc executes is implementation-dependent. ]]> その中でPaintProcが実行される仮想機械の状態の残りの部分は,実装依存と する。 ExecuteForm operator. ]]> 実装によっては,残りの仮想機械の状態の一部またはすべてが,ExecuteForm 演算子実行時の仮想機械の状態から継承されてもよい。

      ExecuteForm operator and its semantics includes the specification of conditions which may cause content exceptions to be raised as a result of interpretation of the operator. ]]> ExecuteForm演算子及びその意味の規定には, この演算子を解釈した結果として内容例外を引き起こすかも知れない 諸条件の規定を含む。 . ]]> 内容例外及び例外処理は,で定義する。 演算子固有の例外に加えて,ほとんど,どの演算子の解釈の際にも発生しうる 共通的な例外がある。 . ]]> このような共通的な例外及びその意味については,で述べる。

      ExecuteForm operator accepts one operand ]]> ExecuteForm演算子は,次に示す1個のオペランドをとる。 ]]> <

      Form Object is obtained via execution of the FindResource operator. ]]> ここで,フォームオブジェクトは,FindResource演算子の実行を介して 取得される。 この演算子は,結果を返さない。 ExecuteForm is defined by the PaintProc Procedure (see ) in the Form Object's Form Dictionary. ]]> ExecuteFormによって生成される図形的出力は,そのフォームオブジェクトの フォーム辞書のPaintProc手続き(参照)によって定義される。 ExecuteForm for the form, ExecuteForm first verifies that the Form Dictionary contains the required keys. ]]> これが,そのフォームに関するExecuteFormの最初の呼び出しである場合, ExecuteFormは,最初にそのフォーム辞書が必要なキー群を含んでいるか どうかを確認する。 Implementation key/value pair (see ) and reduces the access attribute of the Dictionary to at least ReadOnly. ]]> 次に,キーと値との対Implementation (参照)を追加し,そしてこの辞書の アクセス属性を少なくとも読み込み専用まで下げる。 ExecuteForm operator may alter the contents of the Dictionary, the reduction of the access attribute of the Dictionary is performed to prevent subsequent content operators from modifying the contents of the Dictionary. ]]> 実装によっては,ExecuteForm演算子がこの辞書の内容を変更するかも知れない ので,後続の内容演算子が辞書内容を変更することを防ぐために,この辞書の アクセス属性の設定は,下げられる。 ExecuteForm) may reduce the access attribute of the Dictionary to ExecuteOnly. ]]> 実装が(ExecuteFormの実行を介する場合を除き)この辞書の内容に対する その後のいかなるアクセスをも許したくない場合,この辞書のアクセス属性を 実行専用まで下げてもよい。

      ExecuteForm operator, RaiseError shall be invoked with UndefinedKey as its operand. ]]> 必要なキーと値との対のどれかがExecuteForm演算子のフォーム辞書オペランド に欠けている場合,UndefinedKeyをオペランドとしてRaiseErrorが 実行される。

      ExecuteForm may call the PaintProc to image the form. ]]> ExecuteFormは,フォームを作画するためにPaintProcを呼んでもよい。 PaintProc the first time that ExecuteForm is called with a given Form Object and whenever changes to the Graphics State since the last time the PaintProc was called would effect how the form was imaged. ]]> ある与えられたフォームオブジェクトに関して 初めてExecuteFormが呼び出された場合, ExecuteFormは,そのPaintProcを呼び出さなければならない。 さらに,最後にそのフォームのPaintProcが呼び出された後に起こった 作図状態に対する変更がそのフォームの作画のされ方に影響を与える場合には,常に, ExecuteFormは,そのPaintProcを呼び出さなければならない。 CurrentTransformation Graphics State Variable do not effect how the form will be imaged. ]]> CurrentTransformation作図状態変数の平行移動成分が変更されても, フォームの作画のされ方に影響を与えない。 PaintProc Procedure (rather than using a cached representation to image the form), it pushes the Form Object on the operand stack, then performs the equivalent of the following: ]]> ExecuteFormが,(そのフォームを作画するためにキャッシュされた表現を 使用するのではなく)PaintProc手続きを呼び出す必要がある場合,この演算子は, フォームオブジェクトをオペランドスタックに積み,その後,次に示すものと等価な 処理を実行する。

    • SaveGraphicsState to their default values; the code % for this Procedure is obvious. The values of all other % Graphics State Variables are taken from the % inherited Graphics State. ]]>
    • % 次の手続きは、で規定する作図状態変数群をその無指定時値に再設定する。
    • % この手続きのコードは,省略する。
    • % 他のすべての作図状態変数群の値は,継承された作図状態から取られる。
    • SetGStateVariables Matrix % with CurrentTransformation ]]>
    • % フォーム辞書のMatrixをCurrentTransformationに連結する。
    • Dup /Matrix Get Concat
    • % スタックは,フォーム辞書 llx lly urx ury (BBox用)となる。
    • Dup /BBox Get VectorLoad Pop
    • % スタックは,フォーム辞書 llx lly 幅 高さ となる。
    • Exchange 3 Index Subtract
    • Exchange 2 Index Subtract NewPath ]]>
    • % フォームの境界く(矩)形領域をクリップし,NewPathで終了する。
    • RectClip PaintProc ]]>
    • % PaintProcを実行する。
    • Dup /PaintProc Get Execute
    • RestoreGraphicsState PaintProc Procedure is expected to consume the DictionaryReference operand and to execute a sequence of imaging operators to paint the form. ]]> PaintProc手続きは,辞書参照オペランドを使って,そのフォームを描く ための作画演算子列を実行するものと予測される。 PaintProc should depend only on the contents of the Form Dictionary and UserDict plus the Graphics State Variables not set to their default values according to . ]]> PaintProcの実行は,フォーム辞書,に従って無指定時値に設定されるもの 以外の作図状態変数群の内容にだけ依存するべきである。 PaintProc shall always produce the same output, given the same values for the Graphics State Variables not set to their default values according to , independent of the number of times it is called and independent, for example, of the contents of UserDict. ]]> PaintProcは,に従って無指定時値に設定されない作図状態変数群の 値が同じである場合,呼び出し回数,UserDictの内容などには依存せず, 常に同じ出力を生成しなければならない。 ExecuteForm to cause execution of the specified PaintProc. ]]> 文書は,ExecuteFormのどの特定の実行についても,それが指定された PaintProcの実行を引き起こすものと考えるべきではない。

      Form Object is not a reference to a Dictionary obtained via execution of the FindResource operator, RaiseError shall be invoked with UndefinedResource as its operand. ]]> フォームオブジェクトが,FindResource演算子の実行を介して取得された 辞書への参照ではない場合は,UndefinedResourceをそのオペランドとして RaiseErrorを実行する。