Skip to content

Commit

Permalink
Merge pull request #21 from J5lx/MrStevns/painting-blitting-improveme…
Browse files Browse the repository at this point in the history
…nts-v2

Fix ScribbleArea repaint when tiled buffer does not cover update rect
  • Loading branch information
MrStevns authored Sep 18, 2023
2 parents 3566a5a + 1f6d93c commit e79a399
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core_lib/src/canvaspainter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ void CanvasPainter::paintCurrentBitmapFrame(QPainter& painter, const QRect& blit
// so in that case, in order to see the previously laid-down polyline stroke,
// the surrounding area must be drawn again before
// applying the new tiled output on top
if (mOptions.bIgnoreCanvasBuffer) {
if (!blitRect.contains(mTiledBuffer->bounds()) || mOptions.bIgnoreCanvasBuffer) {
currentBitmapPainter.setCompositionMode(QPainter::CompositionMode_Source);
currentBitmapPainter.drawImage(paintedImage->topLeft(), *paintedImage->image());
}
Expand Down
2 changes: 1 addition & 1 deletion core_lib/src/interface/scribblearea.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ void ScribbleArea::paintEvent(QPaintEvent* event)

// paints the canvas
painter.setWorldMatrixEnabled(false);
painter.drawPixmap(QPoint(0, 0), mCanvas);
painter.drawPixmap(event->rect(), mCanvas, event->rect());

currentTool()->paint(painter);

Expand Down

0 comments on commit e79a399

Please sign in to comment.