home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / postscri / 6083 < prev    next >
Encoding:
Text File  |  1992-12-22  |  2.3 KB  |  65 lines

  1. Newsgroups: comp.lang.postscript
  2. Path: sparky!uunet!paladin.american.edu!darwin.sura.net!gatech!concert!decwrl!adobe!asente
  3. From: asente@adobe.com (A Usenet Pal)
  4. Subject: Re: XDPS Color Use (once more...) 
  5. Message-ID: <1992Dec23.021201.14358@adobe.com>
  6. Keywords: XDPS setXrgbactual
  7. Sender: usenet@adobe.com (USENET NEWS)
  8. Organization: Adobe Systems Incorporated
  9. References: <AM39QBM@math.fu-berlin.de>
  10. Date: Wed, 23 Dec 1992 02:12:01 GMT
  11. Lines: 52
  12.  
  13. In article <AM39QBM@math.fu-berlin.de> Andre_Beck@irs.inf.tu-dresden.de (Andre Beck) writes:
  14. >Hi PostScript(tm)-Gurus,
  15. >
  16. >after some discussions to the Color use
  17. >of [X]DPS on colormapped displays (instead of truecolor ones) I came up
  18. >with the thought of
  19. >
  20. > red green blue setXrgbactual pop
  21. >
  22. >would do a color cell allocation for me, with red, green, blue beeing
  23. >some floats 0..1 and the popped bool indicates if it was successful.
  24.  
  25. Yes, that's correct
  26.  
  27. >I tried this immediately with dpsexec (a neat client that simply sends
  28. >my trash to the server) and was surprised to get a success indicator even
  29. >if I used floats 0..1 for the rgb values, or f.i. ints like 200, 2000,
  30. >66000 ... i got true.
  31.  
  32. Neither setXrgbactual nor setrgbcolor nor any of its friends do range
  33. checking.  Any value outside of 0..1 is just truncated.  So the color
  34. (100, -10, -1000) is the same as (1, 0, 0) -- red.
  35.  
  36. >Does this setXrgbactual thingy do some autoscaling ???
  37.  
  38. No, just truncation.
  39.  
  40. >Or is it only defined as { pop pop pop true } on my machine's XDPS
  41. >system ? (DEC 5000 Ultrix 4.3)
  42.  
  43. No, it works.  Try this code
  44.  
  45. .3 .4 .5 setrgbcolor
  46. 0 0 100 100 rectfill        % see blue-gray dithered square
  47. .3 .4 .5 setXrgbactual pop
  48. 100 0 100 100 rectfill        % see solid blue-gray square next to it
  49.  
  50. The operator WILL return false if your colormap is full and it cannot
  51. allocate the cell.
  52.  
  53. >At the moment methinks the latter is true, because the following code
  54. >to display colormapped images still dithers its output:
  55.  
  56. In Level 1 DPS systems, actual cells do not affect colorimage rendering.
  57. Level 2 DPS systems, which will be showing up before too long, allow you to
  58. control the rendering much more closely by using indexed color spaces.
  59.  
  60. __   -paul asente
  61. \/     asente@adobe.com   ...decwrl!adobe!asente   moo-bear@cs.stanford.edu
  62.  
  63. The most dangerous creation of any society is that man who has
  64. nothing to lose.                -James Baldwin
  65.