]> git.lyx.org Git - lyx.git/blob - src/graphics/GraphicsParams.h
remove noload/don't typeset
[lyx.git] / src / graphics / GraphicsParams.h
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.
6  *
7  *  \author Angus Leeming 
8  *
9  * Full author contact details are available in file CREDITS
10  *
11  *  Used internally by the grfx::Image.
12  */
13
14 #ifndef GRAPHICSPARAMS_H
15 #define GRAPHICSPARAMS_H
16
17 #ifdef __GNUG__
18 #pragma interface
19 #endif
20
21 #include "GraphicsTypes.h"
22 #include "LString.h"
23
24
25 namespace grfx {
26
27 /** Parse a string of the form "200pt 500pt 300mm 5in" into a
28  *  usable bounding box.
29  */
30 struct BoundingBox {
31         ///
32         BoundingBox();
33         ///
34         BoundingBox(string const &);
35
36         /// 0 0 0 0 is empty!
37         bool empty() const;
38
39         unsigned int xl;
40         unsigned int yb;
41         unsigned int xr;
42         unsigned int yt;
43 };
44
45 bool operator==(BoundingBox const &, BoundingBox const &);
46 bool operator!=(BoundingBox const &, BoundingBox const &);
47
48 struct Params
49 {
50         Params();
51
52         DisplayType display;
53         unsigned int scale;
54
55         /// The image filename.
56         string filename;
57
58         /** Note that the BoundingBox is always relative to the BoundingBox
59          *  as stored in the EPS file.
60          *  Ie, bb.xl and bb.yb == 0 if that corner is not moved.
61          */
62         BoundingBox bb;
63
64         /** The size of the view inside lyx in pixels or the scaling of the
65          *  image.
66          */
67         /// Rotation angle.
68         float angle;
69 };
70
71 bool operator==(Params const &, Params const &);
72 bool operator!=(Params const &, Params const &);
73
74 } // namespace grfx
75
76 #endif // GRAPHICSPARAMS_H