Define explicitly the color passed to the painter.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7748 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2003-09-15 10:08:01 +00:00
parent f0f7507197
commit 61f1f3ea87
7 changed files with 41 additions and 18 deletions

View File

@ -1,3 +1,8 @@
2003-09-15 Angus Leeming <leeming@lyx.org>
* rowpainter.C (paintLengthMarker, paintPageBreak, paintAppendixStart):
explicitly define the color passed to the painter.
2003-09-15 Angus Leeming <leeming@lyx.org>
* bufferparams.C (BufferParams): reorder member initializers to avoid

View File

@ -1,3 +1,8 @@
2003-09-15 Angus Leeming <leeming@lyx.org>
* renderers.C (draw):
* insetlatexaccent.C (draw): explicitly define the color passed to the painter.
2003-09-10 Martin Vermeer <martin.vermeer@hut.fi>
* insettext.C: remove block causing problems in lockInsetInInset

View File

@ -487,13 +487,15 @@ void InsetLatexAccent::draw(PainterInfo & pi, int x, int baseline) const
case TIE: // tie
{
pi.pain.arc(int(x2 + hg35), int(y + hg / 2.0),
int(2 * hg), int(hg), 0, 360 * 32);
int(2 * hg), int(hg), 0, 360 * 32,
LColor::foreground);
break;
}
case BREVE: // breve
{
pi.pain.arc(int(x2 - (hg / 2.0)), y,
int(hg), int(hg), 0, -360*32);
int(hg), int(hg), 0, -360*32,
LColor::foreground);
break;
}
case CARON: // caron
@ -503,7 +505,7 @@ void InsetLatexAccent::draw(PainterInfo & pi, int x, int baseline) const
xp[0] = int(x2 - hg35); yp[0] = int(y + hg35);
xp[1] = int(x2); yp[1] = int(y + hg);
xp[2] = int(x2 + hg35); yp[2] = int(y + hg35);
pi.pain.lines(xp, yp, 3);
pi.pain.lines(xp, yp, 3, LColor::foreground);
break;
}
case SPECIAL_CARON: // special caron
@ -522,7 +524,7 @@ void InsetLatexAccent::draw(PainterInfo & pi, int x, int baseline) const
xp[2] = int(x + dim_.wid + (hg35 / 2.0));
yp[2] = y + int(hg);
pi.pain.lines(xp, yp, 3);
pi.pain.lines(xp, yp, 3, LColor::foreground);
break;
}
case HUNGARIAN_UMLAUT: // hung. umlaut
@ -569,7 +571,7 @@ void InsetLatexAccent::draw(PainterInfo & pi, int x, int baseline) const
xp[3] = int(x2 + hg / 4.0);
yp[3] = y + int(hg);
pi.pain.lines(xp, yp, 4);
pi.pain.lines(xp, yp, 4, LColor::foreground);
break;
}
case lSLASH:
@ -583,7 +585,7 @@ void InsetLatexAccent::draw(PainterInfo & pi, int x, int baseline) const
xp[1] = int(x + float(dim_.wid) * 0.75);
yp[1] = y + int(hg);
pi.pain.lines(xp, yp, 2);
pi.pain.lines(xp, yp, 2, LColor::foreground);
break;
}
case DOT_LESS_I: // dotless-i
@ -596,9 +598,11 @@ void InsetLatexAccent::draw(PainterInfo & pi, int x, int baseline) const
} else {
pi.pain.fillRectangle(x + 1,
baseline - dim_.asc + 1, dim_.wid - 2,
dim_.asc + dim_.des - 2, backgroundColor());
dim_.asc + dim_.des - 2,
backgroundColor());
pi.pain.rectangle(x + 1, baseline - dim_.asc + 1,
dim_.wid - 2, dim_.asc + dim_.des - 2);
dim_.wid - 2, dim_.asc + dim_.des - 2,
LColor::foreground);
pi.pain.text(x + 2, baseline, contents, font);
}
}

View File

@ -281,7 +281,8 @@ void GraphicRenderer::draw(PainterInfo & pi, int x, int y) const
pi.pain.rectangle(x + InsetOld::TEXT_TO_INSET_OFFSET,
y - dim_.asc,
dim_.wid - 2 * InsetOld::TEXT_TO_INSET_OFFSET,
dim_.asc + dim_.des);
dim_.asc + dim_.des,
LColor::foreground);
// Print the file name.
LyXFont msgFont = pi.base.font;

View File

@ -1,3 +1,6 @@
2003-09-15 Angus Leeming <leeming@lyx.org>
* math_gridinset.C (draw): explicitly define the color to draw the line.
2003-09-12 André Pönitz <poenitz@gmx.net>

View File

@ -469,14 +469,18 @@ void MathGridInset::draw(PainterInfo & pi, int x, int y) const
for (int i = 0; i < rowinfo_[row].lines_; ++i) {
int yy = y + rowinfo_[row].offset_ - rowinfo_[row].ascent_
- i * hlinesep() - hlinesep()/2 - rowsep()/2;
pi.pain.line(x + 1, yy, x + dim_.width() - 1, yy);
pi.pain.line(x + 1, yy,
x + dim_.width() - 1, yy,
LColor::foreground);
}
for (col_type col = 0; col <= ncols(); ++col)
for (int i = 0; i < colinfo_[col].lines_; ++i) {
int xx = x + colinfo_[col].offset_
- i * vlinesep() - vlinesep()/2 - colsep()/2;
pi.pain.line(xx, y - dim_.ascent() + 1, xx, y + dim_.descent() - 1);
pi.pain.line(xx, y - dim_.ascent() + 1,
xx, y + dim_.descent() - 1,
LColor::foreground);
}
}

View File

@ -601,7 +601,8 @@ int RowPainter::paintLengthMarker(string const & prefix, VSpace const & vsp, int
pain_.rectText(leftx + 2 * arrow_size + 5,
start + ((end - start) / 2) + d,
str, font);
str, font,
LColor::none, LColor::none);
// top arrow
pain_.line(leftx, ty1, midx, ty2, LColor::added_space);
@ -631,7 +632,7 @@ int RowPainter::paintPageBreak(string const & label, int y)
int const text_start = int(xo_ + (width_ - w) / 2);
int const text_end = text_start + w;
pain_.rectText(text_start, y + d, label, pb_font);
pain_.rectText(text_start, y + d, label, pb_font, LColor::none, LColor::none);
pain_.line(int(xo_), y, text_start, y,
LColor::pagebreak, Painter::line_onoffdash);
@ -656,7 +657,7 @@ int RowPainter::paintAppendixStart(int y)
int const text_start = int(xo_ + (width_ - w) / 2);
int const text_end = text_start + w;
pain_.rectText(text_start, y + d, label, pb_font);
pain_.rectText(text_start, y + d, label, pb_font, LColor::none, LColor::none);
pain_.line(int(xo_ + 1), y, text_start, y, LColor::appendix);
pain_.line(text_end, y, int(xo_ + width_ - 2), y, LColor::appendix);