From kohnicho@comp.nus.edu.sg  Wed Oct  4 09:51:39 2000
From: kohnicho@comp.nus.edu.sg (Nicholas Lewin-Koh)
Date: Wed, 4 Oct 2000 16:51:39 +0800 (GMT-8)
Subject: [Rd] R_ColorTable
In-Reply-To: <Pine.GSO.4.05.10010040828090.1246-100000@toucan.stats>
Message-ID: <Pine.GSO.4.21.0010041640330.11956-100000@sununx.comp.nus.edu.sg>

Hi,
Thanks. I am working in windows, and adding R_ColorTable to globalvar.h
 and the list of export functions would not be portable, would it? Just
some background, I am building an interactive color picker for R, and i
need to be able to Display the colors in the current palette so that they
can be edited. I can do something like 
current.palette<-palette()
.Call("colorpick",current.palette)

However, if there are named colors in the palette I have to do a lot of
dancing around to get it to a list of rgb values. I thought if there was
an easy way, I could avoid rewriting a lot of internal code.

Besides accessing the palette everything works dandy using graphapp. 


Nicholas

                 CH3
                  |
                  N             Nicholas Lewin-Koh
                 / \            Dept of Statistics
           N----C   C==O        Program in Ecology and Evolutionary Biology
          ||   ||   |           Iowa State University
          ||   ||   |           Ames, IA 50011
          CH    C   N--CH3      http://www.public.iastate.edu/~nlewin
            \  / \ /            nlewin@iastate.edu
             N    C
             |   ||             Currently
            CH3   O             Graphics Lab
                                School of Computing
                                National University of Singapore
     The Real Part of Coffee    kohnicho@comp.nus.edu.sg

On Wed, 4 Oct 2000, Prof Brian Ripley wrote:

> On Wed, 4 Oct 2000, Prof Brian D Ripley wrote:
> 
> > I should point out that Graphics.h (it is capitalized) is not a distributed
> > header and not supported for use in addons.  We've had discussions about
> > changing some of that.
> 
> Sorry, I garbled that.  What I meant to say is that Graphics.h is not in
> R_ext and does not start with `R', only such headers are exported.
> 
> We have talked about exporting some of the graphics functions.  The
> problem is the device driver defns, which I at least do not think are
> stable enough to export. So the idea that we were exploring was to 
> have *DevDesc as an opaque type in the exported header, and only allow
> internal code access to its internals.  (If functions using *GPar 
> need to be exported, then that would need to be made opaque too.)
> 
> Separately, Duncan TL was interested in accessing the driver part for an
> addon driver, and I don't think we got too far in resolving that.
> 
> -- 
> Brian D. Ripley,                  ripley@stats.ox.ac.uk
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272860 (secr)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
> 

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] R_ColorTable
Nicholas Lewin-Koh