git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added workaround for broken Flash text selection
[swftools.git]
/
lib
/
devices
/
rescale.c
diff --git
a/lib/devices/rescale.c
b/lib/devices/rescale.c
index
b8530b9
..
649601f
100644
(file)
--- a/
lib/devices/rescale.c
+++ b/
lib/devices/rescale.c
@@
-54,7
+54,7
@@
static void dbg(char*format, ...)
int l;
va_list arglist;
va_start(arglist, format);
int l;
va_list arglist;
va_start(arglist, format);
- vsprintf(buf, format, arglist);
+ vsnprintf(buf, sizeof(buf)-1, format, arglist);
va_end(arglist);
l = strlen(buf);
while(l && buf[l-1]=='\n') {
va_end(arglist);
l = strlen(buf);
while(l && buf[l-1]=='\n') {
@@
-325,3
+325,10
@@
void gfxdevice_rescale_setdevice(gfxdevice_t*dev, gfxdevice_t*out)
}
i->out = out;
}
}
i->out = out;
}
+
+gfxdevice_t* gfxdevice_rescale_new(gfxdevice_t*out, int width, int height, double scale)
+{
+ gfxdevice_t* d = (gfxdevice_t*)malloc(sizeof(gfxdevice_t));
+ gfxdevice_rescale_init(d, out, width, height, scale);
+ return d;
+}