settings.tex="pdflatex"; // This command is very important!
unitsize(1cm);
// PNG file
label(graphic("image2.png" ,"width=3cm"),(0,0)); // in the same folder.
draw(box((-3,-3),(3,3)));
// JPG file
label(graphic("image1.jpg" ,"width=3cm"),(5,0));
// Asymptote code
picture pic;
unitsize(pic,1cm);
draw(pic,Label("Some texts",Relative(.75)),circle((0,0),1));
add(pic.fit(),(9,0));
// PDF file
label(graphic("image4.pdf" ,"width=3cm"),(15,0));
layer();
// The layer() function can be used to force future objects to be
// drawn on top of the included image
draw(scale(.5)*Label("Some text",LeftSide),(0,0)--(5,0),Arrow,Margin(.5cm,.45cm));
draw(scale(.5)*Label("Some text",LeftSide),(5,0)--(9,0),Arrow,Margin(.35cm,.35cm));
draw(scale(.5)*Label("Some text",LeftSide),(9,0)--(15,0),Arrow,Margin(.4cm,.5cm));
shipout(bbox(2mm,Fill(white)));
问题:
我如何确定图形(左下角和右上角)的位置(成对)currentpicture
?
(可以替换两张不同的图片)