Not so soon, I guess, since that FIXME was from r6305.
[lyx.git] / src / graphics / GraphicsParams.h
blob7213aaa3a150ba06864cf922c6478eda0bbdd2c5
1 // -*- C++ -*-
2 /**
3 * \file GraphicsParams.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
9 * Full author contact details are available in file CREDITS.
11 * Used internally by the lyx::graphics::Image.
14 #ifndef GRAPHICSPARAMS_H
15 #define GRAPHICSPARAMS_H
17 #include "GraphicsTypes.h"
19 #include "support/FileName.h"
21 #include <string>
22 #include <iosfwd>
25 namespace lyx {
26 namespace graphics {
28 /** Parse a string of the form "200pt 500pt 300mm 5in" into a
29 * usable bounding box.
31 class BoundingBox {
32 public:
33 ///
34 BoundingBox();
35 ///
36 BoundingBox(std::string const &);
38 /// 0 0 0 0 is empty!
39 bool empty() const;
41 unsigned int xl;
42 unsigned int yb;
43 unsigned int xr;
44 unsigned int yt;
47 bool operator==(BoundingBox const &, BoundingBox const &);
48 bool operator!=(BoundingBox const &, BoundingBox const &);
50 std::ostream & operator<<(std::ostream &, BoundingBox const &);
53 class Params
55 public:
56 Params();
58 bool display;
59 unsigned int scale;
61 /// The image filename.
62 support::FileName filename;
64 /** Note that the BoundingBox is always relative to the BoundingBox
65 * as stored in the EPS file.
66 * Ie, bb.xl and bb.yb == 0 if that corner is not moved.
68 BoundingBox bb;
70 /** The size of the view inside lyx in pixels or the scaling of the
71 * image.
73 /// Rotation angle.
74 double angle;
77 bool operator==(Params const &, Params const &);
78 bool operator!=(Params const &, Params const &);
80 } // namespace graphics
81 } // namespace lyx
83 #endif // GRAPHICSPARAMS_H