/* emit_html_img: * The image will be centered in the given box. * Scaling is determined by either the image's scale attribute, * or the imagescale attribute of the graph object being drawn. */ static void emit_html_img(GVJ_t * job, htmlimg_t * cp, htmlenv_t * env) { pointf A[4]; boxf bb = cp->box; char* scale; bb.LL.x += env->pos.x; bb.LL.y += env->pos.y; bb.UR.x += env->pos.x; bb.UR.y += env->pos.y; A[0] = bb.UR; A[2] = bb.LL; A[1].x = A[2].x; A[1].y = A[0].y; A[3].x = A[0].x; A[3].y = A[2].y; if (cp->scale) scale = cp->scale; else scale = env->imgscale; gvrender_usershape(job, cp->src, A, 4, TRUE, scale); }
static void emit_html_img(GVJ_t * job, htmlimg_t * cp, htmlenv_t * env) { pointf A[4]; box bb = cp->box; bb.LL.x += env->p.x; bb.LL.y += env->p.y; bb.UR.x += env->p.x; bb.UR.y += env->p.y; P2PF(bb.UR, A[0]); P2PF(bb.LL, A[2]); A[1].x = A[2].x; A[1].y = A[0].y; A[3].x = A[0].x; A[3].y = A[2].y; gvrender_usershape(job, cp->src, A, 4, true); }