X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fgraphics%2FGraphicsParams.cpp;h=c1c32a0aba2fe41d1a7d759d4427abbd076eac4b;hb=9b530e59c2b74828f3a68f3bb7ee3dee0365cdc0;hp=d13dc1800fdc0737f4ca8dc37b7cd2e954425e8e;hpb=f497296c30e6da2f97b16da8ad1c9e96feffb16b;p=lyx.git diff --git a/src/graphics/GraphicsParams.cpp b/src/graphics/GraphicsParams.cpp index d13dc1800f..c1c32a0aba 100644 --- a/src/graphics/GraphicsParams.cpp +++ b/src/graphics/GraphicsParams.cpp @@ -12,21 +12,20 @@ #include "GraphicsParams.h" -#include "lyxlength.h" +#include "Length.h" +#include #include - -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;