From c83a7a13b8f20f22d5b125347264c1b120b1f3d8 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Wed, 1 May 2002 11:12:02 +0000 Subject: [PATCH] Revert previous change as it's bollocks. Herbert, your infallibility is no-more ;-) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4103 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/graphics/ChangeLog | 5 ----- src/graphics/GraphicsParams.C | 10 ++++++++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/graphics/ChangeLog b/src/graphics/ChangeLog index 4f4717f1b4..6f4eb7b79a 100644 --- a/src/graphics/ChangeLog +++ b/src/graphics/ChangeLog @@ -1,8 +1,3 @@ -2002-05-01 Herbert Voss - - * GraphicsParams.C (GParams c-tor): use LyXLength::inBP rather than - LyXLength::inPixels + scaling factor. - 2002-04-28 John Levon * GraphicsImageXPM.C: understand convert's use of "opaque" diff --git a/src/graphics/GraphicsParams.C b/src/graphics/GraphicsParams.C index c87a5edac2..e2782973d7 100644 --- a/src/graphics/GraphicsParams.C +++ b/src/graphics/GraphicsParams.C @@ -103,9 +103,15 @@ GParams::GParams(InsetGraphicsParams const & iparams, string const & filepath) } else if (iparams.lyxsize_type == InsetGraphicsParams::WH) { if (!iparams.lyxwidth.zero()) - width = iparams.lyxwidth.inBP(); + width = iparams.lyxwidth.inPixels(1, 1); if (!iparams.lyxheight.zero()) - height = iparams.lyxheight.inBP(); + 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); } } -- 2.39.2