(******************************************************************************
*                                COLORI11.DEF                                 *
*                              ABO Software Dep.                              *
*                                                                             *
* Purpose : To provide a device independent color type and routines for       *
*         generating and manipulating them.                                   *
*                                                                             *
*   Notes : Since colors are usualy more limited by the hardware than these   *
*         routines can provide, halftoning should be used where possible.     *
*                                                                             *
*         Version Date : 26/07/96                                             *
******************************************************************************)
DEFINITION MODULE COLORI1;

IMPORT FIO;

TYPE

  ColorRGB    =RECORD
    R          :SHORTCARD;
    G          :SHORTCARD;
    B          :SHORTCARD;
	END;

	ColorHSV    =RECORD
    H          :SHORTCARD;
    S          :SHORTCARD;
    V          :SHORTCARD;
	END;

	ColorHLS    =RECORD
    H          :SHORTCARD;
    L          :SHORTCARD;
    S          :SHORTCARD;
	END;

	ColorRGBI   =RECORD
    R          :SHORTCARD;
    G          :SHORTCARD;
    B          :SHORTCARD;
    I          :SHORTCARD;
	END;

PROCEDURE AddRGB(c1,c2:ColorRGB):ColorRGB;
PROCEDURE MulRGB(c1,c2:ColorRGB):ColorRGB;

PROCEDURE ConHSVtoRGB(hsv:ColorHSV):ColorRGB;
PROCEDURE ConRGBtoHSV(rgb:ColorRGB):ColorHSV;
(*
PROCEDURE ConHLStoRGB(hls:ColorHLS):ColorRGB;
PROCEDURE ConRGBtoHLS(rgb:ColorRGB):ColorHLS;

PROCEDURE ConRGBItoRGB(rgbi:ColorRGBI):ColorRGB ;
PROCEDURE ConRGBtoRGBI(rgb :ColorRGB ):ColorRGBI;

PROCEDURE RdRGB(f:FIO.File):ColorRGB;
PROCEDURE RdHSV(f:FIO.File):ColorHSV;
PROCEDURE RdHLS(f:FIO.File):ColorHLS;

PROCEDURE WrRGB(f:FIO.File;rgb:ColorRGB);
PROCEDURE WrHSV(f:FIO.File;hsv:ColorHSV);
PROCEDURE WrHLS(f:FIO.File;hls:ColorHLS);

PROCEDURE debugRGB(rgb:ColorRGB);
PROCEDURE debugHSV(rgb:ColorHSV);
PROCEDURE debugHLS(rgb:ColorHLS);
*)
END COLORI1.
