17 #include <sys/types.h>
19 #ifdef HAVE_SYS_MMAN_H
49 double width = (b.
UR.
x-b.
LL.
x);
50 double height = (b.
UR.
y-b.
LL.
y);
51 double originx = (b.
UR.
x+b.
LL.
x - width)/2;
52 double originy = (b.
UR.
y+b.
LL.
y + height)/2;
57 gvputs(job,
"<image xlink:href=\"");
62 gvprintf (job,
"\" width=\"%gpx\" height=\"%gpx\" preserveAspectRatio=\"xMidYMid meet\" x=\"%g\" y=\"%g\"",
63 height, width, originx, -originy);
64 gvprintf (job,
" transform=\"rotate(%d %g %g)\"",
69 gvprintf (job,
"\" width=\"%gpx\" height=\"%gpx\" preserveAspectRatio=\"xMinYMin meet\" x=\"%g\" y=\"%g\"",
70 width, height, originx, -originy);
86 double style_val = 0.0;
90 int forward_arrow = 0;
91 int backward_arrow = 0;
103 gvprintf(job,
"%d %d %d %d %d %d %d %d %d %.1f %d %d %d %d %d %d\n %d %s\n",
104 object_code, sub_type, line_style, thickness, pen_color,
105 fill_color, depth, pen_style, area_fill, style_val, join_style,
106 cap_style, radius, forward_arrow, backward_arrow, npoints,
108 gvprintf(job,
" %d %d %d %d %d %d %d %d %d %d\n",
131 gvprintf(job,
" appearance Appearance {\n");
132 gvprintf(job,
" material Material {\n");
133 gvprintf(job,
" ambientIntensity 0.33\n");
134 gvprintf(job,
" diffuseColor 1 1 1\n");
136 gvprintf(job,
" texture ImageTexture { url \"%s\" }\n", us->
name);
143 #ifdef HAVE_SYS_MMAN_H
178 #ifdef HAVE_SYS_MMAN_H
179 us->
data = mmap(0, statbuf.st_size, PROT_READ, MAP_SHARED, fd, 0);
181 us->
data = malloc(statbuf.st_size);
182 read(fd, us->
data, statbuf.st_size);
195 gvprintf(job,
"gsave %g %g translate newpath\n",
196 b.
LL.
x - (
double)(us->
x), b.
LL.
y - (
double)(us->
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);
234 for (i = 0; i < 4; i++)
235 gvprintf(job,
"%g %g ", AF[i].x, AF[i].y);
236 gvprintf(job,
"%g %g ", AF[0].x, AF[0].y);
245 gvprintf (job,
"<v:image src=\"%s\" style=\" position:absolute; width:%.2f; height:%.2f; left:%.2f ; top:%.2f\"",
252 gvprintf (job,
"image create photo \"photo_%s\" -file \"%s\"\n",
254 gvprintf (job,
"$c create image %.2f %.2f -image \"photo_%s\"\n",
shape_desc * find_user_shape(const char *)
void(* datafree)(usershape_t *us)
void core_loadimage_null(GVJ_t *gvc, usershape_t *us, boxf b, boolean filled)
int gvputs(GVJ_t *job, const char *s)
boolean gvusershape_file_access(usershape_t *us)
gvplugin_installed_t gvloadimage_core_types[]
void gvusershape_file_release(usershape_t *us)
void epsf_emit_body(GVJ_t *job, usershape_t *us)
void core_loadimage_xdot(GVJ_t *, usershape_t *, boxf, boolean)
void gvprintf(GVJ_t *job, const char *format,...)