/*
 * ImageRotator.h
 *
 * (c) 2002 by Thorsten Scheuermann <tscheuermann@gmx.net>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 */

#ifndef _IMAGEROTATOR_H
#define _IMAGEROTATOR_H

#include "ViewerGlobals.h"
#include "ImageDataSink.h"

class Image;

class ImageRotator : public ImageDataSink
{
public:
  ImageRotator();
  virtual ~ImageRotator();

  virtual void setImageDimension(int w, int h);
  virtual void setNumImageChannels(int c);
  virtual void startImage();
  virtual void endImage();
  virtual void imageRow(unsigned char *rowData);
  virtual void imageRow(fixed *rowData);

  void setRotation(RotationMode rot);
  void setDestImage(Image *img);

protected:
  int inWidth;
  int inHeight;
  int outWidth;
  int outHeight;
  int count;

  RotationMode rotation;
  Image *destImage;
};

#endif
