Tizen 2.1 base
[platform/upstream/hplip.git] / prnt / hpcups / Scaler.h
1
2 #ifndef SCALER_H
3 #define SCALER_H
4
5 #include "CommonDefinitions.h"
6 #include "Processor.h"
7
8 class Scaler : public Processor
9 {
10 public:
11     Scaler(unsigned int inputwidth, unsigned int numerator,
12            unsigned int denominator, bool bVIP, unsigned int BytesPerPixel,
13            unsigned int iNumInks);
14     virtual ~Scaler();
15     bool Process(RASTERDATA* InputRaster);
16     virtual void Flush() { Process(NULL); }
17
18     float ScaleFactor;
19     unsigned int remainder;
20
21     unsigned int  GetMaxOutputWidth();
22     bool  NextOutputRaster(RASTERDATA &next_raster);
23
24 private:
25
26     bool scaling;       // false iff ScaleFactor==1.0
27     bool ReplicateOnly; // true iff 1<ScaleFactor<2
28
29     unsigned int iOutputWidth;
30     unsigned int iInputWidth;
31     BYTE     *pOutputBuffer[MAX_COLORTYPE];
32     bool     fractional;
33     unsigned int rowremainder;
34     unsigned int NumInks;
35     bool     vip;
36     DRIVER_ERROR constructor_error;
37 };
38 #endif // SCALER_H
39