]> git.lyx.org Git - lyx.git/blobdiff - src/graphics/GraphicsParams.C
Purely mechanical: move fragile into LatexRunParams.
[lyx.git] / src / graphics / GraphicsParams.C
index 896332759edf9b0816095a837c629f43a3224102..0c7123ee818a0fd99ea520be6171ff9e799d0b28 100644 (file)
@@ -1,17 +1,15 @@
-/*
+/**
  * \file GraphicsParams.C
- * Copyright 2002 the LyX Team
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- * \author Angus Leeming <leeming@lyx.org>
+ * \author Angus Leeming
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
 #include <cstdlib>
 
 #include "GraphicsParams.h"
@@ -24,24 +22,18 @@ namespace grfx {
 
 Params::Params()
        : display(ColorDisplay),
-         width(0),
-         height(0),
-         scale(0),
-         keepLyXAspectRatio(false),
+         scale(100),
          angle(0)
 {}
 
 
 bool operator==(Params const & a, Params const & b)
 {
-       return (a.filename           == b.filename &&
-               a.display            == b.display &&
-               a.bb                 == b.bb &&
-               a.width              == b.width &&
-               a.height             == b.height &&
-               a.scale              == b.scale &&
-               a.keepLyXAspectRatio == b.keepLyXAspectRatio &&
-               a.angle              == b.angle);
+       return (a.filename == b.filename &&
+               a.display == b.display &&
+               a.bb == b.bb &&
+               a.scale == b.scale &&
+               a.angle == b.angle);
 }
 
 
@@ -68,10 +60,10 @@ BoundingBox::BoundingBox(string const & bb)
 
        // inBP returns the length in Postscript points.
        // Note further that there are 72 Postscript pixels per inch.
-       int const xl_tmp = abs(LyXLength(a).inBP());
-       int const yb_tmp = abs(LyXLength(b).inBP());
-       int const xr_tmp = abs(LyXLength(c).inBP());
-       int const yt_tmp = abs(LyXLength(d).inBP());
+       unsigned int const xl_tmp = abs(LyXLength(a).inBP());
+       unsigned int const yb_tmp = abs(LyXLength(b).inBP());
+       unsigned int const xr_tmp = abs(LyXLength(c).inBP());
+       unsigned int const yt_tmp = abs(LyXLength(d).inBP());
 
        if (xr_tmp <= xl_tmp || yt_tmp <= yb_tmp)
                return;