Hi all, [maybe this is a bit off topic and you think that the Metapost mailing list is the right place for such stuff. But I have quit this list quite some time ago, as there was more spam than regular posts. Try to forgive me... :D ] After buying the 'Metafont' manual, I'm now playing around with some mp macro programming. The problem in the attached example is, that the 'draw' variants of the [hv]line macro always work with a *fixed* pen size of 1pt (and I can't figure out why). I'm clueless.. Greetings, Peter \setupoutput[pdftex] \setupcolors[state=start] \starttext \startMPinclusions % default unit u:= .5 ; % u:=1 works, u:=2 doesn't pen upen ; upen = makepen(unitsquare scaled u shifted -(.5u,.5u)) ; % width, height, shift-x, shift-y, color def fill_square(expr w,h,a,b,c)= fill unitsquare xyscaled(w*u,h*u) shifted (a*u,b*u) withcolor c enddef ; def fill_hline(expr w,a,b,c)= fill_square(w,u,a,b,c) enddef ; def fill_vline(expr h,a,b,c)= fill_square(u,h,a,b,c) enddef ; % the drawing macros always use a pen of 1pt ; % even with an extra defined pen def draw_hline(expr w,a,b,c)= draw (.5u,.5u)--(w*u-.5u,.5u) withpen upen shifted (a*u,b*u) withcolor c enddef ; def draw_vline(expr h,a,b,c)= draw (.5u,.5u)--(.5u,h*u-.5u) withpen pensquare scaled u shifted (a*u,b*u) withcolor c enddef ; def draw_frame(expr w,h,a,b,c)= draw (.5u,.5u)--(w*u-.5u,.5u)--(w*u-.5u,h*u-.5u)--(.5u,h*u-.5u)--cycle withpen pensquare scaled u shifted (a*u,b*u) withcolor c enddef ; \stopMPinclusions \startMPpage fill_hline(20,5,5,red) ; fill_vline(20,5,5,red) ; draw_vline(20,5,25,blue) ; draw_hline(20,25,5,blue) ; draw_frame(50,50,0,0,black) ; \stopMPpage \stoptext