File: Scaler.h

package info (click to toggle)
hplip 3.22.10%2Bdfsg0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 171,296 kB
  • sloc: python: 83,373; ansic: 71,016; cpp: 65,202; sh: 4,408; perl: 4,397; makefile: 937
file content (39 lines) | stat: -rw-r--r-- 941 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

#ifndef SCALER_H
#define SCALER_H

#include "CommonDefinitions.h"
#include "Processor.h"

class Scaler : public Processor
{
public:
    Scaler(unsigned int inputwidth, unsigned int numerator,
           unsigned int denominator, bool bVIP, unsigned int BytesPerPixel,
           unsigned int iNumInks);
    virtual ~Scaler();
    bool Process(RASTERDATA* InputRaster);
    virtual void Flush() { Process(NULL); }

    float ScaleFactor;
    unsigned int remainder;

    unsigned int  GetMaxOutputWidth();
    bool  NextOutputRaster(RASTERDATA &next_raster);

private:

    bool scaling;       // false iff ScaleFactor==1.0
    bool ReplicateOnly; // true iff 1<ScaleFactor<2

    unsigned int iOutputWidth;
    unsigned int iInputWidth;
    BYTE     *pOutputBuffer[MAX_COLORTYPE];
    bool     fractional;
    unsigned int rowremainder;
    unsigned int NumInks;
    bool     vip;
    DRIVER_ERROR constructor_error;
};
#endif // SCALER_H