Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!uakari.primate.wisc.edu!ames!amdcad!sun!dogwalk!herzog From: herzog@dogwalk.Sun.COM (Brian Herzog) Newsgroups: comp.graphics Subject: Re: (Sun)PHIGS questions Keywords: SunPHIGS 1.1 Message-ID: <134064@sun.Eng.Sun.COM> Date: 6 Apr 90 03:33:50 GMT References: <5276@amelia.nas.nasa.gov> Sender: news@sun.Eng.Sun.COM Reply-To: herzog@sun.com (Brian Herzog) Distribution: usa Organization: Sun Microsystems, Mountain View Lines: 58 In article <5276@amelia.nas.nasa.gov> mckie@amelia.nas.nasa.gov (William McKie) writes: >We're running SunPHIGS 1.1 on our Sun-4/370-GX under 4.0.3 and SunView. >We've written several applications using SunPHIGS, and they are mostly >working, but the following questions have come up. > >The colour at any pixel appears as the logical OR of the background >colour and the colour of any foreground structure items. E.g. if >we select a red background colour, and draw a green line, the colour >of the line on the display is yellow. This is useful in many >situations, but we are wondering if there is a way to specify that >the colour of the latest drawn item is to be the actual colour of >that item, i.e. no mixing of foreground and background colours? > I am by no means a SunPHIGS expert, but I believe that the normal situation is that if you draw a green line, a green line should be displayed, regardless of the background color. It sounds as if something unusual is going on here; if you send me more detail about your application I'll try to help pinpoint what's happening. >We are creating graphics output on both the Sun console screen >(as a command tool workstation), and on binary and clear cgm >files. We are wondering if there is a way to input the contents of >a cgm file into a SunPHIGS program, [...] > SunGKS accepts CGM input, but SunPHIGS does not. If you would like this feature added, I suggest you submit an RFE (Request for Enhancement). RFE's *do* get read, and even work their way into product if there is sufficient customer demand. >By examining clear cgm output files from SunPHIGS programs, it >appears that when the program selects black as the background >colour (cgm workstation colour index 0), the cgm output file >contains no explicit declaration of background colour. Other >background colour selections within SunPHIGS result in an >explicit "BACKCOLR r g b" statement in the cgm file. Is this >correct behavior? I.e. is the default background colour in >cgm black? Our cgm translators and displayers appear to >interpret the default cgm background colour as white, which is >usually not what we intended when we selected black. > Although the CGM spec is relatively clear on this (thanks, Andrea, for your excellent explanation), our resident CGM guru informs me that other related specs muddy the waters by prohibiting an explicit color from being assigned to color index 0 or 1. Again, if you contact me directly I'll try to help you find a solution for your particular situation. > [...] we would like to find a >good text on PHIGS. Can anyone recommend a popular one? > SunPHIGS 1.2 (shipping next week) includes a new SunPHIGS Programmer's Guide (I'm not sure if that's the exact title), which should have at least some of the information you're looking for. You might also want to check out the on-line tutorial. ------------------------------------------------------------------------------ Brian Herzog "Badges? We ain't got no badges. We don't need no herzog@sun.com badges. I don't have to show you any stinking badges!" ..!sun!herzog - Treasure of the Sierra Madre