#include "support/docstream.h"
#include "support/lassert.h"
#include "support/Length.h"
-#include "support/lyxlib.h"
#include <map>
#include <algorithm>
// 1, 0.5, 0.2, 0.5, 0.2,
// 1, 0.4, 0.4, 0.6, 0.4,
// 1, 0.5, 0.5, 0.5, 0.5,
- 5, 0.4, 0.4, 0.6, 0.4,
+ 5, 0.4, 0.6, 0.6, 0.6,
0
};
double const ddot[] = {
- 5, 0.0, 0.4, 0.3, 0.4,
- 5, 0.6, 0.4, 1.0, 0.4,
+ 5, 0.1, 0.6, 0.3, 0.6,
+ 5, 0.6, 0.6, 0.8, 0.6,
0
};
double const dddot[] = {
- 1, 0.1, 0.5, 0.2, 0.5,
- 1, 0.45, 0.5, 0.55, 0.5,
- 1, 0.8, 0.5, 0.9, 0.5,
+ 5, -0.2, 0.6, 0.0, 0.6,
+ 5, 0.3, 0.6, 0.5, 0.6,
+ 5, 0.8, 0.6, 1.0, 0.6,
0
};
double const ddddot[] = {
- 1, 0.1, 0.5, 0.2, 0.5,
- 1, 0.45, 0.5, 0.55, 0.5,
- 1, 0.8, 0.5, 0.9, 0.5,
- 1, 1.15, 0.5, 1.25, 0.5,
+ 5, -0.4, 0.6, -0.2, 0.6,
+ 5, 0.1, 0.6, 0.3, 0.6,
+ 5, 0.6, 0.6, 0.8, 0.6,
+ 5, 1.1, 0.6, 1.3, 0.6,
0
};
double const ring[] = {
- 2, 5,
- 0.5, 0.8, 0.8, 0.5, 0.5, 0.2, 0.2, 0.5, 0.5, 0.8,
+ 2, 9,
+ 0.5, 0.8, 0.7, 0.7, 0.8, 0.4,
+ 0.7, 0.1, 0.5, 0.0, 0.3, 0.1,
+ 0.2, 0.4, 0.3, 0.7, 0.5, 0.8,
0
};
double const tilde[] = {
- 2, 4,
- 0.00, 0.8, 0.25, 0.2, 0.75, 0.8, 1.00, 0.2,
+ 2, 6,
+ 0.0, 0.8, 0.15, 0.2, 0.35, 0.2, 0.65, 0.8, 0.85, 0.8, 1.0, 0.2,
0
};
void mathed_draw_deco(PainterInfo & pi, int x, int y, int w, int h,
docstring const & name)
{
+ int const lw = pi.base.solidLineThickness();
+
if (name == ".") {
pi.pain.line(x + w/2, y, x + w/2, y + h,
- Color_cursor, Painter::line_onoffdash);
+ Color_cursor, Painter::line_onoffdash, lw);
return;
}
pi.pain.line(
int(x + xx + 0.5), int(y + yy + 0.5),
int(x + x2 + 0.5), int(y + y2 + 0.5),
- pi.base.font.color());
+ pi.base.font.color(), Painter::line_solid, lw);
if (code == 5) { // thicker, but rounded
- pi.pain.line(
- int(x + xx + 0.5+1), int(y + yy + 0.5-1),
- int(x + x2 + 0.5-1), int(y + y2 + 0.5-1),
- pi.base.font.color());
- pi.pain.line(
- int(x + xx + 0.5+1), int(y + yy + 0.5+1),
- int(x + x2 + 0.5-1), int(y + y2 + 0.5+1),
- pi.base.font.color());
+ double const xa = x + xx + 0.5;
+ double const xb = x + x2 + 0.5;
+ double const ya = y + yy + 0.5;
+ double const yb = y + y2 + 0.5;
+ pi.pain.line(int(xa + 1), int(ya - 1),
+ int(xb - 1), int(yb - 1),
+ pi.base.font.color(),
+ Painter::line_solid, lw);
+ pi.pain.line(int(xa + 1), int(ya + 1),
+ int(xb - 1), int(yb + 1),
+ pi.base.font.color(),
+ Painter::line_solid, lw);
+ if (xa + 2 <= xb - 2) {
+ pi.pain.line(int(xa + 2), int(ya - 2),
+ int(xb - 2), int(yb - 2),
+ pi.base.font.color(),
+ Painter::line_solid, lw);
+ pi.pain.line(int(xa + 2), int(ya + 2),
+ int(xb - 2), int(yb + 2),
+ pi.base.font.color(),
+ Painter::line_solid, lw);
+ }
+ if (xa + 3 <= xb - 3) {
+ pi.pain.line(int(xa + 3), int(ya - 3),
+ int(xb - 3), int(yb - 3),
+ pi.base.font.color(),
+ Painter::line_solid, lw);
+ pi.pain.line(int(xa + 3), int(ya + 3),
+ int(xb - 3), int(yb + 3),
+ pi.base.font.color(),
+ Painter::line_solid, lw);
+ }
+ if (xa + 4 <= xb - 4) {
+ pi.pain.line(int(xa + 4), int(ya - 4),
+ int(xb - 4), int(yb - 4),
+ pi.base.font.color(),
+ Painter::line_solid, lw);
+ pi.pain.line(int(xa + 4), int(ya + 4),
+ int(xb - 4), int(yb + 4),
+ pi.base.font.color(),
+ Painter::line_solid, lw);
+ }
}
} else {
int xp[32];
yp[j] = int(y + yy + 0.5);
// lyxerr << "P[" << j ' ' << xx << ' ' << yy << ' ' << x << ' ' << y << ']';
}
- pi.pain.lines(xp, yp, n2, pi.base.font.color());
+ pi.pain.lines(xp, yp, n2, pi.base.font.color(),
+ Painter::fill_none, Painter::line_solid, lw);
}
}
}
{
odocstringstream os;
otexrowstream ots(os);
- WriteStream ws(ots);
+ TeXMathStream ws(ots);
ws << ar;
return os.str();
}
{
odocstringstream os;
otexrowstream ots(os);
- WriteStream ws(ots);
+ TeXMathStream ws(ots);
inset.write(ws);
return os.str();
}
{
odocstringstream os;
otexrowstream ots(os);
- WriteStream ws(ots);
+ TeXMathStream ws(ots);
at->write(ws);
return os.str();
}