/*-----------------------------------------------------------------
LOG
    GEM - Graphics Environment for Multimedia

    Pixel color inversion

    Copyright (c) 1997-1998 Mark Danks. mark@danks.org
    For information on usage and redistribution, and for a DISCLAIMER OF ALL
    WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution.

-----------------------------------------------------------------*/

#ifndef INCLUDE_ASCII_TEXT_H_
#define INCLUDE_ASCII_TEXT_H_

#include "Base/GemPixObj.h"
#include <aalib.h>

/*-----------------------------------------------------------------
-------------------------------------------------------------------
CLASS
    ascii_text
    
    Pixel color inversion

KEYWORDS
    pix
    
DESCRIPTION

-----------------------------------------------------------------*/
class GEM_EXTERN ascii_text : public GemPixObj
{
     CPPEXTERN_HEADER(ascii_text, GemPixObj)
	  
 public:
     
     //////////
     // Constructor
     ascii_text(t_floatarg lines);
     
 protected:
     char* m_text;
     t_int m_lines;
     t_int m_cols;

     pixBlock  m_pixBlock;

     //////////
     // Destructor
     virtual ~ascii_text();
     
     //////////
     // Do the processing
     virtual void 	processImage(imageStruct &image);

     virtual void render(GemState *state);
     
     //////////
     // This is called whenever a new gray8 image comes through.
     //     virtual void 	processGrayImage(imageStruct &image);
     
     void text(t_int argc,t_atom*  argv);

     
 private:
     static void 	textMessCallback(void *data, t_symbol* s,t_int argc,t_atom* argv) 
	  { GetMyClass(data)->text(argc,argv);}

     
};

#endif	// for header file
