-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpsrip_core.h
55 lines (50 loc) · 1.27 KB
/
psrip_core.h
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef PSRIP_CORE_H
#define PSRIP_CORE_H
#include "imagesource.h"
#include "tempfile.h"
#include "configdb.h"
#include "searchpath.h"
#include "progress.h"
#include "threadevent.h"
#include "threadutil.h"
#include "externalghostscript.h"
class PSRipOptions : public ExternalGhostScript
{
public:
PSRipOptions(IS_TYPE type=IS_TYPE_RGB,int resolution=300,int firstpage=0,int lastpage=0,bool textantialias=false,bool gfxantialias=true);
virtual ~PSRipOptions();
virtual void RunProgram(std::string &filename);
void ToDB(ConfigDB &db);
void FromDB(ConfigDB &db);
IS_TYPE type;
int resolution;
int firstpage;
int lastpage;
bool textantialias;
bool gfxantialias;
protected:
};
class PSRip_TempFile;
class Thread_PSRipFileMonitor;
class Thread_PSRipProcess;
class PSRip : public TempFileTracker, public ThreadEventHandler
{
public:
PSRip();
~PSRip();
void Rip(const char *filename,PSRipOptions &options);
void Stop();
bool TestFinished();
void WaitFinished();
bool TestPage(int page);
void WaitPage(int page);
char *GetRippedFilename(int page,const char *basename=NULL);
ThreadEvent Event;
protected:
char *tempname;
Thread_PSRipProcess *ripthread;
Thread_PSRipFileMonitor *monitorthread;
friend class Thread_PSRipFileMonitor;
friend class Thread_PSRipProcess;
};
#endif