Question: Do you have any suggestion for better names for these functions?
Since newpath and stroke causes the current point to become undefined I usually define procedures like
/new_path { currentpoint newpath moveto } bind def
/close_stroke { currentpoint closepath stroke moveto } bind def
However these names are really examples of How to write unmaintainable code, and I would rather like to call them something else but cannot come up with any good names (other than maybe something like newpath_without_undefining_currentpoint
and then the benefit of using a procedure is more or less gone).
Searching for existing usage only came up with the following in pdf_ops.ps from ghostscript:
/tn { currentpoint newpath moveto } bdef % Obsolete, never used.
and tn is not exactly a better name.
Edit:
What I mean by having unmaintainable characteristics is that I end up with newpath
and new_path
, both doing the same thing but slightly differently and there is nothing in the names giving anything hints about anything. I know that identifiers often are kept short to save space, but this is not an issue for my hand written files.