#include "config.h"
#include <assert.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdint.h>
#include <sys/stat.h>
#include <util/agxbuf.h>
#include <gvc/gvplugin_loadimage.h>
#include <ghostscript/iapi.h>
#include <ghostscript/ierrors.h>
#include <cairo/cairo.h>
Go to the source code of this file.
|
static void | gvloadimage_gs_free (usershape_t *us) |
|
static int | gs_writer (void *caller_handle, const char *str, int len) |
|
static void | gs_error (GVJ_t *job, const char *name, const char *funstr, int err) |
|
static int | gvloadimage_process_file (GVJ_t *job, usershape_t *us, void *instance) |
|
static int | gvloadimage_process_surface (GVJ_t *job, usershape_t *us, gs_t *gs, void *instance) |
|
static cairo_pattern_t * | gvloadimage_gs_load (GVJ_t *job, usershape_t *us) |
|
static void | gvloadimage_gs_cairo (GVJ_t *job, usershape_t *us, boxf b, bool filled) |
|
◆ e_invalidid
#define e_invalidid gs_error_invalidid |
◆ e_unregistered
#define e_unregistered gs_error_unregistered |
◆ e_VMerror
#define e_VMerror gs_error_VMerror |
Ensure compatibility with Ghostscipt versions newer than 9.18 while maintaining compatibility with the older versions.
Definition at line 32 of file gvloadimage_gs.c.
◆ GS_ARGC
#define GS_ARGC sizeof(gs_args)/sizeof(gs_args[0]) |
◆ GSAPI_REVISION_REQUIRED
#define GSAPI_REVISION_REQUIRED 863 |
◆ gs_t
◆ anonymous enum
Enumerator |
---|
FORMAT_PS_CAIRO | |
FORMAT_EPS_CAIRO | |
Definition at line 43 of file gvloadimage_gs.c.
◆ gs_error()
static void gs_error |
( |
GVJ_t * |
job, |
|
|
const char * |
name, |
|
|
const char * |
funstr, |
|
|
int |
err |
|
) |
| |
|
static |
◆ gs_writer()
static int gs_writer |
( |
void * |
caller_handle, |
|
|
const char * |
str, |
|
|
int |
len |
|
) |
| |
|
static |
◆ gvloadimage_gs_cairo()
◆ gvloadimage_gs_free()
◆ gvloadimage_gs_load()
Definition at line 170 of file gvloadimage_gs.c.
References GVJ_s::common, GVJ_s::context, gs_s::cr, usershape_s::data, usershape_s::datafree, GVCOMMON_s::errorfn, gs_error(), gs_writer(), GSAPI_REVISION_REQUIRED, gvloadimage_gs_free(), gvloadimage_process_surface(), malloc(), usershape_s::name, NULL, gs_s::pattern, and gs_s::surface.
Referenced by gvloadimage_gs_cairo().
◆ gvloadimage_process_file()
static int gvloadimage_process_file |
( |
GVJ_t * |
job, |
|
|
usershape_t * |
us, |
|
|
void * |
instance |
|
) |
| |
|
static |
◆ gvloadimage_process_surface()
static int gvloadimage_process_surface |
( |
GVJ_t * |
job, |
|
|
usershape_t * |
us, |
|
|
gs_t * |
gs, |
|
|
void * |
instance |
|
) |
| |
|
static |
Definition at line 108 of file gvloadimage_gs.c.
References agxbfree(), agxbprint(), agxbuse(), gs_s::cr, usershape_s::dpi, GS_ARGC, gs_error(), gvloadimage_process_file(), usershape_s::h, usershape_s::name, NULL, gs_s::pattern, gs_s::surface, usershape_s::w, usershape_s::x, and usershape_s::y.
Referenced by gvloadimage_gs_load().
◆ engine_cairo
Initial value:= {
}
static void gvloadimage_gs_cairo(GVJ_t *job, usershape_t *us, boxf b, bool filled)
Definition at line 248 of file gvloadimage_gs.c.
◆ gvloadimage_gs_types
Initial value:= {
}
static gvloadimage_engine_t engine_cairo
Definition at line 252 of file gvloadimage_gs.c.