Analyzing screens
This page applies to Harlequin v13.1r0 and later; both Harlequin Core and Harlequin MultiRIP.
When writing PostScript-language constructs (for instance to be used as a preface to a job) which use currentscreen
or currenthalftone
, you should be careful to cover all the variations that these operators can produce, even though this is quite complex. It is usually easier to use currenthalftone
since this limits the number of different cases, but each of the halftone types has still to be considered.
A useful construct for doing this is the PostScript-language equivalent of a C language switch
statement:
currenthalftone {
{ ... } % procedure to deal with type 1
{ ... } % type 2
{ ... } % type 3
{ ... } % type 4
{ % type 5 must consider the subordinate types when relevant
{
dup type /dicttype eq {
{ {...} { ...} ... }
% cases for subordinate dictionaries
1 index /HalftoneType get 1 sub get exec
}{
pop pop
} ifelse
} forall
}
{ ... } % type 6
null % type 7 unused
null % type 8 unused
null % type 9 unused
{ ... } % type 10
}
1 index /HalftoneType get
sub % indexing starts at 0
get exec