2 * \file GraphicsParams.C
3 * Copyright 2002 the LyX Team
4 * Read the file COPYING
6 * \author Angus Leeming <a.leeming@ic.ac.uk>
12 #pragma implementation
15 #include "GraphicsParams.h"
17 #include "lyxlength.h"
23 : display(ColorDisplay),
31 bool operator==(Params const & a, Params const & b)
33 return (a.filename == b.filename &&
34 a.display == b.display &&
37 a.height == b.height &&
43 bool operator!=(Params const & a, Params const & b)
49 BoundingBox::BoundingBox()
50 : xl(0), yb(0), xr(0), yt(0)
54 BoundingBox::BoundingBox(string const & bb)
55 : xl(0), yb(0), xr(0), yt(0)
60 std::istringstream is(bb.c_str());
62 is >> a >> b >> c >> d;
64 // inBP returns the length in Postscript points.
65 // Note further that there are 72 Postscript pixels per inch.
66 int const xl_tmp = LyXLength(a).inBP();
67 int const yb_tmp = LyXLength(b).inBP();
68 int const xr_tmp = LyXLength(c).inBP();
69 int const yt_tmp = LyXLength(d).inBP();
71 if (xr_tmp <= xl_tmp || yt_tmp <= yb_tmp)
81 bool BoundingBox::empty() const
83 return (!xl && !yb && !xr && !yt);
87 bool operator==(BoundingBox const & a, BoundingBox const & b)
89 return (a.xl == b.xl &&
96 bool operator!=(BoundingBox const & a, BoundingBox const & b)