[NTG-context] Scale image in MetaPost, maintaining aspect ratio
Hans Hagen
j.hagen at xs4all.nl
Sat Jul 7 22:27:51 CEST 2018
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
xsized 5cm
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
More information about the ntg-context
mailing list