2001-08-16 12:34:48 +00:00
|
|
|
#include "math_notinset.h"
|
|
|
|
#include "math_parser.h"
|
2001-11-08 12:06:56 +00:00
|
|
|
#include "math_mathmlstream.h"
|
2001-08-16 12:34:48 +00:00
|
|
|
#include "support.h"
|
|
|
|
|
|
|
|
|
|
|
|
MathNotInset::MathNotInset()
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
MathInset * MathNotInset::clone() const
|
|
|
|
{
|
|
|
|
return new MathNotInset(*this);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-10-19 11:25:48 +00:00
|
|
|
void MathNotInset::write(MathWriteInfo & os) const
|
2001-08-16 12:34:48 +00:00
|
|
|
{
|
|
|
|
os << "\\not ";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-11-08 12:06:56 +00:00
|
|
|
void MathNotInset::writeNormal(NormalStream & os) const
|
2001-08-16 12:34:48 +00:00
|
|
|
{
|
|
|
|
os << "[not] ";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-10-22 15:37:49 +00:00
|
|
|
void MathNotInset::metrics(MathMetricsInfo const & mi) const
|
2001-08-16 12:34:48 +00:00
|
|
|
{
|
2001-10-22 15:37:49 +00:00
|
|
|
mi_ = mi;
|
2001-08-31 21:15:57 +00:00
|
|
|
if (math_font_available(LM_TC_CMSY))
|
2001-10-22 15:37:49 +00:00
|
|
|
mathed_char_dim(LM_TC_CMSY, mi_, 54, ascent_, descent_, width_);
|
2001-10-19 11:25:48 +00:00
|
|
|
else
|
2001-10-22 15:37:49 +00:00
|
|
|
mathed_char_dim(LM_TC_VAR, mi_, '/', ascent_, descent_, width_);
|
2001-08-21 14:18:51 +00:00
|
|
|
width_ = 0;
|
2001-08-16 12:34:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathNotInset::draw(Painter & pain, int x, int y) const
|
|
|
|
{
|
2001-08-31 21:15:57 +00:00
|
|
|
if (math_font_available(LM_TC_CMSY))
|
2001-10-22 15:37:49 +00:00
|
|
|
drawChar(pain, LM_TC_CMSY, mi_, x, y, 54);
|
2001-08-31 21:15:57 +00:00
|
|
|
else
|
2001-10-22 15:37:49 +00:00
|
|
|
drawChar(pain, LM_TC_VAR, mi_, x, y, '/');
|
2001-08-16 12:34:48 +00:00
|
|
|
}
|