[metapost] bug with clip

Anton Petrunin = Антон Петрунин anton-petrunin at tuta.io
Tue Aug 18 04:44:37 CEST 2020


There is a bug with clip that is described here:

https://tex.stackexchange.com/questions/558461/

here is copy of the text:

It seems that 

    clip currentpicture to p;

not only clips the picture to `p`, but also sets its the bounds to somewhat random.

Here is a MWE:

    filenametemplate "%j-%1c.png";
    outputformat := "png";
    beginfig(1);
    save u;
    u:=1cm;
   
    draw (-1,-1)*u--(-10,10)*u--(10,10)*u--cycle withcolor (87, 1mm, -.5bp);
    clip currentpicture to (-10,-10)*u--(-10,0)*u--(10,0)*u--(10,-10)*u--cycle;
   
    endfig;
    end





More information about the metapost mailing list.