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"
29 bool operator==(GParams const & a, GParams const & b)
31 return (a.filename == b.filename &&
32 a.display == b.display &&
35 a.height == b.height &&
41 bool operator!=(GParams const & a, GParams const & b)
47 BoundingBox::BoundingBox()
48 : xl(0), yb(0), xr(0), yt(0)
52 BoundingBox::BoundingBox(string const & bb)
53 : xl(0), yb(0), xr(0), yt(0)
58 std::istringstream is(bb.c_str());
60 is >> a >> b >> c >> d;
62 // inBP returns the length in Postscript points.
63 // Note further that there are 72 Postscript pixels per inch.
64 int const xl_tmp = LyXLength(a).inBP();
65 int const yb_tmp = LyXLength(b).inBP();
66 int const xr_tmp = LyXLength(c).inBP();
67 int const yt_tmp = LyXLength(d).inBP();
69 if (xr_tmp <= xl_tmp || yt_tmp <= yb_tmp)
79 bool BoundingBox::empty() const
81 return (!xl && !yb && !xr && !yt);
85 bool operator==(BoundingBox const & a, BoundingBox const & b)
87 return (a.xl == b.xl &&
94 bool operator!=(BoundingBox const & a, BoundingBox const & b)