%! %%%%%%%%%%%% extractable new fattaill utilities %%%%%%%%%%%%% % use with https://www.tinaja.com/glib/fattail2.pdf % and https://www.tinaja.com/glib/fattail2.psl % format tipx tipy arrlen tailoff tipthk tailthk tipsiz tipwid /mt {moveto} store % if Gonzo not used /dot { currentpoint newpath 0.150 0 360 arc fill } def % if Gonzo not used /grab {gsave aload pop /tipsiz exch store % collect data from input array /tipwid exch store /tailthk exch store /tipthk exch store /tailoff exch store /arrlen exch store /body arrlen tipsiz sub store tailoff 0 lt {/tailthk tailthk -1 mul store } if % always down on outside translate } store /showpoint {wantpoints {2 copy save /spsave exch store 5 setwebtint mt dot spsave restore} if} store /wantpoints true store /tailtension 2.5 pop 2 store % default = 2.5 /tiptension 1.5 pop 2 store % default =1.5 use 0.2 for twist! /strarrow { rotate 0 0 mt tipwid 2 div neg tipsiz neg rlineto % draw the point tipwid 0 rlineto closepath fill tipthk 2 div tailoff 0 lt {neg} if % repair negative offset tipsiz neg showpoint mt % position arrow right tipthk 2 div tailoff 0 lt {neg} if % repair negative offset body tiptension div tipsiz add neg showpoint % control 1 tailoff tailthk 2 div add arrlen neg body tailtension div add showpoint % control 2 tailoff tailthk 2 div add arrlen neg showpoint % tail right dest curveto tailthk neg 0 rlineto % tail bottom wantpoints {currentpoint showpoint} if tailoff tailthk 2 div sub arrlen neg body tailtension div add showpoint % control 3 tipthk 2 div neg tailoff 0 lt {neg} if % repair negative offset body tiptension div neg tipsiz sub showpoint % control 4 tipthk 2 div neg tailoff 0 lt {neg} if % repair negative offset tipsiz neg showpoint curveto % position arrow left fill grestore} store % fill arrow body /rtarrow { rotate 0 0 mt tipwid 2 div neg tipsiz neg rlineto % draw the point tipwid 0 rlineto closepath fill tipthk 2 div tipsiz neg showpoint mt % position arrow right tipthk 2 div arrlen tiptension div tipsiz add neg showpoint % control 1 arrlen neg arrlen tiptension div add tailoff tailthk 2 div add neg showpoint % control 2 arrlen neg tailoff tailthk 2 div add neg showpoint % tail lower destt curveto 0 tailthk rlineto wantpoints {currentpoint showpoint} if % tail top dest arrlen neg arrlen tiptension div add tailoff tailthk 2 div sub neg showpoint % control 3 tipthk 2 div neg arrlen tiptension div tipsiz add neg showpoint % control 4 tipthk 2 div neg tipsiz neg showpoint % position arrow left curveto fill grestore} store % fill arrow body % points /ftailsn {grab 0 strarrow} store /ftailew {grab 90 strarrow} store /ftailns {grab -1 1 scale 180 strarrow} store /ftailwe{grab 1 -1 scale -90 strarrow} store /rtailwn {grab 0 rtarrow} store /rtailen {grab -1 1 scale 0 rtarrow} store /rtailws {grab -1 1 scale 180 rtarrow} store /rtailes {grab 180 rtarrow} store /rtailne {grab -90 rtarrow} store /rtailsw {grab 90 rtarrow} store /rtailse {grab -1 1 scale 90 rtarrow} store /rtailnw {grab -1 1 scale -90 rtarrow} store %%%%%%%%%%%%%%%%%