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> 2003-09-15 Angus Leeming <leeming@lyx.org>
* bufferparams.C (BufferParams): reorder member initializers to avoid * 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> 2003-09-10 Martin Vermeer <martin.vermeer@hut.fi>
* insettext.C: remove block causing problems in lockInsetInInset * 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 case TIE: // tie
{ {
pi.pain.arc(int(x2 + hg35), int(y + hg / 2.0), 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; break;
} }
case BREVE: // breve case BREVE: // breve
{ {
pi.pain.arc(int(x2 - (hg / 2.0)), y, 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; break;
} }
case CARON: // caron 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[0] = int(x2 - hg35); yp[0] = int(y + hg35);
xp[1] = int(x2); yp[1] = int(y + hg); xp[1] = int(x2); yp[1] = int(y + hg);
xp[2] = int(x2 + hg35); yp[2] = int(y + hg35); 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; break;
} }
case SPECIAL_CARON: // special caron 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)); xp[2] = int(x + dim_.wid + (hg35 / 2.0));
yp[2] = y + int(hg); yp[2] = y + int(hg);
pi.pain.lines(xp, yp, 3); pi.pain.lines(xp, yp, 3, LColor::foreground);
break; break;
} }
case HUNGARIAN_UMLAUT: // hung. umlaut 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); xp[3] = int(x2 + hg / 4.0);
yp[3] = y + int(hg); yp[3] = y + int(hg);
pi.pain.lines(xp, yp, 4); pi.pain.lines(xp, yp, 4, LColor::foreground);
break; break;
} }
case lSLASH: 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); xp[1] = int(x + float(dim_.wid) * 0.75);
yp[1] = y + int(hg); yp[1] = y + int(hg);
pi.pain.lines(xp, yp, 2); pi.pain.lines(xp, yp, 2, LColor::foreground);
break; break;
} }
case DOT_LESS_I: // dotless-i case DOT_LESS_I: // dotless-i
@ -595,10 +597,12 @@ void InsetLatexAccent::draw(PainterInfo & pi, int x, int baseline) const
} }
} else { } else {
pi.pain.fillRectangle(x + 1, pi.pain.fillRectangle(x + 1,
baseline - dim_.asc + 1, dim_.wid - 2, 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, 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); 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, pi.pain.rectangle(x + InsetOld::TEXT_TO_INSET_OFFSET,
y - dim_.asc, y - dim_.asc,
dim_.wid - 2 * InsetOld::TEXT_TO_INSET_OFFSET, dim_.wid - 2 * InsetOld::TEXT_TO_INSET_OFFSET,
dim_.asc + dim_.des); dim_.asc + dim_.des,
LColor::foreground);
// Print the file name. // Print the file name.
LyXFont msgFont = pi.base.font; 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> 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) { for (int i = 0; i < rowinfo_[row].lines_; ++i) {
int yy = y + rowinfo_[row].offset_ - rowinfo_[row].ascent_ int yy = y + rowinfo_[row].offset_ - rowinfo_[row].ascent_
- i * hlinesep() - hlinesep()/2 - rowsep()/2; - 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 (col_type col = 0; col <= ncols(); ++col)
for (int i = 0; i < colinfo_[col].lines_; ++i) { for (int i = 0; i < colinfo_[col].lines_; ++i) {
int xx = x + colinfo_[col].offset_ int xx = x + colinfo_[col].offset_
- i * vlinesep() - vlinesep()/2 - colsep()/2; - 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

@ -600,8 +600,9 @@ int RowPainter::paintLengthMarker(string const & prefix, VSpace const & vsp, int
font_metrics::rectText(str, font, w, a, d); font_metrics::rectText(str, font, w, a, d);
pain_.rectText(leftx + 2 * arrow_size + 5, pain_.rectText(leftx + 2 * arrow_size + 5,
start + ((end - start) / 2) + d, start + ((end - start) / 2) + d,
str, font); str, font,
LColor::none, LColor::none);
// top arrow // top arrow
pain_.line(leftx, ty1, midx, ty2, LColor::added_space); pain_.line(leftx, ty1, midx, ty2, LColor::added_space);
@ -631,12 +632,12 @@ int RowPainter::paintPageBreak(string const & label, int y)
int const text_start = int(xo_ + (width_ - w) / 2); int const text_start = int(xo_ + (width_ - w) / 2);
int const text_end = text_start + w; 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, pain_.line(int(xo_), y, text_start, y,
LColor::pagebreak, Painter::line_onoffdash); LColor::pagebreak, Painter::line_onoffdash);
pain_.line(text_end, y, int(xo_ + width_), y, pain_.line(text_end, y, int(xo_ + width_), y,
LColor::pagebreak, Painter::line_onoffdash); LColor::pagebreak, Painter::line_onoffdash);
return 3 * defaultRowHeight(); return 3 * defaultRowHeight();
} }
@ -656,7 +657,7 @@ int RowPainter::paintAppendixStart(int y)
int const text_start = int(xo_ + (width_ - w) / 2); int const text_start = int(xo_ + (width_ - w) / 2);
int const text_end = text_start + w; 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(int(xo_ + 1), y, text_start, y, LColor::appendix);
pain_.line(text_end, y, int(xo_ + width_ - 2), y, LColor::appendix); pain_.line(text_end, y, int(xo_ + width_ - 2), y, LColor::appendix);