mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
(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:
parent
c72a67965a
commit
7d3e67edc5
@ -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>
|
2002-04-28 John Levon <moz@compsoc.man.ac.uk>
|
||||||
|
|
||||||
* GraphicsImageXPM.C: understand convert's use of "opaque"
|
* GraphicsImageXPM.C: understand convert's use of "opaque"
|
||||||
|
@ -103,15 +103,9 @@ GParams::GParams(InsetGraphicsParams const & iparams, string const & filepath)
|
|||||||
|
|
||||||
} else if (iparams.lyxsize_type == InsetGraphicsParams::WH) {
|
} else if (iparams.lyxsize_type == InsetGraphicsParams::WH) {
|
||||||
if (!iparams.lyxwidth.zero())
|
if (!iparams.lyxwidth.zero())
|
||||||
width = iparams.lyxwidth.inPixels(1, 1);
|
width = iparams.lyxwidth.inBP();
|
||||||
if (!iparams.lyxheight.zero())
|
if (!iparams.lyxheight.zero())
|
||||||
height = iparams.lyxheight.inPixels(1, 1);
|
height = iparams.lyxheight.inBP();
|
||||||
|
|
||||||
// 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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user