Changeset View
Changeset View
Standalone View
Standalone View
views/kpView_Paint.cpp
Context not available. | |||||
338 | painter.setPen(Qt::black); | 338 | painter.setPen(Qt::black); | ||
---|---|---|---|---|---|
339 | painter.setBrush(Qt::cyan); | 339 | painter.setBrush(Qt::cyan); | ||
340 | 340 | | |||
341 | for (const auto &r : selResizeHandlesRegion.rects()) { | 341 | for (const QRect &r : selResizeHandlesRegion) { | ||
342 | painter.drawRect(r); | 342 | painter.drawRect(r); | ||
343 | } | 343 | } | ||
344 | } | 344 | } | ||
Context not available. | |||||
585 | // It seems that e->region() is already clipped by Qt to the visible | 585 | // It seems that e->region() is already clipped by Qt to the visible | ||
586 | // part of the view (which could be quite small inside a scrollview). | 586 | // part of the view (which could be quite small inside a scrollview). | ||
587 | const auto& viewRegion = e->region (); | 587 | const auto& viewRegion = e->region (); | ||
588 | QVector <QRect> rects = viewRegion.rects (); | | |||
589 | #if DEBUG_KP_VIEW_RENDERER | 588 | #if DEBUG_KP_VIEW_RENDERER | ||
590 | qCDebug(kpLogViews) << "\t#rects = " << rects.count (); | 589 | qCDebug(kpLogViews) << "\t#viewRegion rects = " << viewRegion.rectCount (); | ||
591 | #endif | 590 | #endif | ||
592 | 591 | | |||
593 | // Draw all of the requested regions of the document _before_ drawing | 592 | // Draw all of the requested regions of the document _before_ drawing | ||
Context not available. | |||||
602 | // parts of nearby grid lines (which were drawn in a previous iteration) | 601 | // parts of nearby grid lines (which were drawn in a previous iteration) | ||
603 | // with document pixels. Those grid line parts are probably not going to | 602 | // with document pixels. Those grid line parts are probably not going to | ||
604 | // be redrawn, so will appear to be missing. | 603 | // be redrawn, so will appear to be missing. | ||
605 | for (const auto &r : rects) | 604 | for (const QRect &r : viewRegion) | ||
606 | { | 605 | { | ||
607 | paintEventDrawDoc_Unclipped (r); | 606 | paintEventDrawDoc_Unclipped (r); | ||
608 | } | 607 | } | ||
Context not available. | |||||
614 | if ( isGridShown() ) | 613 | if ( isGridShown() ) | ||
615 | { | 614 | { | ||
616 | QPainter painter(this); | 615 | QPainter painter(this); | ||
617 | for (const auto &r : rects) | 616 | for (const QRect &r : viewRegion) | ||
618 | paintEventDrawGridLines(&painter, r); | 617 | paintEventDrawGridLines(&painter, r); | ||
619 | } | 618 | } | ||
620 | 619 | | |||
Context not available. |