Re: [NTG-context] Scale image in MetaPost, maintaining aspect ratio

2018-07-08 Thread Alan Braslau
On Sun, 8 Jul 2018 11:21:55 +0200 Hans Hagen wrote: > the "externalfigure" variant is an old one that had to deal with > dimensions in a way that avoids overflows > > in a future context (read luatex 1.09+) we go one-pass-mp so we can > have a different approach (i never wanted to add a ton of

Re: [NTG-context] Scale image in MetaPost, maintaining aspect ratio

2018-07-08 Thread Hans Hagen
On 7/8/2018 11:02 AM, Marco Patzer wrote: On Sun, 8 Jul 2018 10:39:52 +0200 Hans Hagen wrote: On 7/8/2018 1:45 AM, Marco Patzer wrote: On Sat, 7 Jul 2018 14:27:38 -0600 Alan Braslau wrote: For "historic" reasons, draw externalfigure "cow" scaled 5cm ; normalizes the figure to a

Re: [NTG-context] Scale image in MetaPost, maintaining aspect ratio

2018-07-08 Thread Marco Patzer
On Sun, 8 Jul 2018 10:39:52 +0200 Hans Hagen wrote: > On 7/8/2018 1:45 AM, Marco Patzer wrote: > > On Sat, 7 Jul 2018 14:27:38 -0600 > > Alan Braslau wrote: > > > >> For "historic" reasons, > >> draw externalfigure "cow" scaled 5cm ; > >> normalizes the figure to a square. This will not

Re: [NTG-context] Scale image in MetaPost, maintaining aspect ratio

2018-07-08 Thread Hans Hagen
On 7/8/2018 1:45 AM, Marco Patzer wrote: On Sat, 7 Jul 2018 14:27:38 -0600 Alan Braslau wrote: For "historic" reasons, draw externalfigure "cow" scaled 5cm ; normalizes the figure to a square. This will not be changed as it is a very old feature of MetaFun. The solution is draw

Re: [NTG-context] Scale image in MetaPost, maintaining aspect ratio

2018-07-07 Thread Marco Patzer
On Sat, 7 Jul 2018 14:27:38 -0600 Alan Braslau wrote: > For "historic" reasons, > draw externalfigure "cow" scaled 5cm ; > normalizes the figure to a square. This will not be changed as it is a > very old feature of MetaFun. > > The solution is > draw rawtextext("\externalfigure[cow]")

Re: [NTG-context] Scale image in MetaPost, maintaining aspect ratio

2018-07-07 Thread Marco Patzer
On Sat, 7 Jul 2018 22:27:51 +0200 Hans Hagen 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] > >

Re: [NTG-context] Scale image in MetaPost, maintaining aspect ratio

2018-07-07 Thread Hans Hagen
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

Re: [NTG-context] Scale image in MetaPost, maintaining aspect ratio

2018-07-07 Thread Alan Braslau
On Sat, 7 Jul 2018 20:58:40 +0200 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] > >