From: Giuseppe Bilotta <gip.bilotta@iol.it>
To: ntg-context@ntg.nl
Subject: factor=fit images don't fit
Date: Fri, 20 Jul 2007 01:23:14 +0200 [thread overview]
Message-ID: <10310609774.20070720012314@iol.it> (raw)
Hello all,
I have to place a number of images into some given-size
frames in a layer. The images should be scaled
proportionally to fit into the frame. The code I'm working
with is:
\defineframed[framedimg][
frame=on,framecolor=elux,
background=color,
backgroundcolor=white,
width=\wdfig,
height=\htfigone,
offset=overlay,
]
\setlayer[figs][voffset=\nextfigvoff]{%
\framedimg{%
\externalfigure[#1][
factor=fit,
% maxwidth=\wdfig,
% maxheight=\htfigone,
% frame=on,
]%
}%
}%
where \wdfig, \htfigone are the frame size and \nextfigvoff
is the vertical offset which must be placed. I've tried
factor=fit, factor=max, but in both cases I get images which
cross the boundaries of the frame, mostly in the horizontal
direction. If I add the maxwidth/maxheight specification,
images don't get scaled at all.
I would expect factor=fit to scale the image in such a way
that the biggest direction fits into the enclosing box,
while factor=max would scale the image in such a way that
the smallest direction fits into the enclosing box. Instead,
in both cases the vertical direction is being fitted, with
no apparent consideration for the horizontal direction.
What am I doing wrong and what should I do to fix it?
--
Giuseppe "Oblomov" Bilotta
___________________________________________________________________________________
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://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next reply other threads:[~2007-07-19 23:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-19 23:23 Giuseppe Bilotta [this message]
2007-07-20 11:05 ` Giuseppe Bilotta
2007-07-21 20:30 ` Brian R. Landy
2007-07-22 8:15 ` Giuseppe Bilotta
2007-07-22 20:47 ` Hans Hagen
2007-07-23 7:33 ` luigi scarso
2007-07-24 6:58 ` Giuseppe Bilotta
2007-07-24 7:27 ` Giuseppe Bilotta
2007-07-24 7:54 ` Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=10310609774.20070720012314@iol.it \
--to=gip.bilotta@iol.it \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).