]> git.lyx.org Git - lyx.git/blob - src/mathed/math_notinset.C
whichFont down to 5.3%
[lyx.git] / src / mathed / math_notinset.C
1 #include "math_notinset.h"
2 #include "math_parser.h"
3 #include "math_mathmlstream.h"
4 #include "math_support.h"
5
6
7 MathNotInset::MathNotInset()
8 {}
9
10
11 MathInset * MathNotInset::clone() const
12 {
13         return new MathNotInset(*this);
14 }
15
16
17 void MathNotInset::write(WriteStream & os) const
18 {
19         os << "\\not ";
20 }
21
22
23 void MathNotInset::normalize(NormalStream & os) const
24 {
25         os << "[not] ";
26 }
27
28
29 void MathNotInset::metrics(MathMetricsInfo const & mi) const
30 {
31         mi_ = mi;
32         if (math_font_available(LM_TC_CMSY))
33                 mathed_char_dim(LM_TC_CMSY, mi_, 54, ascent_, descent_, width_);
34         else
35                 mathed_char_dim(LM_TC_VAR, mi_, '/', ascent_, descent_, width_);
36         width_ = 0;
37 }
38
39
40 void MathNotInset::draw(Painter & pain, int x, int y) const
41 {  
42         if (math_font_available(LM_TC_CMSY))
43                 drawChar(pain, LM_TC_CMSY, mi_, x, y, 54);
44         else
45                 drawChar(pain, LM_TC_VAR, mi_, x, y, '/');
46 }