[education/rkward] rkward/rbackend/rkwarddevice: Add dummies for the new R graphics functions to avoid crash.
Thomas Friedrichsmeier
null at kde.org
Sat Jun 26 21:17:50 BST 2021
Git commit 3ea95cb816e7388b9d0e4c8bb2092b29054243bb by Thomas Friedrichsmeier.
Committed on 26/06/2021 at 20:17.
Pushed by tfry into branch 'master'.
Add dummies for the new R graphics functions to avoid crash.
This is not a proper implementation, yet.
CCBUG: https://bugs.kde.org/show_bug.cgi?id=438993
M +14 -1 rkward/rbackend/rkwarddevice/rkgraphicsdevice_setup.cpp
M +36 -0 rkward/rbackend/rkwarddevice/rkgraphicsdevice_stubs.cpp
https://invent.kde.org/education/rkward/commit/3ea95cb816e7388b9d0e4c8bb2092b29054243bb
diff --git a/rkward/rbackend/rkwarddevice/rkgraphicsdevice_setup.cpp b/rkward/rbackend/rkwarddevice/rkgraphicsdevice_setup.cpp
index 9909639f..e215c090 100644
--- a/rkward/rbackend/rkwarddevice/rkgraphicsdevice_setup.cpp
+++ b/rkward/rbackend/rkwarddevice/rkgraphicsdevice_setup.cpp
@@ -216,6 +216,19 @@ bool RKGraphicsDeviceDesc::init (pDevDesc dev, double pointsize, const QStringLi
#endif
dev->newFrameConfirm = RKD_NewFrameConfirm;
+#if R_VERSION >= R_Version (2, 14, 0)
+ dev->holdflush = RKD_HoldFlush;
+#endif
+
+#if R_VERSION >= R_Version (4, 1, 0)
+ dev->setPattern = RKD_SetPattern;
+ dev->releasePattern = RKD_ReleasePattern;
+ dev->setClipPath = RKD_SetClipPath;
+ dev->releaseClipPath = RKD_ReleaseClipPath;
+ dev->setMask = RKD_SetMask;
+ dev->releaseMask = RKD_ReleaseMask;
+ dev->deviceVersion = 14;
+ dev->deviceClip = FALSE; // for now
+#endif
return true;
}
-
diff --git a/rkward/rbackend/rkwarddevice/rkgraphicsdevice_stubs.cpp b/rkward/rbackend/rkwarddevice/rkgraphicsdevice_stubs.cpp
index 716a9511..b7be1609 100644
--- a/rkward/rbackend/rkwarddevice/rkgraphicsdevice_stubs.cpp
+++ b/rkward/rbackend/rkwarddevice/rkgraphicsdevice_stubs.cpp
@@ -579,5 +579,41 @@ void RKD_onExit (pDevDesc dev) {
}
dev->gettingEvent = (Rboolean) false;
}
+#endif
+
+#if R_VERSION >= R_Version (2, 14, 0)
+int RKD_HoldFlush (pDevDesc dev, int level) {
+#warning implement me
+ return 0;
+}
+#endif
+
+#if R_VERSION >= R_Version (4, 1, 0)
+SEXP RKD_SetPattern (SEXP pattern, pDevDesc dd) {
+#warning implement me
+ return R_NilValue;
+}
+
+void RKD_ReleasePattern (SEXP ref, pDevDesc dd) {
+#warning implement me
+}
+
+SEXP RKD_SetClipPath (SEXP path, SEXP ref, pDevDesc dd) {
+#warning implement me
+ return R_NilValue;
+}
+
+void RKD_ReleaseClipPath (SEXP ref, pDevDesc dd) {
+#warning implement me
+}
+
+SEXP RKD_SetMask (SEXP path, SEXP ref, pDevDesc dd) {
+#warning implement me
+ return R_NilValue;
+}
+
+void RKD_ReleaseMask (SEXP ref, pDevDesc dd) {
+#warning implement me
+}
#endif
More information about the rkward-tracker
mailing list