What does the .fit() method of a picture do in the following Asymptote code?
picture pic1; real size=50; size(pic1,size); fill(pic1,(0,0)--(50,100)--(100,0)--cycle,red); picture pic2; size(pic2,size); fill(pic2,unitcircle,green); picture pic3; size(pic3,size); fill(pic3,unitsquare,blue); picture pic; add(pic,pic1.fit(),(0,0),N); add(pic,pic2.fit(),(0,0),10S); add(pic.fit(),(0,0),N); add(pic3.fit(),(0,0),10S);
This is from the manual of Asymptote: http://asymptote.sourceforge.net/doc/Frames-and-pictures.html
The result is
.fit() method the code fails with the error
fun.asy: 15.4: no matching function 'add(picture, picture, pair, pair)'
The function does not seem to be documented anywhere. There is however a cryptic comment on that same page dealing with fitting pictures to frames which says
A picture pic can be explicitly fit to a frame by calling
frame pic.fit(real xsize=pic.xsize, real ysize=pic.ysize, bool keepAspect=pic.keepAspect);
I am not sure I understand this properly. Is there a simple example which can explain the behaviour of this function?