home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Graphics / graphics-16000.iso / msdos / raytrace / rayshade / src / picture.h < prev    next >
C/C++ Source or Header  |  1991-07-18  |  1KB  |  48 lines

  1. /*
  2.  * picture.h
  3.  *
  4.  * Copyright (C) 1989, 1991, Craig E. Kolb
  5.  * All rights reserved.
  6.  *
  7.  * This software may be freely copied, modified, and redistributed
  8.  * provided that this copyright notice is preserved on all copies.
  9.  *
  10.  * You may not distribute this software, in whole or in part, as part of
  11.  * any commercial product without the express consent of the authors.
  12.  *
  13.  * There is no warranty or other guarantee of fitness of this software
  14.  * for any purpose.  It is provided solely "as is".
  15.  *
  16.  * $Id: picture.h,v 4.0 91/07/17 14:47:07 kolb Exp Locker: kolb $
  17.  *
  18.  * $Log:    picture.h,v $
  19.  * Revision 4.0  91/07/17  14:47:07  kolb
  20.  * Initial version.
  21.  * 
  22.  */
  23. #ifndef PICTURE_H
  24. #define PICTURE_H
  25.  
  26. #ifdef URT
  27. #include "rle.h"
  28. #include "rle_raw.h"
  29. #endif
  30.  
  31. #define CORRECT(x)        (correct(GAMMACORRECT(x)))
  32. #define GAMMACORRECT(x)        (Options.gamma == 1. ? (x) \
  33.                    : (pow(x, Options.gamma)))
  34. /*
  35.  * Pixel
  36.  */
  37. typedef struct Pixel {
  38.     Float r, g, b, alpha;        /* Red, green, blue, alpha channel */
  39. } Pixel;
  40.  
  41. extern void    PictureStart(), PictureEnd(), PictureWriteLine();
  42.  
  43. #ifdef URT
  44. extern void    PictureSetWindow();
  45. #endif
  46.  
  47. #endif /* PICTURE_H */
  48.