strange effect pdfliteral
Can someone explain why in the last example the pdfliteral messes up the spacing \pdfcompresslevel=0 \setupcolors[state=start] \starttext \def\red #1{\pdfliteral {1 0 0 rg}#1\pdfliteral{0 g}} \def\green#1{\pdfliteral {0 1 0 rg}#1\pdfliteral{0 g}} \def\blue #1{\pdfliteral {0 0 1 rg}#1\pdfliteral{0 g}} \dorecurse{25} {\red{red} \green{green} \blue{blue} } \def\red #1{\pdfliteral direct {1 0 0 rg}#1\pdfliteral{0 g}} \def\green#1{\pdfliteral direct {0 1 0 rg}#1\pdfliteral{0 g}} \def\blue #1{\pdfliteral direct {0 0 1 rg}#1\pdfliteral{0 g}} \dorecurse{25} {\red{red} \green{green} \blue{blue} } \def\red #1{\pdfliteral direct {1 0 0 rg} #1\pdfliteral{0 g}} \def\green#1{\pdfliteral direct {0 1 0 rg} #1\pdfliteral{0 g}} \def\blue #1{\pdfliteral direct {0 0 1 rg} #1\pdfliteral{0 g}} \dorecurse{25} {\red{red} \green{green} \blue{blue} } \def\red #1{\pdfliteral direct {1 0 0 rg}#1\pdfliteral direct {0 g}} \def\green#1{\pdfliteral direct {0 1 0 rg}#1\pdfliteral direct {0 g}} \def\blue #1{\pdfliteral direct {0 0 1 rg}#1\pdfliteral direct {0 g}} \dorecurse{25} {\red{red} \green{green} \blue{blue} } \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hans Hagen wrote:
Can someone explain why in the last example the pdfliteral messes up the spacing
I have the impression that \pdfliteral direct {} forgets to take notice of the fact that a skip has been outputted. It rescues this situation at the beginning of each line, so it is probably something that pdf_set_origin() normally does (since that is never called for a 'direct' literal).
participants (2)
-
Hans Hagen
-
Taco Hoekwater