{0.,0.}, /* default page width, height - points */
{96.,96.}, /* dpi */
};
+
+static gvdevice_features_t device_features_gd_no_writer = {
+ GVDEVICE_BINARY_FORMAT
+ | GVDEVICE_NO_WRITER
+ | GVDEVICE_DOES_TRUECOLOR,/* flags */
+ {0.,0.}, /* default margin - points */
+ {0.,0.}, /* default page width, height - points */
+ {96.,96.}, /* dpi */
+};
#endif
#endif
{FORMAT_PNG, "png:cairo", 5, &gd_engine, &device_features_gd},
#endif
- {FORMAT_GD, "gd:cairo", 5, &gd_engine, &device_features_gd},
- {FORMAT_GD2, "gd2:cairo", 5, &gd_engine, &device_features_gd},
+ {FORMAT_GD, "gd:cairo", 5, &gd_engine, &device_features_gd_no_writer},
+ {FORMAT_GD2, "gd2:cairo", 5, &gd_engine, &device_features_gd_no_writer},
#if 0
/* libgd only supports reading of xpm files */
{96.,96.}, /* default dpi */
};
+static gvdevice_features_t device_features_gd_tc_no_writer = {
+ GVDEVICE_DOES_TRUECOLOR
+ | GVDEVICE_NO_WRITER, /* flags */
+ {0.,0.}, /* default margin - points */
+ {0.,0.}, /* default page width, height - points */
+ {96.,96.}, /* default dpi */
+};
+
#endif
gvplugin_installed_t gvrender_gd_types[] = {
{FORMAT_PNG, "png:gd", 1, NULL, &device_features_gd_tc},
#endif
- {FORMAT_GD, "gd:gd", 1, NULL, &device_features_gd_tc},
- {FORMAT_GD2, "gd2:gd", 1, NULL, &device_features_gd_tc},
+ {FORMAT_GD, "gd:gd", 1, NULL, &device_features_gd_tc_no_writer},
+ {FORMAT_GD2, "gd2:gd", 1, NULL, &device_features_gd_tc_no_writer},
#if 0
/* libgd has no support for xbm as output */
static gvdevice_features_t device_features_ming = {
GVDEVICE_DOES_PAGES
+ | GVDEVICE_NO_WRITER
| GVDEVICE_DOES_TRUECOLOR, /* flags */
{0.,0.}, /* default margin - points */
{0.,0.}, /* default page width, height - points */
#endif
#endif
-extern size_t gvdevice_write(GVJ_t * job, char *s, unsigned int len);
-
static void cairogen_set_color(cairo_t * cr, gvcolor_t * color)
{
cairo_set_source_rgba(cr, color->u.RGBA[0], color->u.RGBA[1],
color->u.RGBA[2], color->u.RGBA[3]);
}
+extern size_t gvdevice_write(GVJ_t * job, char *s, unsigned int len);
+
static cairo_status_t
writer (void *closure, const unsigned char *data, unsigned int length)
{