代码如下:
1 import settings; 2 settings.tex = "pdflatex"; 3 pdfviewer="/usr/bin/okular"; 4 outformat="pdf"; 5 texpreamble("\usepackage{CJKutf8}\AtBeginDocument{\begin{CJK}{UTF8}{gbsn}}\AtEndDocument{\clearpage\end{CJK}}"); 6 import roundedpath; 7 8 path A = (0,0)--(0,10)--(5,15)--(10,10)--(10,0)--(0,10)--(10,10)--(0,0)--(10,0); 9 10 draw(roundedpath(A,1),linewidth(0.2));
编译后得到图像如下: