git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
23fc2d5
)
drop parameters into output device as well as input device
author
kramm
<kramm>
Sun, 6 Apr 2008 16:52:14 +0000
(16:52 +0000)
committer
kramm
<kramm>
Sun, 6 Apr 2008 16:52:14 +0000
(16:52 +0000)
src/pdf2swf.c
patch
|
blob
|
history
diff --git
a/src/pdf2swf.c
b/src/pdf2swf.c
index
975aa6c
..
39680cf
100644
(file)
--- a/
src/pdf2swf.c
+++ b/
src/pdf2swf.c
@@
-39,7
+39,8
@@
#define SWFDIR concatPaths(getInstallationPath(), "swfs")
#define SWFDIR concatPaths(getInstallationPath(), "swfs")
-gfxsource_t*driver;
+static gfxsource_t*driver = 0;
+static gfxdevice_t*out = 0;
static char * outputname = 0;
static int loglevel = 3;
static char * outputname = 0;
static int loglevel = 3;
@@
-188,9
+189,11
@@
int args_callback_option(char*name,char*val) {
*c = 0;
c++;
driver->set_parameter(driver, s,c);
*c = 0;
c++;
driver->set_parameter(driver, s,c);
- }
- else
+ out->setparameter(out, s,c);
+ } else {
driver->set_parameter(driver, s,"1");
driver->set_parameter(driver, s,"1");
+ out->setparameter(out, s,"1");
+ }
return 1;
}
else if (!strcmp(name, "S"))
return 1;
}
else if (!strcmp(name, "S"))
@@
-528,8
+531,18
@@
int main(int argn, char *argv[])
#endif
driver = gfxsource_pdf_create();
#endif
driver = gfxsource_pdf_create();
+ gfxdevice_t swf,wrap;
+ gfxdevice_swf_init(&swf);
+
+ gfxdevice_removeclippings_init(&wrap, &swf);
+
+ out = &wrap;
processargs(argn, argv);
processargs(argn, argv);
+ if(!flatten) {
+ out = &swf;
+ }
+
if(!filename)
{
fprintf(stderr, "Please specify an input file\n");
if(!filename)
{
fprintf(stderr, "Please specify an input file\n");
@@
-583,17
+596,6
@@
int main(int argn, char *argv[])
exit(1);
}
exit(1);
}
- gfxdevice_t swf,wrap;
- gfxdevice_swf_init(&swf);
- gfxdevice_t*out;
-
- if(flatten) {
- gfxdevice_removeclippings_init(&wrap, &swf);
- out = &wrap;
- } else {
- out = &swf;
- }
-
struct mypage_t {
int x;
int y;
struct mypage_t {
int x;
int y;