-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
core.R: Add colorMode specific constants #191
Conversation
Signed-off-by: Ce Gao <ce.gao@outlook.com>
Nice addition. Why was adding the constants combined with dropping casting for colorMode? Is the idea that users should only use the constants? |
Also: The complete list of PConstants is here: Is there any reason not to simply add ALL of them to src/rprocessing/r/core.R at one time, rather than adding them one by one as we look at support for different features? |
I am not sure if all of these are built-in in PDE. |
They are ALL built in to PDE. PConstants is an interface, and PDE Java mode implements that interface -- the same way that in BuiltinApplet.java
The only ones worth leaving out and not mapping are the few constants marked It is too bad we can't import PConstants into renjin in order to access these, but I believe that doesn't work...? If it was in Java we could use reflection to iterate over the PConstants interface ( https://stackoverflow.com/questions/9700081/in-java-how-to-iterate-on-the-constants-of-an-interface ) -- but in You can inspect the output from them all if you want by printing each one in a PDE(Java) sketch ... but they are all there:
|
OK got it! I will add them all |
Signed-off-by: Ce Gao ce.gao@outlook.com