job->pagesArraySize.x = job->pagesArraySize.y = job->numPages = 1;
}
+ /* initial window size */
+ job->width = (imageSize.x + 2*margin.x) * job->dpi.x / POINTS_PER_INCH;
+ job->height = (imageSize.y + 2*margin.y) * job->dpi.x / POINTS_PER_INCH;
+
/* determine page box including centering */
if (GD_drawing(g)->centered) {
if (pageSize.x > imageSize.x)
{
double sx, sy; /* half width, half height in graph-units */
- /* compute width,height in device units */
- job->width = ROUND((job->view.x + 2 * job->margin.x) * job->dpi.x / POINTS_PER_INCH);
- job->height = ROUND((job->view.y + 2 * job->margin.y) * job->dpi.y / POINTS_PER_INCH);
-
job->scale.x = job->zoom * job->dpi.x / POINTS_PER_INCH;
job->scale.y = job->zoom * job->dpi.y / POINTS_PER_INCH;
static void init_window(GVJ_t *job, Display *dpy, int scr)
{
int argb = 0;
- const char *geometry = NULL;
const char *base = "";
XGCValues gcv;
XSetWindowAttributes attributes;
attributes.background_pixel = 0;
attributes.border_pixel = 0;
attributes.colormap = window->cmap;
- attributemask = (CWBackPixel |
- CWBorderPixel | CWOverrideRedirect | CWColormap);
+ attributemask = ( CWBackPixel
+ | CWBorderPixel
+ | CWOverrideRedirect
+ | CWColormap );
window->depth = 32;
} else {
window->cmap = DefaultColormap(dpy, scr);
window->depth = DefaultDepth(dpy, scr);
}
- if (geometry) {
- int x, y;
- XParseGeometry(geometry, &x, &y, &job->width, &job->height);
- }
-
window->win = XCreateWindow(dpy, RootWindow(dpy, scr),
0, 0, job->width, job->height, 0, window->depth,
InputOutput, window->visual,
dpy = (Display *)(firstjob->display);
scr = firstjob->screen;
+ keycodes = firstjob->keycodes;
inotify_fd = inotify_init();
if (inotify_fd < 0) {