State Variables

Two of the components of the virtual machine are: the Graphics State Variables and the State Variables. The values of these variables form part of the Virtual Machine State. These variables are global in that they can always be referenced from content. The set of Graphics State Variables is the set of state variables whose values are used by imaging operators. The State Variables hold information about the state of the Content Processor. The following subclauses define each state variable, its type, and its initial value at the time the Content Processor is called.

  • The values of these variables are used as implicit operands by many operators. The semantics of such use are specified in the definition of each particular operator. Each subclause below refers, in a NOTE, to the clauses which define these operators and their semantics.
  • Some variables can be set explicitly, some can be queried explicitly, and some can be both set and queried, by operators in content. See the referenced clauses for the existence of operators that perform these functions.
  • Current Black Generation

    The CurrentBlackGeneration Graphics State Variable has a value of type Procedure. Its initial value is implementation-dependent. The CurrentBlackGeneration specifies the function for generating the black component of DeviceCMYK color during a DeviceRGB to DeviceCMYK color conversion. Operators specific to the manipulation of CurrentBlackGeneration are defined in .

    Current Clipping Region

    The CurrentClippingRegion Graphics State Variable describes a region of the page image. Its initial value is a rectangle containing the entire imageable region of the page image as specified in . The CurrentClippingRegion is a part of the imaging model. It determines the area of the medium which can be affected by imaging activities. It is defined in and used throughout to . Operators specific to the manipulation of CurrentClippingRegion are defined in .

    Current Color

    The CurrentColor Graphics State Variable has as its value the specification for the current color/pattern in the current color space. The type and number of component values for this Graphics State Variable depend on the CurrentColorSpace Graphics State Variable. See through for details. Its initial value is <0: Number> (denoting 100% black) in the default color space (see below). The CurrentColor specifies the color to be rendered for all geometric graphics and character text imaging operators, throughout to and , and the color of bitmap raster graphics. The color may be a solid color or a bit mask pattern in the CurrentColorSpace or a pattern which selects its own color space. Changing the color space via the SetColorSpace operator establishes a new CurrentColor. This initial value of CurrentColor for each color space and operators specific to the manipulation of CurrentColor, are defined in and .

    Current Color Rendering

    The CurrentColorRendering Graphics State Variable has a value of type DictionaryReference. Its initial value is implementation-dependent. The CurrentColorRendering specifies the parameters (as a color rendering Dictionary) to the function which converts CIE-related color into device color. Operators specific to the manipulation of CurrentColorRendering are defined in .

    Current Color Space

    The CurrentColorSpace Graphics State Variable has a Color Space Object which is a value of type VectorReference. The initial value is a reference to a single-element Vector that is the result returned by FindResource when applied to an INTERNAL RESOURCE NAME that is declared to be bound to a Color Space resource (see ) for which the Object Name is color-space-family::DeviceGray. The CurrentColorSpace specifies the domain in which colors are specified, and the set of component values used in that specification. If the CurrentColor is a pattern, the referenced Vector specifies the color space underlying the pattern. Operators specific to the manipulation of CurrentColorSpace are defined in and .

    Current Dash Pattern

    The CurrentDashPattern Graphics State Variable has two component values: a reference to a Vector of Numbers and a numerical offset. The initial values are a reference to an empty Vector and an offset of <0: Number>. The CurrentDashPattern specifies the dash feature generated along paths imaged by the StrokePath operator. Operators specific to the manipulation of this state variable are defined in .

    Current Font

    The CurrentFont Graphics State Variable has a value of type IndexedFont. Its initial value is <null: Null>; if an operation which uses the CurrentFont is attempted before a value has been assigned to CurrentFont, RaiseError shall be invoked with InvalidFont as its operand. The operators GetSelectedFont and GetRootFont which only access the value will not invoke RaiseError. The CurrentFont specifies the IndexedFont to be used for all character text imaging operators; see to . Operators specific to the manipulation of CurrentFont are also defined in .

    Current Halftone

    The CurrentHalftone Graphics State Variable has a value of type DictionaryReference. Its initial value is implementation-dependent. The CurrentHalftone specifies the parameters (as a halftone Dictionary) to the halftoning function. Operators specific to the manipulation of CurrentHalftone are defined in Clause 35.

    Current Miter Limit

    The CurrentMiterLimit Graphics State Variable has a value of type Number. Its initial value is <10: Number>. The CurrentMiterLimit is used by the StrokePath operator to determine when a bevel join is used instead of a miter join; see . Operators specific to the manipulation of this state variable are also defined in .

    Current Path

    The CurrentPath Graphics State Variable is a Path. Its initial value is the null path. All points in the CurrentPath are points in the Reference Coordinate System (see ). The CurrentPath is used by operators that image Paths, and manipulated by operators that build Paths; see .

    Current Position

    The CurrentPosition Graphics State Variable is a point in the Reference Coordinate System (see ). The value of the CurrentPosition Graphics State Variable is undefined if and only if the value of the CurrentPath Graphics State Variable is the null path. Otherwise, the value of the CurrentPosition Graphics State Variable is end point of the CurrentPath. The CurrentPosition specifies the location, in RCS coordinates, where the beginning of a character text glyph sequence will be placed for imaging, or starting point of the next path element in a geometric graphics sequence. Operators specific to the manipulation of this state variable are defined in and .

    Current OverPrint

    The CurrentOverPrint Graphics State Variable has a value of type Boolean. Its initial value is false. the CurrentOverPrint Graphics State Variable is used to control painting when generating color separations, something that some presentation devices are able to do. When painting on one separation, false causes the corresponding areas in the other separations to be erased and true leaves them unchanged; see . This can be used to implement trapping, chokes , spreads and grip.

    Current Stroke Adjust

    The CurrentStrokeAdjust Graphics State Variable has a value of type Boolean. Its initial value is implementation-dependent. When a stroke is drawn along a path via execution of the StrokePath operator, the scan conversion algorithms may produce lines of non-uniform thickness due to rasterization effects. The problem of non-uniform thickness lines is especially noticeable on low-resolution devices such as softcopy displays. If the value of CurrentStrokeAdjust is true, the stroke may be adjusted to produce lines of uniform thickness. Operators specific to the manipulation of this state variable are defined in .

    Current Stroke End

    The CurrentStrokeEnd Graphics State Variable has a value of type Cardinal. Its initial value is <0: Cardinal>. The CurrentStrokeEnd specifies the type of end feature applied to path ends imaged by the StrokePath operator. Operators specific to the manipulation of this state variable are defined in .

    Current Stroke Join

    The CurrentStrokeJoin Graphics State Variable has a value of type Cardinal. Its initial value is <0: Cardinal>. The CurrentStrokeJoin specifies the type of join between non-tangential path elements imaged by the StrokePath operator. Operators specific to the manipulation of this state variable are defined in .

    Current Stroke Width

    The CurrentStrokeWidth Graphics State Variable has a value of type Real. Its initial value is <1.0: Real>. The CurrentStrokeWidth specifies, in UCS units, the width of lines imaged by the StrokePath operator. Operators specific to the manipulation of this state variable are defined in .

    Current Transformation

    The CurrentTransformation Graphics State Variable has a value of type Transformation. Its initial value is the Transformation which maps the axes of the UCS to the corresponding axes of the page image RCS as described in , and maps 1 unit in the UCS to 1 unit (1 millimeter) in the RCS. The CurrentTransformation specifies the mapping to be applied to coordinates in the UCS to transform them into coordinates in the RCS. This mapping is defined in , and used throughout to . Operators specific to the manipulation of CurrentTransformation are defined in .

    Current UnderColor Removal

    The CurrentUnderColorRemoval Graphics State Variable has a value of type Procedure. Its initial value is implementation-dependent. The CurrentUnderColorRemoval specifies the function for compensating for black generation by adjusting CMY values during a DeviceRGB to DeviceCMYK color conversion. Operators specific to the manipulation of CurrentUnderColorRemoval are defined in .

    Device Description Dictionary

    The DeviceDescription State Variable has a value of type DictionaryReference. The contents of this ReadOnly Dictionary include at least the key/value pairs described in the following subclauses. The initial values of these mandatory key/value pairs, as well as the keys and values of any additional key/value pairs, are implementation-dependent. The contents of the DeviceDescription make available to document content certain aspects of the current state of the presentation device. The current value of the DeviceDescription DictionaryReference is obtained via execution of the GetDeviceDescription operator described in .

    Process Color Class

    The ProcessColorClass key has a value of type Name. This Name value specifies the colorant model used for rendering process colors in the device. Each ProcessColorClass determines the names of the colorants that are used as keys in a type 5 Halftone Dictionary (see ). These are the process colorant names used to select component Halftone Dictionaries in a type 5 Halftone Dictionary and to control the production of separations. The valid values of ProcessColorClass are as shown in . ValueProcessColorClass DeviceGrayThe presentation device has a single process colorant whose name is Black DeviceKXThe presentation device has two process colorants whose names are Black and Default DeviceRGBThe presentation device has three process colorants whose names are Red, Green and Blue DeviceRGBKThe presentation device has four process colorants whose names are Red, Green, Blue and Black DeviceCMYThe presentation device has three process colorants whose names are Cyan, Magenta and Yellow DeviceCMYKThe presentation device has four process colorants whose names are Cyan, Magenta, Yellow and Black

    Current Resolution

    The current resolution is reported in UCS units per pel. The UCS may be rotated with respect to RCS and the corresponding X and Y axes of the medium. Since the resolution of the underlying device may differ in the X and Y directions of the medium, the current resolution is given in terms of the image in UCS of two resolution vectors defined in RCS. The term "vector" used here refers to its usage in mathematics and not the type Vector defined in this International Standard. These two, the X and Y resolution vectors are oriented parallel to the X and Y axes of RCS, respectively. The magnitudes of the X and Y resolution vectors are the number of RCS units per device pel in the X and Y directions of RCS, respectively. Within the DeviceDescription Dictionary, the key CurrentResolution is bound to a reference to a Vector of four Numbers. The first two are the X and Y coordinates of the X resolution vector in UCS and the last two are the X and Y coordinates of the Y resolution vector. If the value of the first Number of CurrentResolution is cXrX, the value of the second Number of CurrentResolution is cXrY, and the value of the third Number of CurrentResolution is cYrX, then a unit step along the X axis of UCS moves 1/cXrX pels in the X direction of RCS and 1/cYrX pels in the Y direction of RCS. Moving (cXrX,cXrY) units in UCS moves one pel in the direction of the X axis in RCS. This information allows a generator of SPDL to position image elements an integral number of device pels apart so they will render consistently with one another.

    Current Medium Size

    The CurrentMediumSizeX and CurrentMediumSizeY keys each have a value of type Number, and make available to document content the actual size in millimeters of the medium, along the x- and y-axes of the RCS.

    Current Imageable Region

    The keys CurrentImageMinX, CurrentImageMaxX, CurrentImageMinY, and CurrentImageMaxY each have a value of type VectorReference which corresponds to a corner point of the maximum rectangular region of the page image on which imaging is possible. Each Vector has two elements of type Number which are the X and Y coordinates, in UCS, of the corresponding corner point of the imageable region, in RCS. The boundary of the imageable region is typically determined in an implementation of SPDL by taking into account characteristics of the presentation device and the medium upon which the page image is rendered. The coordinates of the imageable region may depend on the positioning of the page image on that medium. In particular, presentation parameters, such as x-image-shift, y-image-shift and plex, may affect the coordinates of the imageable region.