Han-Wen Nienhuys: > On Thu, Jul 21, 2011 at 8:11 AM, Karl Hammar <k...@aspodata.se> wrote: > > Han-Wen Nienhuys: > >> Werner, can you have a look at http://codereview.appspot.com/4819041 ? > > There is no blot on the stack below (as indicated by the comment), > there is; the dup puts it on the stack. The comment indicate the > state after the call.
/draw_round_box % width height x y blot { w h x y b dup w h x y b b 0.0 gt w h x y b a_bool % the a_bool it consumed by the ifelse below { w h x y b setlinewidth % w h x y w h x y 0 setlinecap 1 setlinejoin w h x y rmoveto % b w h w h currentpoint % b w h x1 y1 4 2 roll % b x1 y1 w h 4 copy rectfill rectstroke } { pop % w h x y rmoveto % w h currentpoint % w h x1 y1 4 2 roll % x1 y1 w h rectfill } ifelse } bind def After "dup" there is two "blot"s, "gt" consumes one and "setlinewidth" the other. /// Also if there were a "blot" at "rmoveto" time due to a "dup", it would be at top of stack, not below "w h" as indicated by the comment. /// If it would behave as the comment indicate, then w h x y 0 draw_round_box => - w h x y blot draw_round_box => blot e.i. it would leave a lone "blot" at the top of the stack if it's > 0. Regards, /Karl Hammar ----------------------------------------------------------------------- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden +46 173 140 57 _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel