#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)
{}
a.display == b.display &&
a.bb == b.bb &&
a.scale == b.scale &&
+ a.pixel_ratio == b.pixel_ratio &&
a.angle == b.angle);
}
}
-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;
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;