File: setGraphicsDelay.Rd

package info (click to toggle)
rgl 1.3.34-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,968 kB
  • sloc: cpp: 23,234; ansic: 7,462; javascript: 6,125; sh: 3,555; makefile: 2
file content (42 lines) | stat: -rw-r--r-- 1,274 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
\name{setGraphicsDelay}
\alias{setGraphicsDelay}
\alias{RGL_SLOW_DEV}
\title{
Set a one-time slowdown on opening standard graphics
}
\description{
This function is mainly for internal use, to work around  
a bug in macOS Catalina:  if base plotting happens
too quickly after opening RGL and the first call to quartz, R crashes.

This inserts a delay after the first call to open the 
graphics device.  The default is
no delay, unless on Catalina with no graphics device
currently open but the \code{\link{quartz}} device set
as the default, when a 1 second delay will be added.
Use environment variable "RGL_SLOW_DEV = value" to set
a different default delay. 

It works by changing the value of \code{\link{options}("device")},
so explicit calls to the device will not be affected.

It is called automatically when the \pkg{rgl} package is loaded.  
}
\usage{
setGraphicsDelay(delay = Sys.getenv("RGL_SLOW_DEV", 0), 
                 unixos = "none")
}
\arguments{
  \item{delay}{
Number of seconds for the delay.
}
  \item{unixos}{
The name of the Unix OS.  If set to \code{"Darwin"}, 
and the version is 19.0.0 or greater, the default delay is
changed to 1 second.
}
}
\value{
Called for the side effect of adding the delay to the first
opening of the graphics device.
}