]> granicus.if.org Git - graphviz/commitdiff
split out device features from render features
authorellson <devnull@localhost>
Fri, 31 Aug 2007 17:07:59 +0000 (17:07 +0000)
committerellson <devnull@localhost>
Fri, 31 Aug 2007 17:07:59 +0000 (17:07 +0000)
18 files changed:
lib/common/emit.c
lib/gvc/gvcjob.h
lib/gvc/gvrender.c
plugin/core/gvrender_core_dot.c
plugin/core/gvrender_core_fig.c
plugin/core/gvrender_core_map.c
plugin/core/gvrender_core_ps.c
plugin/core/gvrender_core_svg.c
plugin/core/gvrender_core_vml.c
plugin/devil/gvdevice_devil.c
plugin/gd/gvdevice_gd.c
plugin/gd/gvrender_gd.c
plugin/gd/gvrender_gd_vrml.c
plugin/gdk_pixbuf/gvdevice_gdk_pixbuf.c
plugin/gtk/gvdevice_gtk.c
plugin/ming/gvrender_ming.c
plugin/pango/gvrender_pango.c
plugin/xlib/gvdevice_xlib.c

index 863d9e8acd00936f11a7f90aaf7fdd8e11b0ca21..192ebccaebb5bd4acc32b1aa25794f7dea6b6e8b 100644 (file)
@@ -540,10 +540,10 @@ static void init_job_flags(GVJ_t * job, graph_t * g)
 {
     switch (job->output_lang) {
     case GVRENDER_PLUGIN:
-        job->flags |= chkOrder(g)
-                     | job->render.features->flags
-                     | job->device.features->flags;
-        break;
+       job->flags |= chkOrder(g)
+               | job->render.features->flags
+               | job->device.features->flags;
+       break;
     case VTX:
         /* output sorted, i.e. all nodes then all edges */
         job->flags |= EMIT_SORTED;
@@ -580,7 +580,7 @@ static void firstlayer(GVJ_t *job)
 {
     job->numLayers = job->gvc->numLayers;
     if ((job->numLayers > 1)
-               && (! (gvrender_features(job) & GVRENDER_DOES_LAYERS))) {
+               && (! (gvrender_features(job) & GVDEVICE_DOES_LAYERS))) {
        agerr(AGWARN, "layers not supported in %s output\n",
                job->output_langname);
        job->numLayers = 1;
@@ -671,10 +671,10 @@ static void init_job_pagination(GVJ_t * job, graph_t *g)
     } else {
        /* page not set by user, use default from renderer */
        if (job->render.features) {
-           pageSize.x = job->render.features->default_pagesize.x - 2*margin.x;
+           pageSize.x = job->device.features->default_pagesize.x - 2*margin.x;
            if (pageSize.x < 0.)
                pageSize.x = 0.;
-           pageSize.y = job->render.features->default_pagesize.y - 2*margin.y;
+           pageSize.y = job->device.features->default_pagesize.y - 2*margin.y;
            if (pageSize.y < 0.)
                pageSize.y = 0.;
        }
@@ -1943,7 +1943,7 @@ static void init_job_margin(GVJ_t *job)
         /* set default margins depending on format */
         switch (job->output_lang) {
         case GVRENDER_PLUGIN:
-            job->margin.x = job->margin.y = job->render.features->default_margin;
+            job->margin = job->device.features->default_margin;
             break;
         case HPGL: case PCL: case MIF: case METAPOST: case VTX: case QPDF:
             job->margin.x = job->margin.y = DEFAULT_PRINT_MARGIN;
@@ -1970,7 +1970,7 @@ static void init_job_dpi(GVJ_t *job, graph_t *g)
         /* set default margins depending on format */
         switch (job->output_lang) {
         case GVRENDER_PLUGIN:
-            job->dpi = job->render.features->default_dpi;
+            job->dpi = job->device.features->default_dpi;
             break;
         default:
             job->dpi.x = job->dpi.y = (double)(DEFAULT_DPI);
@@ -2782,7 +2782,7 @@ int gvRenderJobs (GVC_t * gvc, graph_t * g)
        /* if we already have an active job list and the device doesn't support mutiple output files, or we are about to write to a different output device */
         firstjob = gvc->active_jobs;
         if (firstjob
-           && (!(firstjob->flags & GVRENDER_DOES_MULTIGRAPHS)
+           && (!(firstjob->flags & GVDEVICE_DOES_PAGES)
              || (strcmp(job->output_langname,firstjob->output_langname)))) {
 
            gvrender_end_job(firstjob);
index 34a9495ecc5e0728d46b8200ef8a770c00940ee1..dd6144e0d0a0e8a2e170fbf7d5703ae1e1d5a22b 100644 (file)
@@ -47,13 +47,13 @@ extern "C" {
 #define EMIT_CLUSTERS_LAST (1<<2)
 #define EMIT_PREORDER (1<<3)
 #define EMIT_EDGE_SORTED (1<<4)
-#define GVRENDER_DOES_ARROWS (1<<5)
-#define GVRENDER_DOES_LAYERS (1<<6)
-#define GVRENDER_DOES_MULTIGRAPHS (1<<7)
-#define GVRENDER_DOES_TRUECOLOR (1<<8)
+#define GVDEVICE_DOES_PAGES (1<<5)
+#define GVDEVICE_DOES_LAYERS (1<<6)
+#define GVDEVICE_EVENTS (1<<7)
+#define GVDEVICE_DOES_TRUECOLOR (1<<8)
 #define GVRENDER_Y_GOES_DOWN (1<<9)
-#define GVDEVICE_EVENTS (1<<10)
-#define GVRENDER_DOES_TRANSFORM (1<<11)
+#define GVRENDER_DOES_TRANSFORM (1<<10)
+#define GVRENDER_DOES_ARROWS (1<<11)
 #define GVRENDER_DOES_LABELS (1<<12)
 #define GVRENDER_DOES_MAPS (1<<13)
 #define GVRENDER_DOES_MAP_RECTANGLE (1<<14)
@@ -70,10 +70,7 @@ extern "C" {
 
     typedef struct {
        int flags;
-       double default_margin;  /* points */
        double default_pad;     /* graph units */
-       pointf default_pagesize;/* default page width, height - points */
-       pointf default_dpi;
        char **knowncolors;
        int sz_knowncolors;
        color_type_t color_type;
@@ -82,6 +79,9 @@ extern "C" {
 
     typedef struct {
        int flags;
+       pointf default_margin;  /* left/right, top/bottom - points */
+       pointf default_pagesize;/* default page width, height - points */
+       pointf default_dpi;
     } gvdevice_features_t;
 
 #define LAYOUT_USES_RANKDIR (1<<0)
index 421ebb4e77beb7c03f174d701e559c4102a7f909..bbb4350d78bc16c67684ded0c28255fcf18a9999 100644 (file)
@@ -77,21 +77,21 @@ int gvrender_select(GVJ_t * job, char *str)
     else
        return NO_SUPPORT;  /* FIXME - should differentiate problem */
     
+    /* The device plugin has a dependency on a render plugin,
+     * so the render plugin should be available as well now */
     plugin = gvc->api[API_render];
     if (plugin) {
         typeptr = plugin->typeptr;
         job->render.engine = (gvrender_engine_t *) (typeptr->engine);
+        job->render.features = (gvdevice_features_t *) (typeptr->features);
 
-        if (job->device.engine) {
-            job->render.features = (gvrender_features_t *) (typeptr->features);
+        if (job->device.engine)
             job->render.id = typeptr->id;
-       }
-       else {
-           /* a null device engine indicates that the renderer provides
-               the id and features */
-            job->render.features = (gvrender_features_t *) (job->device.features);
+       else
+           /* A null device engine indicates that the device id is also the renderer id
+            * and that the renderer doesn't need "device" functions.
+            * Device "features" settings are still available */
             job->render.id = job->device.id;
-       }
         return GVRENDER_PLUGIN;
     }
     job->render.engine = NULL;
@@ -114,7 +114,7 @@ int gvrender_features(GVJ_t * job)
            if (cg->bezier_has_arrows)
                features |= GVRENDER_DOES_ARROWS;
            if (cg->begin_layer)
-               features |= GVRENDER_DOES_LAYERS;
+               features |= GVDEVICE_DOES_LAYERS;
        }
     }
 #endif
index c8943b2bba04311ad743ad608e2a870db5a419e5..8138088ede08ef97ddddc806c471dfc23547d7ca 100644 (file)
@@ -473,53 +473,49 @@ gvrender_engine_t xdot_engine = {
     0,                         /* xdot_library_shape */
 };
 
-gvrender_features_t canon_features = {
-    LAYOUT_NOT_REQUIRED,       /* flags */
-    0.,                                /* default margin - points */
+gvrender_features_t render_features_dot = {
+    GVRENDER_DOES_TRANSFORM,   /* not really - uses raw graph coords */  /* flags */
     0.,                         /* default pad - graph units */
-    {0,0},                      /* default height, width - device units */
-    {72.,72.},                 /* default dpi */
     NULL,                      /* knowncolors */
     0,                         /* sizeof knowncolors */
     COLOR_STRING,              /* color_type */
     NULL,                       /* imageloader for usershapes */
 };
 
-gvrender_features_t dot_features = {
-    GVRENDER_DOES_TRANSFORM,   /* not really - uses raw graph coords */
-    0.,                                /* default margin - points */
+gvrender_features_t render_features_xdot = {
+    GVRENDER_DOES_TRANSFORM,   /* not really - uses raw graph coords */  /* flags */
     0.,                         /* default pad - graph units */
-    {0.,0.},                   /* default page width, height - points */
-    {72.,72.},                 /* default dpi */
     NULL,                      /* knowncolors */
     0,                         /* sizeof knowncolors */
     COLOR_STRING,              /* color_type */
-    NULL,                       /* imageloader for usershapes */
+    "xdot",                     /* imageloader for usershapes */
 };
 
-gvrender_features_t xdot_features = {
-    GVRENDER_DOES_TRANSFORM,   /* not really - uses raw graph coords */
-    0.,                                /* default margin - points */
-    0.,                         /* default pad - graph units */
+gvdevice_features_t device_features_canon = {
+    LAYOUT_NOT_REQUIRED,       /* flags */
+    {0.,0.},                   /* default margin - points */
+    {0.,0.},                    /* default height, width - device units */
+    {72.,72.},                 /* default dpi */
+};
+
+gvdevice_features_t device_features_dot = {
+    0,                         /* flags */
+    {0.,0.},                   /* default margin - points */
     {0.,0.},                   /* default page width, height - points */
     {72.,72.},                 /* default dpi */
-    NULL,                      /* knowncolors */
-    0,                         /* sizeof knowncolors */
-    COLOR_STRING,              /* color_type */
-    "xdot",                     /* imageloader for usershapes */
 };
 
 gvplugin_installed_t gvrender_core_dot_types[] = {
-    {FORMAT_DOT, "core_dot", 1, &dot_engine, NULL},
-    {FORMAT_XDOT, "core_xdot", 1, &xdot_engine, NULL},
+    {FORMAT_DOT, "core_dot", 1, &dot_engine, &render_features_dot},
+    {FORMAT_XDOT, "core_xdot", 1, &xdot_engine, &render_features_xdot},
     {0, NULL, 0, NULL, NULL}
 };
 
 gvplugin_installed_t gvdevice_core_dot_types[] = {
-    {FORMAT_DOT, "dot:core_dot", 1, NULL, &dot_features},
-    {FORMAT_CANON, "canon:core_dot", 1, NULL, &canon_features},
-    {FORMAT_PLAIN, "plain:core_dot", 1, NULL, &dot_features},
-    {FORMAT_PLAIN_EXT, "plain-ext:core_dot", 1, NULL, &dot_features},
-    {FORMAT_XDOT, "xdot:core_xdot", 1, NULL, &xdot_features},
+    {FORMAT_DOT, "dot:core_dot", 1, NULL, &device_features_dot},
+    {FORMAT_CANON, "canon:core_dot", 1, NULL, &device_features_canon},
+    {FORMAT_PLAIN, "plain:core_dot", 1, NULL, &device_features_dot},
+    {FORMAT_PLAIN_EXT, "plain-ext:core_dot", 1, NULL, &device_features_dot},
+    {FORMAT_XDOT, "xdot:core_xdot", 1, NULL, &device_features_dot},
     {0, NULL, 0, NULL, NULL}
 };
index 6f6c90c51aae885b51a18ae4c5cf6426fcef88de..a3e3345e7d12d3ef6b0ba57085161e640beca286 100644 (file)
@@ -512,11 +512,20 @@ static char *fig_knowncolors[] = {
 };
 
 
-gvrender_features_t fig_features = {
+gvrender_features_t render_features_fig = {
     EMIT_COLORS
        | GVRENDER_Y_GOES_DOWN, /* flags */
-    DEFAULT_EMBED_MARGIN,      /* default margin - points */
     4.,                         /* default pad - graph units */
+    fig_knowncolors,           /* knowncolors */
+    sizeof(fig_knowncolors) / sizeof(char *), /* sizeof knowncolors */
+    RGBA_BYTE,                 /* color_type */
+    "fig",                      /* imageloader for usershapes */
+};
+
+gvdevice_features_t device_features_fig = {
+    EMIT_COLORS
+       | GVRENDER_Y_GOES_DOWN, /* flags */
+    {0.,0.},                   /* default margin - points */
     {0.,0.},                    /* default page width, height - points */
     {1440.,1440.},             /* default dpi */
         /* FIXME - this default dpi is a very strange number!!!
@@ -528,19 +537,14 @@ gvrender_features_t fig_features = {
 
         /* It may be TWIPS, i.e. 20 * POINT_PER_INCH 
          *    but that doesn't explain what the 1200 is? */
-
-    fig_knowncolors,           /* knowncolors */
-    sizeof(fig_knowncolors) / sizeof(char *), /* sizeof knowncolors */
-    RGBA_BYTE,                 /* color_type */
-    "fig",                      /* imageloader for usershapes */
 };
 
 gvplugin_installed_t gvrender_core_fig_types[] = {
-    {FORMAT_FIG, "core_fig", 1, &fig_engine, NULL},
+    {FORMAT_FIG, "core_fig", 1, &fig_engine, &render_features_fig},
     {0, NULL, 0, NULL, NULL}
 };
 
 gvplugin_installed_t gvdevice_core_fig_types[] = {
-    {FORMAT_FIG, "fig:core_fig", 1, NULL, &fig_features},
+    {FORMAT_FIG, "fig:core_fig", 1, NULL, &device_features_fig},
     {0, NULL, 0, NULL, NULL}
 };
index 5a50f315c98ce2a4c3d5c287dd267b6243612f2e..7455f0e69c1ca6314ba82bbc175bc31d12c60a51 100644 (file)
@@ -285,54 +285,47 @@ static gvrender_engine_t map_engine = {
     0,                         /* map_library_shape */
 };
 
-static gvrender_features_t map_features = {
+static gvrender_features_t render_features_map = {
     EMIT_CLUSTERS_LAST
         | GVRENDER_Y_GOES_DOWN
        | GVRENDER_DOES_MAPS
        | GVRENDER_DOES_LABELS
        | GVRENDER_DOES_TOOLTIPS
        | GVRENDER_DOES_TARGETS
-       | GVRENDER_DOES_MAP_RECTANGLE
-       | GVRENDER_DOES_MAP_CIRCLE
-       | GVRENDER_DOES_MAP_POLYGON,
-    0,                         /* default margin - points */
+       | GVRENDER_DOES_MAP_RECTANGLE, /* flags */
     4.,                         /* default pad - graph units */
-    {0.,0.},                    /* default page width, height - points */
-    {96.,96.},                 /* default dpi */
     NULL,                      /* knowncolors */
     0,                         /* sizeof knowncolors */
     0,                         /* color_type */
     NULL,                       /* imageloader for usershapes */
 };
 
-static gvrender_features_t map_features_nopoly = {
-    EMIT_CLUSTERS_LAST
-        | GVRENDER_Y_GOES_DOWN
-       | GVRENDER_DOES_MAPS
-       | GVRENDER_DOES_LABELS
-       | GVRENDER_DOES_TOOLTIPS
-       | GVRENDER_DOES_MAP_RECTANGLE,
-    0,                         /* default margin - points */
-    4.,                         /* default pad - graph units */
+static gvdevice_features_t device_features_map = {
+    GVRENDER_DOES_MAP_CIRCLE
+       | GVRENDER_DOES_MAP_POLYGON, /* flags */
+    {0.,0.},                   /* default margin - points */
+    {0.,0.},                    /* default page width, height - points */
+    {96.,96.},                 /* default dpi */
+};
+
+static gvdevice_features_t device_features_map_nopoly = {
+    0,                         /* flags */
+    {0.,0.},                   /* default margin - points */
     {0.,0.},                    /* default page width, height - points */
     {96.,96.},                 /* default dpi */
-    NULL,                      /* knowncolors */
-    0,                         /* sizeof knowncolors */
-    0,                         /* color_type */
-    NULL,                       /* imageloader target for usershapes */
 };
 
 gvplugin_installed_t gvrender_core_map_types[] = {
-    {FORMAT_ISMAP, "core_map", 1, &map_engine, NULL},
+    {FORMAT_ISMAP, "core_map", 1, &map_engine, &render_features_map},
     {0, NULL, 0, NULL, NULL}
 };
 
 gvplugin_installed_t gvdevice_core_map_types[] = {
-    {FORMAT_ISMAP, "ismap:core_map", 1, NULL, &map_features_nopoly},
-    {FORMAT_CMAP, "cmap:core_map", 1, NULL, &map_features},
-    {FORMAT_IMAP, "imap:core_map", 1, NULL, &map_features},
-    {FORMAT_CMAPX, "cmapx:core_map", 1, NULL, &map_features},
-    {FORMAT_IMAP, "imap_np:core_map", 1, NULL, &map_features_nopoly},
-    {FORMAT_CMAPX, "cmapx_np:core_map", 1, NULL, &map_features_nopoly},
+    {FORMAT_ISMAP, "ismap:core_map", 1, NULL, &device_features_map_nopoly},
+    {FORMAT_CMAP, "cmap:core_map", 1, NULL, &device_features_map},
+    {FORMAT_IMAP, "imap:core_map", 1, NULL, &device_features_map},
+    {FORMAT_CMAPX, "cmapx:core_map", 1, NULL, &device_features_map},
+    {FORMAT_IMAP, "imap_np:core_map", 1, NULL, &device_features_map_nopoly},
+    {FORMAT_CMAPX, "cmapx_np:core_map", 1, NULL, &device_features_map_nopoly},
     {0, NULL, 0, NULL, NULL}
 };
index 1c6eae197b5e6f848c13295fdf4f1815da97b579..26fc3a5d47575c8b88667effd3c2c891a1968088 100644 (file)
@@ -455,30 +455,33 @@ static gvrender_engine_t psgen_engine = {
     psgen_library_shape,
 };
 
-static gvrender_features_t psgen_features = {
-    GVRENDER_DOES_MULTIGRAPHS
-       | GVRENDER_DOES_LAYERS
-       | GVRENDER_DOES_TRANSFORM
+static gvrender_features_t render_features_ps = {
+    GVRENDER_DOES_TRANSFORM
        | GVRENDER_DOES_MAPS
        | GVRENDER_NO_BG
        | GVRENDER_DOES_MAP_RECTANGLE,
-    36,                                /* default margin - points */
     4.,                         /* default pad - graph units */
-    {612.,792.},                /* default page width, height - points */
-    {72.,72.},                 /* default dpi */
     NULL,                      /* knowncolors */
     0,                         /* sizeof knowncolors */
     HSVA_DOUBLE,               /* color_type */
     "ps",                       /* imageloader for usershapes */
 };
 
+static gvdevice_features_t device_features_ps = {
+    GVDEVICE_DOES_PAGES
+       | GVDEVICE_DOES_LAYERS, /* flags */
+    {36.,36.},                 /* default margin - points */
+    {612.,792.},                /* default page width, height - points */
+    {72.,72.},                 /* default dpi */
+};
+
 gvplugin_installed_t gvrender_core_ps_types[] = {
-    {FORMAT_PS, "core_ps", 1, &psgen_engine, NULL},
+    {FORMAT_PS, "core_ps", 1, &psgen_engine, &render_features_ps},
     {0, NULL, 0, NULL, NULL}
 };
 
 gvplugin_installed_t gvdevice_core_ps_types[] = {
-    {FORMAT_PS, "ps:core_ps", 1, NULL, &psgen_features},
-    {FORMAT_PS2, "ps2:core_ps", 1, NULL, &psgen_features},
+    {FORMAT_PS, "ps:core_ps", 1, NULL, &device_features_ps},
+    {FORMAT_PS2, "ps2:core_ps", 1, NULL, &device_features_ps},
     {0, NULL, 0, NULL, NULL}
 };
index 50675363e197018fe15319e43b64c92348eaa2c6..2cf80c979a6bc7138d24e0f6f3fe87be6ee34453 100644 (file)
@@ -468,33 +468,36 @@ gvrender_engine_t svg_engine = {
     0,                         /* svg_library_shape */
 };
 
-gvrender_features_t svg_features = {
-    GVRENDER_DOES_TRUECOLOR
-       | GVRENDER_Y_GOES_DOWN
+gvrender_features_t render_features_svg = {
+    GVRENDER_Y_GOES_DOWN
         | GVRENDER_DOES_TRANSFORM
        | GVRENDER_DOES_LABELS
        | GVRENDER_DOES_MAPS
        | GVRENDER_DOES_TARGETS
        | GVRENDER_DOES_TOOLTIPS, /* flags */
-    DEFAULT_EMBED_MARGIN,      /* default margin - points */
     4.,                         /* default pad - graph units */
-    {0.,0.},                    /* default page width, height - points */
-    {72.,72.},                 /* default dpi */
     svg_knowncolors,           /* knowncolors */
     sizeof(svg_knowncolors) / sizeof(char *),  /* sizeof knowncolors */
     RGBA_BYTE,                 /* color_type */
     "svg",                      /* imageloader for usershapes */
 };
 
+gvdevice_features_t device_features_svg = {
+    GVDEVICE_DOES_TRUECOLOR,   /* flags */
+    {0.,0.},                   /* default margin - points */
+    {0.,0.},                    /* default page width, height - points */
+    {72.,72.},                 /* default dpi */
+};
+
 gvplugin_installed_t gvrender_core_svg_types[] = {
-    {FORMAT_SVG, "core_svg", 1, &svg_engine, NULL},
+    {FORMAT_SVG, "core_svg", 1, &svg_engine, &render_features_svg},
     {0, NULL, 0, NULL, NULL}
 };
 
 gvplugin_installed_t gvdevice_core_svg_types[] = {
-    {FORMAT_SVG, "svg:core_svg", 1, NULL, &svg_features},
+    {FORMAT_SVG, "svg:core_svg", 1, NULL, &device_features_svg},
 #if HAVE_LIBZ
-    {FORMAT_SVGZ, "svgz:core_svg", 1, NULL, &svg_features},
+    {FORMAT_SVGZ, "svgz:core_svg", 1, NULL, &device_features_svg},
 #endif
     {0, NULL, 0, NULL, NULL}
 };
index eeabca0b924d134864d639a92cff13cfb1a5ea56..fb0b94c6a8ff130c3748a7ccf6f5f4795b81e666 100644 (file)
@@ -416,33 +416,36 @@ gvrender_engine_t vml_engine = {
     0,                         /* vml_library_shape */
 };
 
-gvrender_features_t vml_features = {
-    GVRENDER_DOES_TRUECOLOR
-       | GVRENDER_Y_GOES_DOWN
+gvrender_features_t render_features_vml = {
+    GVRENDER_Y_GOES_DOWN
         | GVRENDER_DOES_TRANSFORM
        | GVRENDER_DOES_LABELS
        | GVRENDER_DOES_MAPS
        | GVRENDER_DOES_TARGETS
        | GVRENDER_DOES_TOOLTIPS, /* flags */
-    DEFAULT_EMBED_MARGIN,      /* default margin - points */
     4.,                         /* default pad - graph units */
-    {0.,0.},                    /* default page width, height - points */
-    {96.,96.},                 /* default dpi */
     vml_knowncolors,           /* knowncolors */
     sizeof(vml_knowncolors) / sizeof(char *),  /* sizeof knowncolors */
     RGBA_BYTE,                 /* color_type */
     "vml",                      /* imageloader for usershapes */
 };
 
+gvdevice_features_t device_features_vml = {
+    GVDEVICE_DOES_TRUECOLOR,   /* flags */
+    {0.,0.},                   /* default margin - points */
+    {0.,0.},                    /* default page width, height - points */
+    {96.,96.},                 /* default dpi */
+};
+
 gvplugin_installed_t gvrender_core_vml_types[] = {
-    {FORMAT_VML, "core_vml", 1, &vml_engine, NULL},
+    {FORMAT_VML, "core_vml", 1, &vml_engine, &render_features_vml},
     {0, NULL, 0, NULL, NULL}
 };
 
 gvplugin_installed_t gvdevice_core_vml_types[] = {
-    {FORMAT_VML, "vml:core_vml", 1, NULL, &vml_features},
+    {FORMAT_VML, "vml:core_vml", 1, NULL, &device_features_vml},
 #if HAVE_LIBZ
-    {FORMAT_VMLZ, "vmlz:core_vml", 1, NULL, &vml_features},
+    {FORMAT_VMLZ, "vmlz:core_vml", 1, NULL, &device_features_vml},
 #endif
     {0, NULL, 0, NULL, NULL}
 };
index 545926449f51d9aa65aec24ea87d994dccc0a09b..c05b51bb3df0ebaa2a5d14ca6aade1b928315548 100644 (file)
@@ -113,19 +113,22 @@ static gvdevice_engine_t devil_engine = {
     NULL,
 };
 
-static gvdevice_features_t devil_features = {
-    0,  /* flags */
+static gvdevice_features_t device_features_devil = {
+        GVDEVICE_DOES_TRUECOLOR,    /* flags */
+       {0.,0.},                    /* default margin - points */
+       {0.,0.},                    /* default page width, height - points */
+       {96.,96.},                  /* svg 72 dpi */
 };
 
 gvplugin_installed_t gvdevice_devil_types[] = {
-    {IL_BMP, "bmp:cairo", -1, &devil_engine, &devil_features},
-//    {IL_GIF, "gif:cairo", -1, &devil_engine, &devil_features},
-    {IL_JPG, "jpg:cairo", -1, &devil_engine, &devil_features},
-    {IL_JPG, "jpe:cairo", -1, &devil_engine, &devil_features},
-    {IL_JPG, "jpeg:cairo", -1, &devil_engine, &devil_features},
-    {IL_PNG, "png:cairo", -1, &devil_engine, &devil_features},
-    {IL_TIF, "tif:cairo", -1, &devil_engine, &devil_features},
-    {IL_TIF, "tiff:cairo", -1, &devil_engine, &devil_features},
-    {IL_TGA, "tga:cairo", -1, &devil_engine, &devil_features},
+    {IL_BMP, "bmp:cairo", -1, &devil_engine, &device_features_devil},
+//    {IL_GIF, "gif:cairo", -1, &devil_engine, &device_features_devil},
+    {IL_JPG, "jpg:cairo", -1, &devil_engine, &device_features_devil},
+    {IL_JPG, "jpe:cairo", -1, &devil_engine, &device_features_devil},
+    {IL_JPG, "jpeg:cairo", -1, &devil_engine, &device_features_devil},
+    {IL_PNG, "png:cairo", -1, &devil_engine, &device_features_devil},
+    {IL_TIF, "tif:cairo", -1, &devil_engine, &device_features_devil},
+    {IL_TIF, "tiff:cairo", -1, &devil_engine, &device_features_devil},
+    {IL_TGA, "tga:cairo", -1, &devil_engine, &device_features_devil},
     {0, NULL, 0, NULL, NULL}
 };
index 98aacbb62a7c965470bc6a5429514b62e031b281..7d400b1dc5f00bcd6bb4fe4260775d2baf8470f7 100644 (file)
@@ -141,39 +141,41 @@ static gvdevice_engine_t gd_engine = {
     NULL,
 };
 
-static gvdevice_features_t gd_features = {
-    0,  /* flags */
+static gvdevice_features_t device_features_gd = {
+    GVDEVICE_DOES_TRUECOLOR,    /* flags */
+    {0.,0.},                    /* default margin - points */
+    {0.,0.},                    /* default page width, height - points */
+    {96.,96.},                  /* dpi */
 };
-
 #endif
 
 gvplugin_installed_t gvdevice_gd_types[] = {
 #ifdef HAVE_LIBGD
 
 #ifdef HAVE_GD_GIF
-    {FORMAT_GIF, "gif:cairo", 10, &gd_engine, &gd_features},
+    {FORMAT_GIF, "gif:cairo", 10, &gd_engine, &device_features_gd},
 #endif
 
 #ifdef HAVE_GD_JPEG
-    {FORMAT_JPEG, "jpe:cairo", 5, &gd_engine, &gd_features},
-    {FORMAT_JPEG, "jpeg:cairo", 5, &gd_engine, &gd_features},
-    {FORMAT_JPEG, "jpg:cairo", 5, &gd_engine, &gd_features},
+    {FORMAT_JPEG, "jpe:cairo", 5, &gd_engine, &device_features_gd},
+    {FORMAT_JPEG, "jpeg:cairo", 5, &gd_engine, &device_features_gd},
+    {FORMAT_JPEG, "jpg:cairo", 5, &gd_engine, &device_features_gd},
 #endif
 
 #ifdef HAVE_GD_PNG
-    {FORMAT_PNG, "png:cairo", -1, &gd_engine, &gd_features},
+    {FORMAT_PNG, "png:cairo", -1, &gd_engine, &device_features_gd},
 #endif
 
 #if 0
-    {FORMAT_GD, "gd:cairo", -1, &gd_engine, &gd_features},
-    {FORMAT_GD2, "gd2:cairo", -1, &gd_engine, &gd_features},
+    {FORMAT_GD, "gd:cairo", -1, &gd_engine, &device_features_gd},
+    {FORMAT_GD2, "gd2:cairo", -1, &gd_engine, &device_features_gd},
 
 #ifdef HAVE_GD_GIF
-    {FORMAT_WBMP, "wbmp:cairo", -1, &gd_engine, &gd_features},
+    {FORMAT_WBMP, "wbmp:cairo", -1, &gd_engine, &device_features_gd},
 #endif
 
 #ifdef HAVE_GD_XPM
-    {FORMAT_XBM, "xbm:cairo", -1, &gd_engine, &gd_features},
+    {FORMAT_XBM, "xbm:cairo", -1, &gd_engine, &device_features_gd},
 #endif
 #endif
 
index 5d648099b4dc7abbf019c401cc98ea3317a9075e..684eb959ece90e5a50ad104c13d006b7b39d14f7 100644 (file)
@@ -89,7 +89,7 @@ static void gdgen_begin_page(GVJ_t * job)
 
     if (bgcolor_str && strcmp(bgcolor_str, "transparent") == 0) {
        bg_transparent_p = TRUE;
-       if (job->render.features->flags & GVRENDER_DOES_TRUECOLOR)
+       if (job->render.features->flags & GVDEVICE_DOES_TRUECOLOR)
            truecolor_p = TRUE; /* force truecolor */
     }
 
@@ -583,36 +583,34 @@ static gvrender_engine_t gdgen_engine = {
     0,                         /* gdgen_library_shape */
 };
 
-static gvrender_features_t gdgen_features_tc = {
-    GVRENDER_DOES_TRUECOLOR
-       | GVRENDER_Y_GOES_DOWN, /* flags */
-    0,                         /* default margin - points */
+static gvrender_features_t render_features_gd = {
+    GVRENDER_Y_GOES_DOWN,      /* flags */
     4.,                         /* default pad - graph units */
-    {0.,0.},                    /* default page width, height - points */
-    {96.,96.},                 /* default dpi */
     NULL,                      /* knowncolors */
     0,                         /* sizeof knowncolors */
     RGBA_BYTE,                 /* color_type */
     "gd",                      /* imageloader for usershapes */
 };
 
-static gvrender_features_t gdgen_features = {
-    GVRENDER_Y_GOES_DOWN,      /* flags */
-    0,                         /* default margin - points */
-    4.,                         /* default pad - graph units */
+static gvdevice_features_t device_features_gd = {
+    0,                         /* flags */
+    {0.,0.},                   /* default margin - points */
+    {0.,0.},                    /* default page width, height - points */
+    {96.,96.},                 /* default dpi */
+};
+
+static gvdevice_features_t device_features_gd_tc = {
+    GVDEVICE_DOES_TRUECOLOR,   /* flags */
+    {0.,0.},                   /* default margin - points */
     {0.,0.},                    /* default page width, height - points */
     {96.,96.},                 /* default dpi */
-    NULL,                      /* knowncolors */
-    0,                         /* sizeof knowncolors */
-    RGBA_BYTE,                 /* color_type */
-    "gd",                      /* imageloader for usershapes */
 };
 
 #endif
 
 gvplugin_installed_t gvrender_gd_types[] = {
 #ifdef HAVE_LIBGD
-    {FORMAT_GD, "gd", 1, &gdgen_engine, &gdgen_features},
+    {FORMAT_GD, "gd", 1, &gdgen_engine, &render_features_gd},
 #endif
     {0, NULL, 0, NULL, NULL}
 };
@@ -620,25 +618,25 @@ gvplugin_installed_t gvrender_gd_types[] = {
 gvplugin_installed_t gvdevice_gd_types2[] = {
 #ifdef HAVE_LIBGD
 #ifdef HAVE_GD_GIF
-    {FORMAT_GIF, "gif:gd", 1, NULL, &gdgen_features},
+    {FORMAT_GIF, "gif:gd", 1, NULL, &device_features_gd},
 #endif
 #ifdef HAVE_GD_JPEG
-    {FORMAT_JPEG, "jpe:gd", 1, NULL, &gdgen_features_tc},
-    {FORMAT_JPEG, "jpeg:gd", 1, NULL, &gdgen_features_tc},
-    {FORMAT_JPEG, "jpg:gd", 1, NULL, &gdgen_features_tc},
+    {FORMAT_JPEG, "jpe:gd", 1, NULL, &device_features_gd_tc},
+    {FORMAT_JPEG, "jpeg:gd", 1, NULL, &device_features_gd_tc},
+    {FORMAT_JPEG, "jpg:gd", 1, NULL, &device_features_gd_tc},
 #endif
 #ifdef HAVE_GD_PNG
-    {FORMAT_PNG, "png:gd", 1, NULL, &gdgen_features_tc},
+    {FORMAT_PNG, "png:gd", 1, NULL, &device_features_gd_tc},
 #endif
 
 #if 0
-    {FORMAT_GD, "gd:gd", 1, NULL, &gdgen_features_tc},
-    {FORMAT_GD2, "gd2:gd", 1, NULL, &gdgen_features_tc},
+    {FORMAT_GD, "gd:gd", 1, NULL, &device_features_gd_tc},
+    {FORMAT_GD2, "gd2:gd", 1, NULL, &device_features_gd_tc},
 #ifdef HAVE_GD_GIF
-    {FORMAT_WBMP, "wbmp:gd", 1, NULL, &gdgen_features},
+    {FORMAT_WBMP, "wbmp:gd", 1, NULL, &device_features_gd},
 #endif
 #ifdef HAVE_GD_XPM
-    {FORMAT_XBM, "xbm:gd", 1, NULL, &gdgen_features},
+    {FORMAT_XBM, "xbm:gd", 1, NULL, &device_features_gd},
 #endif
 #endif
 
index 42714e2c21a6871e24a6e94c469ce256e145565b..b661c43569cc45a4dc5b8bceba954883b0490a12 100644 (file)
@@ -835,24 +835,28 @@ static gvrender_engine_t vrml_engine = {
     0,                          /* vrml_library_shape */
 };
 
-static gvrender_features_t vrml_features = {
+static gvrender_features_t render_features_gd_vrml = {
     GVRENDER_DOES_Z,           /* flags */
-    0,                          /* default margin - points */
     4.,                         /* default pad - graph units */
-    {0.,0.},                    /* default page width, height - points */
-    {72.,72.},                  /* default dpi */
     NULL,                       /* knowncolors */
     0,                          /* sizeof knowncolors */
     RGBA_BYTE,                  /* color_type */
     "vrml",                     /* imageloader for usershapes */
 };
+
+static gvdevice_features_t device_features_gd_vrml = {
+    0,                         /* flags */
+    {0.,0.},                   /* default margin - points */
+    {0.,0.},                    /* default page width, height - points */
+    {72.,72.},                  /* default dpi */
+};
 #endif                         /* HAVE_GD_PNG */
 #endif                         /* HAVE_LIBGD */
 
 gvplugin_installed_t gvrender_gd_vrml_types[] = {
 #ifdef HAVE_LIBGD
 #ifdef HAVE_GD_PNG
-    {FORMAT_VRML, "gd_vrml", 1, &vrml_engine, NULL},
+    {FORMAT_VRML, "gd_vrml", 1, &vrml_engine, &render_features_gd_vrml},
 #endif
 #endif
     {0, NULL, 0, NULL, NULL}
@@ -861,7 +865,7 @@ gvplugin_installed_t gvrender_gd_vrml_types[] = {
 gvplugin_installed_t gvdevice_vrml_types[] = {
 #ifdef HAVE_LIBGD
 #ifdef HAVE_GD_PNG
-    {FORMAT_VRML, "vrml:gd_vrml", 1, NULL, &vrml_features},
+    {FORMAT_VRML, "vrml:gd_vrml", 1, NULL, &device_features_gd_vrml},
 #endif
 #endif
     {0, NULL, 0, NULL, NULL}
index fd2e09bbc60c0bdb7e1e98b1ca54668a116fd8de..ef9443790a488e264026d3d8abe5efe9ec42930f 100644 (file)
@@ -164,18 +164,21 @@ static gvdevice_engine_t gdk_pixbuf_engine = {
     NULL,
 };
 
-static gvdevice_features_t gdk_pixbuf_features = {
-    0,  /* flags */
+static gvdevice_features_t device_features_gdk_pixbuf = {
+    GVDEVICE_DOES_TRUECOLOR,    /* flags */
+    {0.,0.},                    /* default margin - points */
+    {0.,0.},                    /* default page width, height - points */
+    {96.,96.},                  /* dpi */
 };
 
 gvplugin_installed_t gvdevice_gdk_pixbuf_types[] = {
-    {FORMAT_BMP, "bmp:cairo", 10, &gdk_pixbuf_engine, &gdk_pixbuf_features},
-    {FORMAT_ICO, "ico:cairo", 10, &gdk_pixbuf_engine, &gdk_pixbuf_features},
-    {FORMAT_JPEG, "jpe:cairo", 10, &gdk_pixbuf_engine, &gdk_pixbuf_features},
-    {FORMAT_JPEG, "jpeg:cairo", 10, &gdk_pixbuf_engine, &gdk_pixbuf_features},
-    {FORMAT_JPEG, "jpg:cairo", 10, &gdk_pixbuf_engine, &gdk_pixbuf_features},
-    {FORMAT_PNG, "png:cairo", 5, &gdk_pixbuf_engine, &gdk_pixbuf_features},
-    {FORMAT_TIFF, "tif:cairo", 10, &gdk_pixbuf_engine, &gdk_pixbuf_features},
-    {FORMAT_TIFF, "tiff:cairo", 10, &gdk_pixbuf_engine, &gdk_pixbuf_features},
+    {FORMAT_BMP, "bmp:cairo", 10, &gdk_pixbuf_engine, &device_features_gdk_pixbuf},
+    {FORMAT_ICO, "ico:cairo", 10, &gdk_pixbuf_engine, &device_features_gdk_pixbuf},
+    {FORMAT_JPEG, "jpe:cairo", 10, &gdk_pixbuf_engine, &device_features_gdk_pixbuf},
+    {FORMAT_JPEG, "jpeg:cairo", 10, &gdk_pixbuf_engine, &device_features_gdk_pixbuf},
+    {FORMAT_JPEG, "jpg:cairo", 10, &gdk_pixbuf_engine, &device_features_gdk_pixbuf},
+    {FORMAT_PNG, "png:cairo", 5, &gdk_pixbuf_engine, &device_features_gdk_pixbuf},
+    {FORMAT_TIFF, "tif:cairo", 10, &gdk_pixbuf_engine, &device_features_gdk_pixbuf},
+    {FORMAT_TIFF, "tiff:cairo", 10, &gdk_pixbuf_engine, &device_features_gdk_pixbuf},
     {0, NULL, 0, NULL, NULL}
 };
index f92ec1026e172c346df5547d5c00b6408cd1824a..95f6fdea65b66f1efcf559616c45b55e3e549f6c 100644 (file)
@@ -150,7 +150,11 @@ static void finalize_gtk(GVJ_t *firstjob)
 }
 
 static gvdevice_features_t device_features_gtk = {
-    GVDEVICE_EVENTS,    
+    GVDEVICE_DOES_TRUECOLOR
+       | GVDEVICE_EVENTS,      /* flags */
+    {0.,0.},                    /* default margin - points */
+    {0.,0.},                    /* default page width, height - points */
+    {96.,96.},                  /* dpi */
 };
 
 static gvdevice_engine_t device_engine_gtk = {
index da942e6a4e0c5573304e96942d26a263caf8e873..8ce54867e1c888da9d592be80e0301872a1e5360 100644 (file)
@@ -278,28 +278,29 @@ static gvrender_engine_t ming_engine = {
     0,                         /* ming_library_shape */
 };
 
-static gvrender_features_t ming_features = {
-    (  GVRENDER_DOES_MULTIGRAPHS
-       | GVRENDER_DOES_TRUECOLOR
-       | GVRENDER_Y_GOES_DOWN
-//     | GVRENDER_DOES_TRANSFORM
-    ),                         /* feature flags */
-    0,                         /* default margin - points */
+static gvrender_features_t render_features_ming = {
+    GVRENDER_Y_GOES_DOWN,      /* flags */
     4.,                         /* default pad - graph units */
-    {0.,0.},                    /* default page width, height - points */
-    {96.,96.},                 /* default dpi */
     0,                         /* knowncolors */
     0,                         /* sizeof knowncolors */
     RGBA_BYTE,                 /* color_type */
     NULL,                      /* imageloader for usershapes */
 };
 
+static gvdevice_features_t device_features_ming = {
+    GVDEVICE_DOES_PAGES
+       | GVDEVICE_DOES_TRUECOLOR, /* flags */
+    {0.,0.},                   /* default margin - points */
+    {0.,0.},                    /* default page width, height - points */
+    {96.,96.},                 /* default dpi */
+};
+
 gvplugin_installed_t gvrender_ming_types[] = {
-    {FORMAT_SWF, "ming", 10, &ming_engine, NULL},
+    {FORMAT_SWF, "ming", 10, &ming_engine, &render_features_ming},
     {0, NULL, 0, NULL, NULL}
 };
 
 gvplugin_installed_t gvdevice_ming_types[] = {
-    {FORMAT_SWF, "swf:ming", 10, NULL, &ming_features},
+    {FORMAT_SWF, "swf:ming", 10, NULL, &device_features_ming},
     {0, NULL, 0, NULL, NULL}
 };
index e3ca23e6f9a83b2e54d76edbf8d8928a2cb722a1..4a6f18ff63640885723d61fc55b0c3b124918cd8 100644 (file)
@@ -385,52 +385,41 @@ static gvrender_engine_t cairogen_engine = {
     0,                         /* cairogen_library_shape */
 };
 
-static gvrender_features_t cairogen_features = {
-    GVRENDER_DOES_TRUECOLOR
-       | GVRENDER_Y_GOES_DOWN
+static gvrender_features_t render_features_cairo = {
+    GVRENDER_Y_GOES_DOWN
        | GVRENDER_DOES_TRANSFORM, /* flags */
-    0,                         /* default margin - points */
     4.,                         /* default pad - graph units */
-    {0.,0.},                    /* default page width, height - points */
-    {96.,96.},                 /* default dpi */
     0,                         /* knowncolors */
     0,                         /* sizeof knowncolors */
     RGBA_DOUBLE,               /* color_type */
     "cairo",                   /* imageloader for usershapes */
 };
 
-static gvrender_features_t cairogen_features_ps = {
-    GVRENDER_DOES_TRUECOLOR
-       | GVRENDER_Y_GOES_DOWN
-       | GVRENDER_DOES_TRANSFORM, /* flags */
-    36,                                /* default margin - points */
-    4.,                         /* default pad - graph units */
+static gvdevice_features_t device_features_bitmaps = {
+    GVDEVICE_DOES_TRUECOLOR,    /* flags */
+    {0.,0.},                   /* default margin - points */
     {0.,0.},                    /* default page width, height - points */
-    {72.,72.},                 /* postscript 72 dpi */
-    0,                         /* knowncolors */
-    0,                         /* sizeof knowncolors */
-    RGBA_DOUBLE,               /* color_type */
-    "cairo",                   /* imageloader for usershapes */
+    {96.,96.},                 /* typical monitor dpi */
 };
 
-static gvrender_features_t cairogen_features_svg = {
-    GVRENDER_DOES_TRUECOLOR
-       | GVRENDER_Y_GOES_DOWN
-       | GVRENDER_DOES_TRANSFORM, /* flags */
-    0,                         /* default margin - points */
-    4.,                         /* default pad - graph units */
+static gvdevice_features_t device_features_ps = {
+    GVDEVICE_DOES_TRUECOLOR,    /* flags */
+    {36.,36.},                 /* default margin - points */
     {0.,0.},                    /* default page width, height - points */
     {72.,72.},                 /* postscript 72 dpi */
-    0,                         /* knowncolors */
-    0,                         /* sizeof knowncolors */
-    RGBA_DOUBLE,               /* color_type */
-    "cairo",                   /* imageloader for usershapes */
+};
+
+static gvdevice_features_t device_features_svg = {
+    GVDEVICE_DOES_TRUECOLOR,    /* flags */
+    {0.,0.},                   /* default margin - points */
+    {0.,0.},                    /* default page width, height - points */
+    {72.,72.},                 /* svg 72 dpi */
 };
 #endif
 
 gvplugin_installed_t gvrender_pango_types[] = {
 #ifdef HAVE_PANGOCAIRO
-    {FORMAT_CAIRO, "cairo", 10, &cairogen_engine, &cairogen_features},
+    {FORMAT_CAIRO, "cairo", 10, &cairogen_engine, &render_features_cairo},
 #endif
     {0, NULL, 0, NULL, NULL}
 };
@@ -438,31 +427,31 @@ gvplugin_installed_t gvrender_pango_types[] = {
 gvplugin_installed_t gvdevice_pango_types[] = {
 #ifdef HAVE_PANGOCAIRO
 #ifdef CAIRO_HAS_PNG_FUNCTIONS
-    {FORMAT_PNG, "png:cairo", 10, NULL, &cairogen_features},
+    {FORMAT_PNG, "png:cairo", 10, NULL, &device_features_bitmaps},
 #endif
 #ifdef CAIRO_HAS_PS_SURFACE
-    {FORMAT_PS, "ps:cairo", -10, NULL, &cairogen_features_ps},
+    {FORMAT_PS, "ps:cairo", -10, NULL, &device_features_ps},
 #endif
 #ifdef CAIRO_HAS_PDF_SURFACE
-    {FORMAT_PDF, "pdf:cairo", 10, NULL, &cairogen_features_ps},
+    {FORMAT_PDF, "pdf:cairo", 10, NULL, &device_features_ps},
 #endif
 #ifdef CAIRO_HAS_SVG_SURFACE
-    {FORMAT_SVG, "svg:cairo", -10, NULL, &cairogen_features_svg},
+    {FORMAT_SVG, "svg:cairo", -10, NULL, &device_features_svg},
 #endif
 //#ifdef CAIRO_HAS_XCB_SURFACE
-//    {FORMAT_XCB, "xcb:cairo", 0, NULL, &cairogen_features},
+//    {FORMAT_XCB, "xcb:cairo", 0, NULL, &device_features_bitmaps},
 //#endif
 //#ifdef CAIRO_HAS_SDL_SURFACE
-//    {FORMAT_SDL, "sdl:cairo", 0, NULL, &cairogen_features},
+//    {FORMAT_SDL, "sdl:cairo", 0, NULL, &device_features_bitmaps},
 //#endif
 //#ifdef CAIRO_HAS_GLITZ_SURFACE
-//    {FORMAT_GLITZ, "glitz:cairo", 0, NULL, &cairogen_features},
+//    {FORMAT_GLITZ, "glitz:cairo", 0, NULL, &device_features_bitmaps},
 //#endif
 //#ifdef CAIRO_HAS_QUARTZ_SURFACE
-//    {FORMAT_QUARTZ, "quartz:cairo", 0, NULL, &cairogen_features},
+//    {FORMAT_QUARTZ, "quartz:cairo", 0, NULL, &device_features_bitmaps},
 //#endif
 //#ifdef CAIRO_HAS_WIN32_SURFACE
-//    {FORMAT_WIN32, "win32:cairo", 0, NULL, &cairogen_features},
+//    {FORMAT_WIN32, "win32:cairo", 0, NULL, &device_features_bitmaps},
 //#endif
 #endif
     {0, NULL, 0, NULL, NULL}
index ea7a8071d25ec7772a01d29cd261ec1cd2a0e724..244c4af7fa6025a4689ac2dbd8a9e93ebcd42af0 100644 (file)
@@ -578,7 +578,11 @@ static void finalize_xlib(GVJ_t *firstjob)
 }
 
 static gvdevice_features_t device_features_xlib = {
-    GVDEVICE_EVENTS,
+    GVDEVICE_DOES_TRUECOLOR
+       | GVDEVICE_EVENTS,      /* flags */
+    {0.,0.},                    /* default margin - points */
+    {0.,0.},                    /* default page width, height - points */
+    {96.,96.},                  /* dpi */
 };
 
 static gvdevice_engine_t device_engine_xlib = {