drop one argument from paintRows, add pit argument

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7565 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2003-08-18 09:52:17 +00:00
parent 017649d4a5
commit dd25d9ffe5
4 changed files with 11 additions and 10 deletions

View File

@ -352,16 +352,16 @@ void LyXScreen::greyOut()
void LyXScreen::drawFromTo(LyXText * text, BufferView * bv)
{
hideCursor();
int const y2 = workarea().workHeight();
int const topy = text->top_y();
int y_text = topy;
ParagraphList::iterator dummypit;
RowList::iterator rit = text->getRowNearY(y_text, dummypit);
ParagraphList::iterator pit;
RowList::iterator rit = text->getRowNearY(y_text, pit);
int y = y_text - topy;
y = paintRows(*bv, *text, rit, 0, y, y, y2, 0);
y = paintRows(*bv, *text, pit, rit, 0, y, y, 0);
// maybe we have to clear the screen at the bottom
int const y2 = workarea().workHeight();
if (y < y2 && !text->isInInset()) {
workarea().getPainter().fillRectangle(0, y,
workarea().workWidth(), y2 - y,

View File

@ -292,7 +292,6 @@ void InsetText::draw(PainterInfo & pi, int x, int baseline) const
ParagraphList::iterator pit = paragraphs.begin();
int y_offset = baseline - rit->ascent_of_text();
int y2 = pain.paperHeight();
int first = 0;
int y = y_offset;
while (rit != end && y + rit->height() <= 0) {
@ -311,7 +310,7 @@ void InsetText::draw(PainterInfo & pi, int x, int baseline) const
int yo = y_offset + first;
paintRows(*bv, text_, rit, x, 0, yo, y2, yo);
paintRows(*bv, text_, pit, rit, x, 0, yo, yo);
if (drawFrame_ == ALWAYS || (drawFrame_ == LOCKED && locked))
drawFrame(pain, int(start_x));

View File

@ -1066,13 +1066,14 @@ int getLengthMarkerHeight(BufferView const & bv, VSpace const & vsp)
int paintRows(BufferView const & bv, LyXText const & text,
RowList::iterator rit, int xo, int y, int yf, int y2, int yo)
ParagraphList::iterator pit, RowList::iterator rit,
int xo, int y, int yf, int yo)
{
lyxerr << " paintRows: rit: " << &*rit << endl;
const_cast<LyXText&>(text).updateRowPositions();
int yy = yf - y;
int const yy = yf - y;
int const y2 = bv.painter().paperHeight();
ParagraphList::iterator pit = text.ownerParagraphs().begin();
ParagraphList::iterator end = text.ownerParagraphs().end();
bool active = false;

View File

@ -24,7 +24,8 @@ class VSpace;
/// paint the rows
// return last used y
int paintRows(BufferView const & bv, LyXText const & text,
RowList::iterator rit, int xo, int y, int yf, int y2, int yo);
ParagraphList::iterator pit,
RowList::iterator rit, int xo, int y, int yf, int yo);
/// return the pixel height of a space marker before/after a par
int getLengthMarkerHeight(BufferView const & bv, VSpace const & vsp);