#include "math_parser.h"
#include "math_mathmlstream.h"
#include "math_streamstr.h"
+
+#include "debug.h"
+
#include "support/std_ostream.h"
using std::auto_ptr;
void MathDecorationInset::draw(PainterInfo & pi, int x, int y) const
{
+ lyxerr << "MathDecorationInset::draw: x: " << x << std::endl;
cell(0).draw(pi, x + 1, y);
if (wide())
mathed_draw_deco(pi, x + 1, y + dy_, cell(0).width(), dh_, key_->name);
else
- mathed_draw_deco(pi, x + 1 + (pi.width - dw_) / 2,
+ mathed_draw_deco(pi, x + 1 + (cell(0).width() - dw_) / 2,
y + dy_, dw_, dh_, key_->name);
drawMarkers(pi, x, y);
}
void MathDotsInset::metrics(MetricsInfo & mi, Dimension & dim) const
{
- mathed_char_dim(mi.base.font, 'M', dim_);
+ mathed_char_dim(mi.base.font, 'M', dim);
dh_ = 0;
if (key_->name == "cdots" || key_->name == "dotsb"
|| key_->name == "dotsm" || key_->name == "dotsi")
- dh_ = dim_.asc / 2;
+ dh_ = dim.asc / 2;
else if (key_->name == "dotsc")
- dh_ = dim_.asc / 4;
+ dh_ = dim.asc / 4;
else if (key_->name == "vdots") {
- dim_.wid = (dim_.wid / 2) + 1;
- dh_ = dim_.asc;
+ dim.wid = (dim.wid / 2) + 1;
+ dh_ = dim.asc;
}
else if (key_->name == "ddots")
- dh_ = dim_.asc;
- dim = dim_;
+ dh_ = dim.asc;
+ dim_ = dim;
}
--y;
mathed_draw_deco(pain, x + 2, y - dh_, dim_.width() - 2, dim_.ascent(),
key_->name);
+ setPosCache(pain, x, y);
}
int(x + xx + 0.5), int(y + yy + 0.5),
int(x + x2 + 0.5), int(y + y2 + 0.5),
LColor::math);
- } else {
+
+ lyxerr << "drew line "
+ << "xx=" << xx << ", yy=" << yy
+ << ", x2 = " << x2 << ", y2 = " << y2 << '\n'
+ << int(x + xx + 0.5) << ", "
+ << int(y + yy + 0.5) << ", "
+ << int(x + x2 + 0.5) << ", "
+ << int(y + y2 + 0.5) << std::endl;
+ } else {
int xp[32];
int yp[32];
int const n = int(d[i++]);