void OpDragBox::DrawXorRect(const DocRect& drClip, Spread* pspdXor, const DocRect& drXor) const { // Check if we have nothing to do. if (drXor.IsEmpty()) return; // Ask the derived class what colour its drag box is. If we are doing solid drags we // want to use the same colour to fill the box as well, otherwise we fill with no colour. StockColour scLineColour = GetBoxColour(); StockColour scFillColour = (m_fDoSolidDragBoxes) ? scLineColour : COLOUR_NONE; // Xor the rect on all supplied render-regions. RenderRegion* pRegion = DocView::RenderOnTop(&((DocRect&) drClip), pspdXor, ClippedEOR); while (pRegion != NULL) { // Set the line and fill colours. pRegion->SetLineColour(scLineColour); pRegion->SetFillColour(scFillColour); // Draw the xored drag box and go on to the next render-region. pRegion->DrawDragRect(&((DocRect&) drXor)); pRegion = DocView::GetNextOnTop(&((DocRect&) drClip)); } }