]> git.lyx.org Git - features.git/commitdiff
Define explicitly the color passed to the painter.
authorAngus Leeming <leeming@lyx.org>
Mon, 15 Sep 2003 10:08:01 +0000 (10:08 +0000)
committerAngus Leeming <leeming@lyx.org>
Mon, 15 Sep 2003 10:08:01 +0000 (10:08 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7748 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/insets/ChangeLog
src/insets/insetlatexaccent.C
src/insets/renderers.C
src/mathed/ChangeLog
src/mathed/math_gridinset.C
src/rowpainter.C

index fe0616a8c71633f60f986a97f2664c6c49e42109..b2fb0bfd44833ba7157e6444d7ebb111230fa477 100644 (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
index b2b83d6fad5a54f8e13e036588f215cf25434d8b..fbfce3d9c46dec6fa328ca60bcf32feff8f3881d 100644 (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
index bb4f2e3f9bf70ed92e88b2d08ff81a146fde4793..2b225a7ea2cab9c4ee59a39d579833a44567e7cc 100644 (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
@@ -595,10 +597,12 @@ 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());
+                                     baseline - dim_.asc + 1, dim_.wid - 2,
+                                     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);
        }
 }
index 1e80eafe90502ee7eb231fed9f37a65f4c816cbf..59fa2e45097b6f9229d5b4be8de1424b0a63732e 100644 (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;
index e980d1288414b562d4fcb6291f08f0ff506c3f14..14ee801ee06464e460172cbb4b8c4f0013184648 100644 (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>
 
index ade73f990454ee87e7e4c9c4fd7193869e76bc6a..5fd22678751d389944895484158d8a4b9907192a 100644 (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);
                }
 }
 
index 699fb2d5264bf15dc7beb89b5fc7730875ae069d..e380f3e468c32bad1d3b8156ed05af614c7c0578 100644 (file)
@@ -600,8 +600,9 @@ int RowPainter::paintLengthMarker(string const & prefix, VSpace const & vsp, int
        font_metrics::rectText(str, font, w, a, d);
 
        pain_.rectText(leftx + 2 * arrow_size + 5,
-                        start + ((end - start) / 2) + d,
-                        str, font);
+                      start + ((end - start) / 2) + d,
+                      str, font,
+                      LColor::none, LColor::none);
 
        // top arrow
        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_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);
+                  LColor::pagebreak, Painter::line_onoffdash);
        pain_.line(text_end, y, int(xo_ + width_), y,
-               LColor::pagebreak, Painter::line_onoffdash);
+                  LColor::pagebreak, Painter::line_onoffdash);
 
        return 3 * defaultRowHeight();
 }
@@ -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);