(Herbert): use inBP rather than inPixels + further manipulation as this

prevents rounding errors.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4102 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2002-05-01 10:38:31 +00:00
parent c72a67965a
commit 7d3e67edc5
2 changed files with 7 additions and 8 deletions

View File

@ -1,3 +1,8 @@
2002-05-01 Herbert Voss <voss@lyx.org>
* GraphicsParams.C (GParams c-tor): use LyXLength::inBP rather than
LyXLength::inPixels + scaling factor.
2002-04-28 John Levon <moz@compsoc.man.ac.uk>
* GraphicsImageXPM.C: understand convert's use of "opaque"

View File

@ -103,15 +103,9 @@ GParams::GParams(InsetGraphicsParams const & iparams, string const & filepath)
} else if (iparams.lyxsize_type == InsetGraphicsParams::WH) {
if (!iparams.lyxwidth.zero())
width = iparams.lyxwidth.inPixels(1, 1);
width = iparams.lyxwidth.inBP();
if (!iparams.lyxheight.zero())
height = iparams.lyxheight.inPixels(1, 1);
// inPixels returns a value scaled by lyxrc.zoom.
// We want, therefore, to undo this.
double const scaling_factor = 100.0 / double(lyxrc.zoom);
width = uint(scaling_factor * width);
height = uint(scaling_factor * height);
height = iparams.lyxheight.inBP();
}
}