#include "math_notinset.h"
#include "math_parser.h"
-#include "support.h"
-#include "support/LOstream.h"
+#include "math_mathmlstream.h"
+#include "math_support.h"
-using std::ostream;
-
MathNotInset::MathNotInset()
{}
}
-void MathNotInset::write(ostream & os, bool /* fragile */) const
+void MathNotInset::write(WriteStream & os) const
{
os << "\\not ";
}
-void MathNotInset::writeNormal(ostream & os) const
+void MathNotInset::normalize(NormalStream & os) const
{
os << "[not] ";
}
-void MathNotInset::metrics(MathStyles st) const
+void MathNotInset::metrics(MathMetricsInfo const & mi) const
{
- size(st);
- mathed_char_dim(LM_TC_VAR, size_, '/', ascent_, descent_, width_);
- width_ = 1;
+ if (math_font_available(LM_TC_CMSY)) {
+ whichFont(font_, LM_TC_CMSY, mi);
+ mathed_char_dim(font_, 54, ascent_, descent_, width_);
+ }
+ else {
+ whichFont(font_, LM_TC_VAR, mi);
+ mathed_char_dim(font_, '/', ascent_, descent_, width_);
+ }
+ width_ = 0;
}
void MathNotInset::draw(Painter & pain, int x, int y) const
-{
- xo(x);
- yo(y);
-
- drawChar(pain, LM_TC_VAR, size_, x + 4, y, '/');
+{
+ if (math_font_available(LM_TC_CMSY))
+ drawChar(pain, font_, x, y, 54);
+ else
+ drawChar(pain, font_, x, y, '/');
}