Fabrice Couvreur schrieb am 17.02.2021 um 18:40:
Hi,The code works, but is it possible to make it shorter ? Thank you Fabrice
\startuseMPgraphic{DiagonalRule} rulethickness := \frameddimension{rulethickness};
drawoptions( withpen pencircle scaled rulethickness withcolor \MPcolor{\framedparameter{framecolor}});
pair leftcorner, rightcorner, Leftcorner, Rightcorner; leftcorner := (rulethickness, \overlayheight-rulethickness); rightcorner := (\overlaywidth-rulethickness, rulethickness); Leftcorner := ( rulethickness, rulethickness); Rightcorner := (\overlaywidth-rulethickness,\overlayheight-rulethickness);
draw leftcorner -- rightcorner; draw Leftcorner -- Rightcorner; \stopuseMPgraphic
\startuseMPgraphic{DiagonalRule} drawoptions( withpen pencircle scaled OverlayLineWidth withcolor OverlayLineColor ); draw ulcorner OverlayBox -- lrcorner OverlayBox ; draw llcorner OverlayBox -- urcorner OverlayBox ; \stopuseMPgraphic Wolfgang