home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!spool.mu.edu!yale.edu!yale!gumby!destroyer!fmsrl7!lynx!nmsu.edu!dante!mdowell
- From: mdowell@dante.nmsu.edu (Mike Dowell)
- Subject: Re: Dynamic Colormaps and xview...
- Message-ID: <1992Dec14.231133.12965@nmsu.edu>
- Sender: Asbestos...Head Elf in charge of flamage...
- Organization: Santa's Elves...
- Distribution: usa
- Date: Mon, 14 Dec 1992 23:11:33 GMT
- Lines: 60
-
- In article <1992Dec11.225251.8245@nmsu.edu> mdowell@dante.nmsu.edu (Mike Dowell) writes:
- >
- >I am in desperate need of help!!
- >
- >I am working on a surface plot program and would like to allocate my
- >own colormap for the window with 250 colors plus my control colors.
- >
- >I would also like to change the palette on the fly, ie. dynamic
- >colors. I would like the same effect as the X11 program XColor which
- >switches to its palette as soon as you focus on it.
- >
- >I can't for the life of me get all the right parameters....
- >
- >I have created a cms with the command:
- >
- > cms = xv_create(NULL, CMS,
- > CMS_TYPE, XV_DYNAMIC_CMS,
- > CMS_CONTROL_CMS, FALSE,
- > CMS_SIZE, NUM_COLORS,
- > NULL);
- >
- >My program has the base window, a control box and a canvas.
- >
- >So the created cms has NULL as the owner...so then I do
- >an xv_set:
- >
- > xv_set(Grfbase_window1->canvas1, CMS_NAME, cms, NULL);
- >
- >to associate the cms with my canvas...
- >
- >This does not give me what I want...
- >
-
-
- The problem is obvious you're using XVIEW which is a piece of
- garbage!!! If you check the Xlib manuals you will find a simple
- and elegant way to accomplish your task...
-
- Enjoy!!
-
-
- ____ __.---""---.__ ____
- /####\/ \/####\
- ( /\ ) ( /\ )
- \____/ \____/
- __/ \__
- .-" . . "-.
- | | \.._ _../ | |
- \ \ \."-.__________.-"./ / /
- \ \ "--.________.--" / /
- ___\ \_ * _/ /___
- ./ ))))) * * ((((( \.
- \ ***** / ASBESTOS THE WONDER FROG!!
- \ \_ * * _/ /
- \ \____/""-.____.-""\____/ /
- \ \ / /
- \. .| |. ./
- ." / | \ / | \ ".
- ." / | \ / | \ ".
- /.-./.--.|.--.\ /.--.|.--.\.-.|
-