
#ifndef __POLY_H__
#define __POLY_H__

#include "image.h"
#include "scanline.h"

//---- POLYGON CLASS ---------------------------------------------------------//

#define POLY_MAX_POINTS 32
#define POLY_SCANLINE_POINTS 32

class Poly
{
public:

  Poly();
  ~Poly();

  void begin( );
  void end( );
  void addPoint( float x, float y );

  void firstPoint( );
  bool nextPoint( float *x, float *y );
  bool peekPoint( float *x, float *y );

  virtual void getScanline( Scanline *sl, int y );
  virtual void getVScanline( Scanline *sl, int x );

//  void render( class Image *im, int col );

private:

  //  Points

  int numpoints;
  float (*p)[2];

  int pointptr;
};



#endif

