- **Breaking**: The `device_sets_dpi`, `external_context`, `fit_mode`,
`needs_refresh`, `click`, `has_grown`, and `has_been_rendered` fields of the
`GVJ_t` struct are now C99 `bool`s instead of Graphviz-specific `boolean`s.
+- **Breaking**: The `loadimage` member of the `gvloadimage_engine_t` struct must
+ now accept a C99 `bool` parameter instead of a former Graphviz-specific
+ `boolean` parameter.
- **Breaking**: 1-bit fields of the `obj_state_s` struct are now unsigned
instead of signed.
- **Breaking**: Graphviz headers no longer define the constant `MAXSHORT`. A
agerr (AGWARN, "No loadimage plugin for \"%s\"\n", type);
if ((gvli = job->loadimage.engine) && gvli->loadimage)
- gvli->loadimage(job, us, b, filled ? TRUE : FALSE);
+ gvli->loadimage(job, us, b, filled);
}
#include "types.h"
#include "gvplugin.h"
#include "gvcjob.h"
+#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
GVPLUGIN_LOADIMAGE_API void gvusershape_file_release(usershape_t *us);
struct gvloadimage_engine_s {
- void (*loadimage) (GVJ_t *job, usershape_t *us, boxf b, boolean filled);
+ void (*loadimage) (GVJ_t *job, usershape_t *us, boxf b, bool filled);
};
#undef GVPLUGIN_LOADIMAGE_API
#include <common/utils.h>
#include <gvc/gvio.h>
-extern void core_loadimage_xdot(GVJ_t*, usershape_t*, boxf, boolean);
+extern void core_loadimage_xdot(GVJ_t*, usershape_t*, boxf, bool);
extern shape_desc *find_user_shape(char *name);
typedef enum {
FORMAT_GIF_TK,
} format_type;
-static void core_loadimage_svg(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
+static void core_loadimage_svg(GVJ_t * job, usershape_t *us, boxf b, bool filled)
{
(void)filled;
gvputs(job, "/>\n");
}
-static void core_loadimage_fig(GVJ_t * job, usershape_t *us, boxf bf, boolean filled)
+static void core_loadimage_fig(GVJ_t * job, usershape_t *us, boxf bf, bool filled)
{
(void)filled;
b.LL.x, b.LL.y);
}
-static void core_loadimage_vrml(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
+static void core_loadimage_vrml(GVJ_t * job, usershape_t *us, boxf b, bool filled)
{
(void)b;
(void)filled;
}
/* usershape described by a postscript file */
-static void core_loadimage_ps(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
+static void core_loadimage_ps(GVJ_t * job, usershape_t *us, boxf b, bool filled)
{
(void)filled;
}
/* usershape described by a member of a postscript library */
-static void core_loadimage_pslib(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
+static void core_loadimage_pslib(GVJ_t * job, usershape_t *us, boxf b, bool filled)
{
int i;
pointf AF[4];
}
}
-static void core_loadimage_vml(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
+static void core_loadimage_vml(GVJ_t * job, usershape_t *us, boxf b, bool filled)
{
(void)filled;
gvputs(job, " />\n");
}
-static void core_loadimage_tk(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
+static void core_loadimage_tk(GVJ_t * job, usershape_t *us, boxf b, bool filled)
{
(void)filled;
us->name, (b.UR.x + b.LL.x) / 2, (b.UR.y + b.LL.y) / 2);
}
-static void core_loadimage_null(GVJ_t *gvc, usershape_t *us, boxf b, boolean filled)
+static void core_loadimage_null(GVJ_t *gvc, usershape_t *us, boxf b, bool filled)
{
/* null function - basically suppress the missing loader message */
(void)gvc;
xdot_points(job, 'L', A, n);
}
-void core_loadimage_xdot(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
+void core_loadimage_xdot(GVJ_t * job, usershape_t *us, boxf b, bool filled)
{
(void)filled;
#include "config.h"
+#include <stdbool.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
return im2;
}
-static void gd_loadimage_gd(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
+static void gd_loadimage_gd(GVJ_t * job, usershape_t *us, boxf b, bool filled)
{
gdImagePtr im2, im = (gdImagePtr) job->context;
}
#ifdef HAVE_PANGOCAIRO
-static void gd_loadimage_cairo(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
+static void gd_loadimage_cairo(GVJ_t * job, usershape_t *us, boxf b, bool filled)
{
cairo_t *cr = (cairo_t *) job->context; /* target context */
unsigned int x, y, stride, width, height, px;
}
#endif
-static void gd_loadimage_ps(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
+static void gd_loadimage_ps(GVJ_t * job, usershape_t *us, boxf b, bool filled)
{
gdImagePtr im = NULL;
int X, Y, x, y, px;
return reinterpret_cast<Image*>(us->data);
}
-static void gdiplus_loadimage_gdiplus(GVJ_t * job, usershape_t *us, boxf b, boolean)
+static void gdiplus_loadimage_gdiplus(GVJ_t * job, usershape_t *us, boxf b, bool)
{
/* get the image from usershape details, then blit it to the context */
Image *image = gdiplus_loadimage(job, us);
#include "config.h"
+#include <stdbool.h>
#include <stdlib.h>
#include <gvc/gvplugin_loadimage.h>
#endif /* HAVE_CAIRO_SURFACE_SET_MIME_DATA */
}
-static void gdk_loadimage_cairo(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
+static void gdk_loadimage_cairo(GVJ_t * job, usershape_t *us, boxf b, bool filled)
{
cairo_t *cr = (cairo_t *) job->context; /* target context */
#ifndef HAVE_CAIRO_SURFACE_SET_MIME_DATA
#include "config.h"
+#include <stdbool.h>
#include <stdlib.h>
#include <stdint.h>
#include <sys/stat.h>
return gs->pattern;
}
-static void gvloadimage_gs_cairo(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
+static void gvloadimage_gs_cairo(GVJ_t * job, usershape_t *us, boxf b, bool filled)
{
cairo_t *cr = (cairo_t *) job->context; /* target context */
cairo_pattern_t *pattern = gvloadimage_gs_load(job, us);
}
/* usershape described by a postscript file */
-static void lasi_loadimage_ps(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
+static void lasi_loadimage_ps(GVJ_t * job, usershape_t *us, boxf b, bool filled)
{
assert(job);
assert(us);
#include "config.h"
+#include <stdbool.h>
#include <stdlib.h>
#include <gvc/gvplugin_loadimage.h>
return surface;
}
-static void pango_loadimage_cairo(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
+static void pango_loadimage_cairo(GVJ_t * job, usershape_t *us, boxf b, bool filled)
{
cairo_t *cr = (cairo_t *) job->context; /* target context */
cairo_surface_t *surface; /* source surface */
}
}
-static void pango_loadimage_ps(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
+static void pango_loadimage_ps(GVJ_t * job, usershape_t *us, boxf b, bool filled)
{
cairo_surface_t *surface; /* source surface */
cairo_format_t format;
#include "config.h"
+#include <stdbool.h>
#include <stdlib.h>
#include <sys/stat.h>
return document;
}
-static void gvloadimage_poppler_cairo(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
+static void gvloadimage_poppler_cairo(GVJ_t * job, usershape_t *us, boxf b, bool filled)
{
PopplerDocument* document = gvloadimage_poppler_load(job, us);
PopplerPage* page;
#include "config.h"
+#include <stdbool.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
return (CGImageRef)(us->data);
}
-static void quartz_loadimage_quartz(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
+static void quartz_loadimage_quartz(GVJ_t * job, usershape_t *us, boxf b, bool filled)
{
/* get the image from usershape details, then blit it to the context */
CGImageRef image = quartz_loadimage(job, us);
#include "config.h"
+#include <stdbool.h>
#include <stdlib.h>
#include <sys/stat.h>
return rsvgh;
}
-static void gvloadimage_rsvg_cairo(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
+static void gvloadimage_rsvg_cairo(GVJ_t * job, usershape_t *us, boxf b, bool filled)
{
RsvgHandle* rsvgh = gvloadimage_rsvg_load(job, us);
#include "config.h"
+#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
}
/* paint image into required location in graph */
-static void webp_loadimage_cairo(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
+static void webp_loadimage_cairo(GVJ_t * job, usershape_t *us, boxf b, bool filled)
{
cairo_t *cr = (cairo_t *) job->context; /* target context */
cairo_surface_t *surface; /* source surface */