Skip to main content
Skip table of contents

Halftone dictionary keys


This page applies to Harlequin v13.1r0 and later; both Harlequin Core and Harlequin MultiRIP.

sethalftone takes a dictionary operand with a large number of possibilities for its contents.

The keys to control overriding of halftone screens and their frequencies and angles are not specific to color separation. Used in conjunction with the OverrideSpotFunctionName and OverrideFrequency system parameters and the DefaultScreenAngles page device keys, a great degree of control can be exercised over which parts of a screen are derived from a job and which from the system.

The Override key in a halftone dictionary is different from the others. It suppresses all activity of subsequent screening operators at the same or higher levels of the graphics stack, whereas the other keys change the behavior of those operators.

The following example illustrates the use of Override:.

TEXT
            gsave
            << /HalftoneType 1 /Override 1 ... >> sethalftone % acted on
            ...
            f a /p load setscreen % ignored
            ...
            << /HalftoneType 1 /Override 2 ... >> sethalftone % acted on
            ...
            << .HalftoneType 1 /Override 1 ... >> sethalftone % ignored
            ...
            grestore
            f a /p load setscreen % acted on

The following section lists extensions to halftone dictionaries; of course, the RIP also supports all the usual keys, as found in [RB2].

HalftoneName (halftone dictionary)

name or string Default: ()

Supplies a name for the halftone (or in the case of type 5 for the whole set of screens) defined by the halftone dictionary. This is used to identify the screen when it is used to override the job’s screen with OverrideSpotFunctionName and indirectly in the screening dialog in GUI versions of the RIP. It is also used to name screen caches on disk, and in selecting from color rendering resources.

OverrideFrequency (halftone dictionary)

Boolean Default: true

Applies only to spot function screens.

When true, or not present (which would normally be the case when a halftone dictionary is provided by a job), the frequency of a spot function screen can be overridden by the OverrideFrequency system parameter if set. If false, the OverrideFrequency system parameter is ignored for this screen.

If OverrideFrequency is applied to a type 5 halftone dictionary, it also applies to its subordinate dictionaries unless they too supply their own OverrideFrequency key.

DetectSeparation (halftone dictionary)

Boolean Default: true

Turns on or off the facility to detect the intended color of each separation of a pre-separated job, by setting the system parameter Separation (q.v.).

The /DetectSeparation key is deprecated. You can still specify a /DetectSeparation key in a halftone dictionary, but whether you do or not, or whatever the value, the RIP always behaves as if it is specified as true.

InheritFrequency (halftone dictionary)

Boolean Default: true

Applies only to spot function screens.

When true or not present (and the frequency has not already been determined by the OverrideFrequency key and system parameter as described above), the frequency of the screen is determined by the job rather than the Frequency key of the halftone dictionary.

If false (and no OverrideFrequency has been applied), the Frequency in the halftone dictionary will be used. This is also the case irrespective of the setting of InheritFrequency if the job did not supply a frequency: for example, if it set a threshold screen.

(Of course, if the halftone is supplied in a job, these are the same thing; the key is intended for use where a halftone dictionary is provided using the OverrideSpotFunctionName system parameter as described in Deciding which screen properties to use.

If InheritFrequency is applied to a type 5 halftone dictionary, it also applies to its subordinate dictionaries unless they too supply their own InheritFrequency key.

OverrideAngle (halftone dictionary)

Boolean Default: true

Applies only to spot function screens.

When true, or not present (which would normally be the case when a halftone dictionary is provided by a job), the angle of a spot function screen can be overridden by entries containing a true Override key in the appropriate DefaultScreenAngles page device key dictionary (see Default screen page device keys) or alternatively the obsolete OverrideAngle system parameter, if set. If false, overriding angles are ignored for this screen.

If OverrideAngle is applied to a type 5 halftone dictionary, it also applies to its subordinate dictionaries unless they too supply their own OverrideAngle key.

InheritAngle (halftone dictionary)

Boolean Default: true

Applies only to spot function screens.

When true or not present (and the angle has not already been determined by DefaultScreenAngles or OverrideAngle as described above), the angle of the screen is determined by the job rather than the Angle key of the halftone dictionary.

If false (and no overriding DefaultScreenAngles entry or OverrideAngle system parameter has been applied), the Angle in the halftone dictionary is used. This is also the case irrespective of the setting of InheritAngle if the job did not supply an angle (for example, if it set a threshold screen).

If InheritAngle is applied to a type 5 halftone dictionary, it also applies to its subordinate dictionaries unless they too supply their own InheritAngle key.

DoubleScreens (halftone dictionary)

Boolean 

Default: false

Applies only to spot function screens (types 1, 2, and 5 when subordinates are type 1).

Causes a conventional spot function to be applied in each quarter of a 2x2 super-cell so that a screen dot grows from four centers instead of one. See Spot function names.

ScreenExtraGrays (halftone dictionary)

Boolean Default: false

Applies only to threshold screens of types 3, 6 and 10.

This key modifies the way the threshold table is used in order to increase the number of gray levels available. If the system parameter ScreenExtraGrays is true, it overrides this key, and extra grays are enabled. This override doesn't apply to multi-bit screens specified with the Depth key.

When extra grays are enabled, the values of the thresholds are ignored, they only provide the order for the screen. So, where there are duplicate entries in the threshold array, dots in the halftone cell continue to be filled in one-by-one as the gray level increases, rather than appearing all at once at the next threshold.

Also, the system parameter ScreenLevels is applied, meaning that if the cell would contain more pixels than ScreenLevels is allowing gray levels, some gray levels are not produced at all, saving significantly on memory.

Now that 16-bit thresholds are available do not use ScreenExtraGrays. If you require more than 256 levels of gray you should use 16-bit thresholds instead.

Override (halftone dictionary)

Integer  

Default: n/a

An integer specifying the override level. If it is present, then this call of sethalftone causes any subsequent uses of sethalftone at the same or a deeper save level to be ignored, unless they specify a higher override level.

If sethalftone is called with a type 5 halftone dictionary as argument, any /Override value should appear in the type 5 dictionary itself rather than the type 1 dictionaries it contains, otherwise the results are undefined.

TransferFunction (halftone dictionary)

procedure or array

Default: {}

The definition of the TransferFunction keyword has been extended in the RIP to allow literal array values and dictionaries. When the value is an executable array (procedure), the transfer function is applied as normal, but when literal, the array is interpreted as a set of numeric values to which interpolation is applied. Details are given in Calibration array details.

Dictionaries represent PS functions.

Not all types support this key. Transfer functions are always attached to a dictionary that actually defines halftoning patterns (that is, types 1, 3, 6, 10, 16, 100, 116, or 1009).

ScreenChanges (halftone dictionary)

procedure 

Default: {}

Applies to type 1 halftone dictionaries in version 5.0 and later, at language level 3.

When set, the value should be a procedure which takes frequency and angle from the stack, uses these operands, and leaves a new frequency and angle on the stack. The frequency and angle are passed after all other processing has been done, so the operands may be override values set from the screening controls in the user interface if appropriate, rather than taken directly from the halftone dictionary. The intent is to allow simple adjustments of frequency and angle from PostScript code.

LimitScreenLevels

boolean  

Default: true

This key decides whether the ScreenLevels system parameter is applied or not.

This key is only used in type 16; for other types, ScreenLevels is applied unconditionally.

Depth (halftone dictionary)

This section applies to Harlequin v13.1r0 and later; and to Harlequin Core but not Harlequin MultiRIP.

integer

Default: 1

(Optional) This specifies the bit depth of the raster that the screen is designed for. The value must be an integer that is a power of 2. The default, 1, is a standard PostScript language halftone, which can be used at any bit depth. If it is not 1, the /Thresholds argument is expected to be 2n -1 times longer, to provide data for a table for each tone from 0 (black/solid) to 2n -2. Such a halftone only works when the output raster is of the same depth.

For more information see ValuesPerComponent in pagedevice keys.

To render a device pixel at some tone level, the threshold tables are consulted from the lowest to the highest: If the requested level is less than the threshold value, paint the pixel with the tone corresponding to that table; otherwise, consult the rest of the tables; if it is higher than or equal to even the value in the highest table, paint it white/clear. This means that these screens are monotonic (a pixel never goes blacker when the tint increases). The threshold tables should also be monotonic. The threshold value for any pixel must never be lower in a higher table, or the output is not as expected.

This key is only supported in HHR and not HMR, and from v11.0r5 the “MLS-Depth” license feature is required to use it.

Invert (halftone dictionary)

Boolean 

Default: false

(Optional) The sense of the thresholds can be inverted by specifying the /Invert key with the value true. This is convenient for tables that have been built for screening algorithms with contone input, where the sense of the color values is opposite.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.