Command in PostScript
Encapsulate a drawing operation as a macro token to be executed or queued.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Command
ARCANUM SCHOOL: Enchantment // Macro Binding
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
% Command in PostScript
/DrawMacro <<
/cmds [
{ (Binding X coordinates...\n) print }
{ (Binding Y coordinates...\n) print }
{ (Applying Stroke\n) print }
]
/execute { dup /cmds get { exec } forall }
>> def
DrawMacro /execute get exec
Command: Macro Encapsulation
The raw incantations of moving and drawing paths can clutter the high-level logic of a spell. By binding these raw executable arrays into a Command dictionary, you encapsulate the action. This macro can then be passed around, stored in an array, or triggered repeatedly by different invocation triggers.
Runic Tags:
#postscript
#print-daemon
#behavioral
#command