[education/rkward] rkward/rbackend/rkwarddevice: Graphics device clear needs to ignore (and reset) clip

Thomas Friedrichsmeier null at kde.org
Mon Apr 11 22:13:38 BST 2022


Git commit 8935526c64a8075e29805a06c4b53e0c7f0f2d3b by Thomas Friedrichsmeier.
Committed on 11/04/2022 at 21:13.
Pushed by tfry into branch 'master'.

Graphics device clear needs to ignore (and reset) clip

M  +1    -2    rkward/rbackend/rkwarddevice/rkgraphicsdevice.cpp

https://invent.kde.org/education/rkward/commit/8935526c64a8075e29805a06c4b53e0c7f0f2d3b

diff --git a/rkward/rbackend/rkwarddevice/rkgraphicsdevice.cpp b/rkward/rbackend/rkwarddevice/rkgraphicsdevice.cpp
index ee49dc83..42500baa 100644
--- a/rkward/rbackend/rkwarddevice/rkgraphicsdevice.cpp
+++ b/rkward/rbackend/rkwarddevice/rkgraphicsdevice.cpp
@@ -219,9 +219,9 @@ void RKGraphicsDevice::closeDevice (int devnum) {
 void RKGraphicsDevice::clear(const QBrush& brush) {
 	RK_TRACE (GRAPHICS_DEVICE);
 
+	setClip(area.rect ());	// R's devX11.c resets clip on clear, so we do this, too.
 	if (recording_path) {
 		recorded_path = QPainterPath();
-		setClip(area.rect());	// R's devX11.c resets clip on clear, so we do this, too.
 		return;
 	}
 
@@ -235,7 +235,6 @@ void RKGraphicsDevice::clear(const QBrush& brush) {
 	if (current_mask) commitMaskedDraw();
 
 	updateNow ();
-	setClip (area.rect ());	// R's devX11.c resets clip on clear, so we do this, too.
 }
 
 void RKGraphicsDevice::setAreaSize (const QSize& size) {


More information about the rkward-tracker mailing list