On Sat, 7 Jul 2018 22:27:51 +0200 Hans Hagen <j.ha...@xs4all.nl> wrote:
> On 7/7/2018 8:58 PM, Marco Patzer wrote: > > Hi! > > > > How to scale an image in MetaPost, maintaining the aspect ratio > > (without specifying the height explicitly)? > > > > Example: > > > > \setupexternalfigures [location=default] > > \starttext > > \externalfigure [cow][width=5cm] > > > > \startMPcode > > draw externalfigure "cow" scaled 5cm; > > \stopMPcode > > \stoptext > it's all in the metafun manual No doubts about that. It's more a matter of knowing what to search for. > xsized 5cm I tried it, same result - square image: draw externalfigure "cow" xsized 5cm; As Alan mentioned including the image with textext() works. Not as elegant, but it gets the job done. Marco ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________