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') {
if(!strcmp(key, "keepratio")) {
i->keepratio = atoi(value);
return 1;
+ } else if(!strcmp(key, "centerx")) {
+ i->centerx = atoi(value);
+ return 1;
+ } else if(!strcmp(key, "centery")) {
+ i->centery = atoi(value);
+ return 1;
} else {
if(i->out) {
return i->out->setparameter(i->out,key,value);
gfxdevice_t* gfxdevice_rescale_new(gfxdevice_t*out, int width, int height, double scale)
{
gfxdevice_t* d = (gfxdevice_t*)malloc(sizeof(gfxdevice_t));
- gfxdevice_recale_init(d, out, width, height, scale);
+ gfxdevice_rescale_init(d, out, width, height, scale);
return d;
}