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"
30 bool operator==(GParams const & a, GParams const & b)
32 return (a.filename == b.filename &&
33 a.display == b.display &&
36 a.height == b.height &&
42 bool operator!=(GParams const & a, GParams const & b)
48 BoundingBox::BoundingBox()
49 : xl(0), yb(0), xr(0), yt(0)
53 BoundingBox::BoundingBox(string const & bb)
54 : xl(0), yb(0), xr(0), yt(0)
59 std::istringstream is(bb.c_str());
61 is >> a >> b >> c >> d;
63 // inBP returns the length in Postscript points.
64 // Note further that there are 72 Postscript pixels per inch.
65 int const xl_tmp = LyXLength(a).inBP();
66 int const yb_tmp = LyXLength(b).inBP();
67 int const xr_tmp = LyXLength(c).inBP();
68 int const yt_tmp = LyXLength(d).inBP();
70 if (xr_tmp <= xl_tmp || yt_tmp <= yb_tmp)
80 bool BoundingBox::empty() const
82 return (!xl && !yb && !xr && !yt);
86 bool operator==(BoundingBox const & a, BoundingBox const & b)
88 return (a.xl == b.xl &&
95 bool operator!=(BoundingBox const & a, BoundingBox const & b)