-
-
-void LyXScreen::drawFromTo(LyXText * text, BufferView * bv,
- int y1, int y2, int yo, int xo)
-{
- lyxerr[Debug::GUI] << "screen: drawFromTo " << y1 << '-' << y2 << endl;
-
- int y_text = text->top_y() + y1;
-
- // get the first needed row
- RowList::iterator row = text->getRowNearY(y_text);
- RowList::iterator end = text->rows().end();
-
- // y_text is now the real beginning of the row
-
- int y = y_text - text->top_y();
- // y1 is now the real beginning of row on the screen
-
-
- while (row != end && y < y2) {
- RowPainter rp(*bv, *text, *row);
- rp.paint(y + yo, xo, y + text->top_y());
- y += row->height();
- ++row;
- }
-
- // maybe we have to clear the screen at the bottom
- if ((y < y2) && !text->isInInset()) {
- workarea().getPainter().fillRectangle(0, y,
- workarea().workWidth(), y2 - y,
- LColor::bottomarea);
- }
-}
-
-
-void LyXScreen::drawOneRow(LyXText * text, BufferView * bv, Row * row,
- int y_text, int yo, int xo)
-{
- int const y = y_text - text->top_y() + yo;
-
- if (y + row->height() <= 0)
- return;
-
- if (y - row->height() > workarea().workHeight())
- return;
-
- RowPainter rp(*bv, *text, *row);
- rp.paint(y, xo, y + text->top_y());
-}