1 /*
2  * imagesource_rotate.h - filter to rotate an image through
3  * 0, 90, 180 or 270 degrees.
4  * supports random access, even if source image doesn't.
5  *
6  * Copyright (c) 2004 by Alastair M. Robinson
7  * Distributed under the terms of the GNU General Public License -
8  * see the file named "COPYING" for more details.
9  *
10  */
11 
12 #ifndef IMAGESOURCE_ROTATE_H
13 #define IMAGESOURCE_ROTATE_H
14 
15 #include "imagesource.h"
16 #include "imagesource_interruptible.h"
17 
18 struct ImageSource *ImageSource_Rotate_New(struct ImageSource *source,int rotation,int spanrows);
19 
20 class ImageSource_Rotate : public ImageSource_Interruptible
21 {
22 	public:
23 	ImageSource_Rotate(ImageSource *source,int rotation,int spanrows=1024);
24 	~ImageSource_Rotate();
25 	ISDataType *GetRow(int row);
26 	private:
27 	ImageSource *source;
28 	int rotation;
29 	int spanfirstrow;
30 	int spanrows;
31 	int samplesperrow;
32 	ISDataType *spanbuffer;
33 };
34 
35 #endif
36