peripheries = 1;
gvrender_set_pencolor(job, "transparent");
}
+
+ /* draw peripheries first */
+ for (j = 0; j < peripheries; j++) {
+ for (i = 0; i < sides; i++) {
+ P = vertices[i + j * sides];
+ AF[i].x = P.x * xsize + ND_coord(n).x;
+ AF[i].y = P.y * ysize + ND_coord(n).y;
+ }
+ if (sides <= 2) {
+ if ((style & WEDGED) && (j == 0) && multicolor(fillcolor)) {
+ int rv = wedgedEllipse (job, AF, fillcolor);
+ if (rv > 1)
+ agerr (AGPREV, "in node %s\n", agnameof(n));
+ filled = 0;
+ }
+ gvrender_ellipse(job, AF, sides, filled);
+ if (style & DIAGONALS) {
+ Mcircle_hack(job, n);
+ }
+ } else if (style & STRIPED) {
+ if (j == 0) {
+ int rv = stripedBox (job, AF, fillcolor, 1);
+ if (rv > 1)
+ agerr (AGPREV, "in node %s\n", agnameof(n));
+ }
+ gvrender_polygon(job, AF, sides, 0);
+ } else if (SPECIAL_CORNERS(style)) {
+ round_corners(job, AF, sides, style, filled);
+ } else {
+ gvrender_polygon(job, AF, sides, filled);
+ }
+ /* fill innermost periphery only */
+ filled = FALSE;
+ }
+
usershape_p = FALSE;
if (ND_shape(n)->usershape) {
name = ND_shape(n)->name;
filled = FALSE; /* with user shapes, we have done the fill if needed */
}
- for (j = 0; j < peripheries; j++) {
- for (i = 0; i < sides; i++) {
- P = vertices[i + j * sides];
- AF[i].x = P.x * xsize + ND_coord(n).x;
- AF[i].y = P.y * ysize + ND_coord(n).y;
- }
- if (sides <= 2) {
- if ((style & WEDGED) && (j == 0) && multicolor(fillcolor)) {
- int rv = wedgedEllipse (job, AF, fillcolor);
- if (rv > 1)
- agerr (AGPREV, "in node %s\n", agnameof(n));
- filled = 0;
- }
- gvrender_ellipse(job, AF, sides, filled);
- if (style & DIAGONALS) {
- Mcircle_hack(job, n);
- }
- } else if (style & STRIPED) {
- if (j == 0) {
- int rv = stripedBox (job, AF, fillcolor, 1);
- if (rv > 1)
- agerr (AGPREV, "in node %s\n", agnameof(n));
- }
- gvrender_polygon(job, AF, sides, 0);
- } else if (SPECIAL_CORNERS(style)) {
- round_corners(job, AF, sides, style, filled);
- } else {
- gvrender_polygon(job, AF, sides, filled);
- }
- /* fill innermost periphery only */
- filled = FALSE;
- }
free (clrs[0]);
emit_label(job, EMIT_NLABEL, ND_label(n));
FORMAT_PNG_VRML, FORMAT_GIF_VRML, FORMAT_JPEG_VRML,
FORMAT_PS_PS, FORMAT_PSLIB_PS,
FORMAT_PNG_VML, FORMAT_GIF_VML, FORMAT_JPEG_VML,
+ FORMAT_GIF_TK,
} format_type;
static void core_loadimage_svg(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
gvputs(job, " />\n");
}
+static void core_loadimage_tk(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
+{
+ double graphHeight;
+ graphHeight = (job->bb.UR.y - job->bb.LL.y);
+ gvprintf (job, "image create photo \"photo_%s\" -file \"%s\"\n",
+ us->name, us->name);
+ gvprintf (job, "$c create image %.2f %.2f -image \"photo_%s\"\n",
+ us->name, (b.UR.x + b.LL.x) / 2, (b.UR.y + b.LL.y) / 2);
+}
+
void core_loadimage_null(GVJ_t *gvc, usershape_t *us, boxf b, boolean filled)
{
/* null function - basically suppress the missing loader message */
core_loadimage_vml
};
+static gvloadimage_engine_t engine_tk = {
+ core_loadimage_tk
+};
+
gvplugin_installed_t gvloadimage_core_types[] = {
{FORMAT_PNG_SVG, "png:svg", 1, &engine_svg, NULL},
{FORMAT_GIF_SVG, "gif:svg", 1, &engine_svg, NULL},
{FORMAT_JPEG_VML, "jpe:vml", 1, &engine_vml, NULL},
{FORMAT_JPEG_VML, "jpg:vml", 1, &engine_vml, NULL},
+ {FORMAT_GIF_TK, "gif:tk", 1, &engine_tk, NULL},
+
{0, NULL, 0, NULL, NULL}
};