]> git.lyx.org Git - lyx.git/blobdiff - src/graphics/GraphicsParams.cpp
Let the Foot inset have a different Layout when inside a title
[lyx.git] / src / graphics / GraphicsParams.cpp
index d13dc1800fdc0737f4ca8dc37b7cd2e954425e8e..c1c32a0aba2fe41d1a7d759d4427abbd076eac4b 100644 (file)
 
 #include "GraphicsParams.h"
 
-#include "lyxlength.h"
+#include "Length.h"
 
+#include <cstdlib>
 #include <sstream>
 
-
-using std::string;
-using std::abs;
-
+using namespace std;
 
 namespace lyx {
 namespace graphics {
 
 Params::Params()
-       : display(ColorDisplay),
+       : display(true),
          scale(100),
+         pixel_ratio(1.0),
          angle(0)
 {}
 
@@ -37,6 +36,7 @@ bool operator==(Params const & a, Params const & b)
                a.display == b.display &&
                a.bb == b.bb &&
                a.scale == b.scale &&
+               a.pixel_ratio == b.pixel_ratio &&
                a.angle == b.angle);
 }
 
@@ -47,7 +47,7 @@ bool operator!=(Params const & a, Params const & b)
 }
 
 
-std::ostream & operator<<(std::ostream & os, BoundingBox const & bb)
+ostream & operator<<(ostream & os, BoundingBox const & bb)
 {
        os << bb.xl << ' ' << bb.yb << ' ' << bb.xr << ' ' << bb.yt;
        return os;
@@ -65,16 +65,16 @@ BoundingBox::BoundingBox(string const & bb)
        if (bb.empty())
                return;
 
-       std::istringstream is(bb.c_str());
+       istringstream is(bb.c_str());
        string a, b, c, d;
        is >> a >> b >> c >> d;
 
        // inBP returns the length in Postscript points.
        // Note further that there are 72 Postscript pixels per inch.
-       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());
+       unsigned int const xl_tmp = abs(Length(a).inBP());
+       unsigned int const yb_tmp = abs(Length(b).inBP());
+       unsigned int const xr_tmp = abs(Length(c).inBP());
+       unsigned int const yt_tmp = abs(Length(d).inBP());
 
        if (xr_tmp <= xl_tmp || yt_tmp <= yb_tmp)
                return;