home *** CD-ROM | disk | FTP | other *** search
/ PC Administrator / spravce.iso / RunModule / src / Hls.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-01  |  1.3 KB  |  39 lines

  1. // HLS.h: interface for the CHLS class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4.  
  5. #if !defined(AFX_HLS_H__73AE3C41_8029_11D4_93B2_00A0CC3702BF__INCLUDED_)
  6. #define AFX_HLS_H__73AE3C41_8029_11D4_93B2_00A0CC3702BF__INCLUDED_
  7.  
  8. #if _MSC_VER > 1000
  9. #pragma once
  10. #endif // _MSC_VER > 1000
  11.  
  12. #define  HLSMAX   252    // H,L, and S vary over 0-HLSMAX 
  13. #define  RGBMAX   252   // R,G, and B vary over 0-RGBMAX 
  14.                         // HLSMAX BEST IF DIVISIBLE BY 6 
  15.                         // RGBMAX, HLSMAX must each fit in a byte. 
  16.  
  17. // Hue is undefined if Saturation is 0 (grey-scale) 
  18. // This value determines where the Hue scrollbar is 
  19. // initially set for achromatic colors 
  20. #define UNDEFINED (HLSMAX*2/3)
  21.  
  22. class CHLS
  23. {// begin CHLS
  24.  
  25. public:
  26.     CHLS::CHLS();
  27.     CHLS::CHLS(unsigned short int h,unsigned short int l,unsigned short int s);    //constructor #2
  28.     CHLS::CHLS(unsigned long int RGBColor);
  29.     ~CHLS();
  30.     unsigned short int CHLS::HueToRGB(unsigned short int n1,unsigned short int n2,unsigned short int hue);
  31.     unsigned long int CHLS::ToRGB();
  32.  
  33. protected:
  34.     unsigned short int H;
  35.     unsigned short int L;
  36.     unsigned short int S;
  37. };// end CHLS
  38. #endif // !defined(AFX_HLS_H__73AE3C41_8029_11D4_93B2_00A0CC3702BF__INCLUDED_)
  39.