44 double width = (b.
UR.
x-b.
LL.
x);
45 double height = (b.
UR.
y-b.
LL.
y);
46 double originx = (b.
UR.
x+b.
LL.
x - width)/2;
47 double originy = (b.
UR.
y+b.
LL.
y + height)/2;
52 gvputs(job,
"<image xlink:href=\"");
57 gvprintf (job,
"\" width=\"%gpx\" height=\"%gpx\" preserveAspectRatio=\"xMidYMid meet\" x=\"%g\" y=\"%g\"",
58 height, width, originx, -originy);
59 gvprintf (job,
" transform=\"rotate(%d %g %g)\"",
64 gvprintf (job,
"\" width=\"%gpx\" height=\"%gpx\" preserveAspectRatio=\"xMinYMin meet\" x=\"%g\" y=\"%g\"",
65 width, height, originx, -originy);
83 double style_val = 0.0;
87 int forward_arrow = 0;
88 int backward_arrow = 0;
96 gvprintf(job,
"%d %d %d %d %d %d %d %d %d %.1f %d %d %d %d %d %d\n %d %s\n",
97 object_code, sub_type, line_style, thickness, pen_color,
98 fill_color, depth, pen_style, area_fill, style_val, join_style,
99 cap_style, radius, forward_arrow, backward_arrow, npoints,
101 gvprintf(job,
" %.0f %.0f %.0f %.0f %.0f %.0f %.0f %.0f %.0f %.0f\n",
119 assert(job->
obj->
u.
n);
122 gvprintf(job,
" appearance Appearance {\n");
123 gvprintf(job,
" material Material {\n");
124 gvprintf(job,
" ambientIntensity 0.33\n");
125 gvprintf(job,
" diffuseColor 1 1 1\n");
127 gvprintf(job,
" texture ImageTexture { url \"%s\" }\n", us->
name);
134#ifdef HAVE_SYS_MMAN_H
170 us->
datasize = (size_t)statbuf.st_size;
171#ifdef HAVE_SYS_MMAN_H
172 us->
data = mmap(0, us->
datasize, PROT_READ, MAP_PRIVATE, fd, 0);
173 if (us->
data == MAP_FAILED)
178 read(fd, us->
data, statbuf.st_size);
191 gvprintf(job,
"gsave %g %g translate newpath\n",
192 b.
LL.
x - (
double)(us->
x), b.
LL.
y - (
double)(us->
y));
212 if ((shape = us->
data)) {
221 for (i = 0; i < 4; i++)
222 gvprintf(job,
"%g %g ", AF[i].x, AF[i].y);
223 gvprintf(job,
"%g %g ", AF[0].x, AF[0].y);
227 for (i = 0; i < 4; i++)
228 gvprintf(job,
"%g %g ", AF[i].x, AF[i].y);
229 gvprintf(job,
"%g %g ", AF[0].x, AF[0].y);
238 gvprintf (job,
"image create photo \"photo_%s\" -file \"%s\"\n",
240 gvprintf (job,
"$c create image %.2f %.2f -image \"photo_%s\"\n",
void core_loadimage_xdot(GVJ_t *, usershape_t *, boxf, bool)
void gvusershape_file_release(usershape_t *us)
bool gvusershape_file_access(usershape_t *us)
int gvputs(GVJ_t *job, const char *s)
void gvprintf(GVJ_t *job, const char *format,...)
static void core_loadimage_ps(GVJ_t *job, usershape_t *us, boxf b, bool filled)
static gvloadimage_engine_t engine_ps
static void core_loadimage_pslib(GVJ_t *job, usershape_t *us, boxf b, bool filled)
static gvloadimage_engine_t engine_null
static gvloadimage_engine_t engine_pslib
static void ps_freeimage(usershape_t *us)
static void core_loadimage_svg(GVJ_t *job, usershape_t *us, boxf b, bool filled)
static gvloadimage_engine_t engine_svg
static gvloadimage_engine_t engine_vrml
static gvloadimage_engine_t engine_xdot
static void core_loadimage_fig(GVJ_t *job, usershape_t *us, boxf bf, bool filled)
static gvloadimage_engine_t engine_fig
gvplugin_installed_t gvloadimage_core_types[]
static void core_loadimage_tk(GVJ_t *job, usershape_t *us, boxf b, bool filled)
shape_desc * find_user_shape(char *name)
static gvloadimage_engine_t engine_tk
static void core_loadimage_null(GVJ_t *gvc, usershape_t *us, boxf b, bool filled)
static void core_loadimage_vrml(GVJ_t *job, usershape_t *us, boxf b, bool filled)
void epsf_emit_body(GVJ_t *job, usershape_t *us)
void(* datafree)(usershape_t *us)