~ubuntu-branches/ubuntu/raring/hplip/raring

« back to all changes in this revision

Viewing changes to prnt/hpcups/Scaler.h

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2009-12-14 20:08:44 UTC
  • mfrom: (2.1.118 lucid)
  • Revision ID: james.westby@ubuntu.com-20091214200844-z8qhqwgppbu3t7ze
Tags: 3.9.10-4
KBSD patch from KiBi (Closes: #560796)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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