nsresult TableBackgroundPainter::PaintRow(nsTableRowFrame* aFrame, bool aPassThrough) { NS_PRECONDITION(aFrame, "null frame"); if (!mRow.mFrame) { mRow.SetFrame(aFrame); } /* Load row data */ if (!aPassThrough) { mRow.SetData(); if (mIsBorderCollapse && mRow.ShouldSetBCBorder()) { nsMargin border; nsTableRowFrame* nextRow = aFrame->GetNextRow(); if (nextRow) { //outer top below us is inner bottom for us border.bottom = nextRow->GetOuterTopContBCBorderWidth(); } else { //acquire rg's bottom border nsTableRowGroupFrame* rowGroup = static_cast<nsTableRowGroupFrame*>(aFrame->GetParent()); rowGroup->GetContinuousBCBorderWidth(border); } //get the rest of the borders; will overwrite all but bottom aFrame->GetContinuousBCBorderWidth(border); nsresult res = mRow.SetBCBorder(border, this); if (!NS_SUCCEEDED(res)) { return res; } } aPassThrough = !mRow.IsVisible(); } /* Translate */ if (eOrigin_TableRow == mOrigin) { /* If we originate from the row, then make the row the origin. */ mRow.mRect.MoveTo(0, 0); } //else: Use row group's coord system -> no translation necessary for (nsTableCellFrame* cell = aFrame->GetFirstCell(); cell; cell = cell->GetNextCell()) { //Translate to use the same coord system as mRow. mCellRect = cell->GetRect() + mRow.mRect.TopLeft() + mRenderPt; if (mCellRect.Intersects(mDirtyRect)) { nsresult rv = PaintCell(cell, aPassThrough || cell->IsPseudoStackingContextFromStyle()); if (NS_FAILED(rv)) return rv; } } /* Unload row data */ mRow.Clear(); return NS_OK; }
/*-----------------------------------------------------------------*/ void __fastcall TFixeinzugForm::DrawData (TPaintBox* _pb, int _i) { short j = einzug[scrollx+_i]; if (j!=0 && j-1>=scrolly && j-1<scrolly+maxy) { int x, y; if (frm->righttoleft) x = (maxx-_i-1)*dx; else x = _i*dx; if (frm->toptobottom) y = (j-1-scrolly)*dy; else y = (maxy-(j-scrolly))*dy; PaintCell (pbFixeinzug->Canvas, DBWFRM->einzug.darstellung, x, y, x+dx, y+dy); } }