Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!bu-cs!purdue!decwrl!sun!pitstop!sundc!seismo!uunet!mcvax!ukc!eagle!rlh2 From: rlh2@eagle.ukc.ac.uk (R.L.Hesketh) Newsgroups: comp.windows.x Subject: Re: String --> Pixel conversions Message-ID: <5059@eagle.ukc.ac.uk> Date: 25 May 88 09:25:48 GMT References: <2877@di.sei.cmu.edu> <8805232258.AA22283@gilroy.dec.com> Reply-To: rlh2@ukc.ac.uk (Richard Hesketh) Organization: Computing Lab, University of Kent at Canterbury, UK. Lines: 28 In article <8805232258.AA22283@gilroy.dec.com> asente@WSL.DEC.COM writes: >>However, if an Arg structure like: >> >> {XtNlineColor, "Green"}, >> [ question deleted ] >Yes, it is incorrect. Resource conversions do not take place in arg >lists. If you think about it, you'll realize that you never specified >anywhere in the arg list that you were passing it a string instead of a pixel value. > > -paul asente What nobody has mentioned is a method of getting around this and actually produce the right pixel value. From looking through Converters.c and Convert.c, there is a direct CvtStringToPixel routine, however it is static. But it calls XtDirectConvert a non-static ( hence public? ) routine in Convert.c Is it ok to call XtDirectConvert with the type of conversion you wish to make and let it do its stuff? Richard -- Richard Hesketh: rlh2@ukc.ac.uk | --- | Computing Lab., University of Kent at Canterbury, | Canterbury, Kent, CT2 7NF, England. |