Hello,

Without feedback, it's hard to understand why text does not show up in the output—especially, if it shows up on one device but not on another. I suggest adding a warning message when text gets ignored, because the device doesn't support clipping (see the attached patch). Unfortunately, I cannot add a test, because warnings are sent to stderr and not stdout; however, the attached R script shows the warning.

A point for discussion is: how often does the described case occur and will a warning message confuse the user? For example, warnings as text gets completely clipped (engine.c:1417) will offend users, because they happen too often. But then again, all devices will most likely omit the text in this case. This is does not hold for the described case.

  Sebastian


Index: src/main/engine.c
===================================================================
--- src/main/engine.c   (revision 47716)
+++ src/main/engine.c   (working copy)
@@ -1424,7 +1424,7 @@
        if (toDevice) /* Device will do clipping */
            textfn(x, y, str, rot, hadj, gc, dd->dev);
        else /* don't draw anything; this could be made less crude :) */
-           ;
+           warning(_("current device doesn't support clipping, text removed 
'%s'"), str);
     }
 }
______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to