Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!bu.edu!bucrf11.bu.edu!tjh From: tjh@bucrf11.bu.edu (Tim Hall) Newsgroups: comp.sys.sgi Subject: Re: Getting compor map colors. Keywords: getmcolor Message-ID: <80085@bu.edu.bu.edu> Date: 24 Apr 91 14:45:08 GMT References: <1991Apr22.153229.7358@cs.ruu.nl> Sender: news@bu.edu.bu.edu Organization: Boston University Lines: 34 In article <1991Apr22.153229.7358@cs.ruu.nl>, markov@cs.ruu.nl (Mark Overmars) writes: |> I have the following problem. I want to draw colormap images inside a RGB |> window. As a result I need to find out what the colors in the colormap are. To |> this end I thought I should use the routine |> |> getmcolor() |> |> Unfortunately, this routine only work when you are in colormap mode, not when |> you are in RGB mode. (Why?) Dunno why, but you could always do somthing like...... current_window = winget(); /* Remember what the current window is */ noport(); /* Open a window that never appears */ color_window = winopen( NULL); Read the color map here. winclose( color_window ); if ( current_window > 0 ) /* >= ???? I forget.... */ winset( current_window ); Yuk, what a kludge. |> Mark Overmars -- -Tim Hall tjh@bu-pub.bu.edu The night is filled with the cries of dispossessed children in search of paradise. -Dead Can Dance