static void
emit_html_img(GVJ_t * job, htmlimg_t * cp, htmlenv_t * env, void *obj)
{
- point A[4];
+ pointf A[4];
box bb = cp->box;
bb.LL.x += env->p.x;
bb.UR.x += env->p.x;
bb.UR.y += env->p.y;
- A[0] = bb.UR;
- A[1].x = bb.LL.x;
- A[1].y = bb.UR.y;
- A[2] = bb.LL;
- A[3].x = bb.UR.x;
- A[3].y = bb.LL.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);
}
char *type;
} gvplugin_active_render_t;
- /*
- * gv_matrix_t: (compat with cairo_matrix_t)
- *
- * A #gv_matrix_t holds an affine transformation, such as a scale,
- * rotation, or shear, or a combination of those.
- */
- typedef struct gv_matrix_s {
- double xx; double yx;
- double xy; double yy;
- double x0; double y0;
- } gv_matrix_t;
-
typedef struct gv_argvlist_s {
char **argv;
int argc;
boxf clip; /* clip region in graph units */
boxf pageBoxClip; /* intersection of clip and pageBox */
- gv_matrix_t transform; /* transformation matrix for renderers that can use it */
pointf compscale; /* composite device scale incl: scale, zoom, dpi, y_goes_down */
pointf offset; /* composite translation */
job->clip.LL.y = job->focus.y - sx - EPSILON;
job->offset.x = -job->focus.y * job->compscale.x + job->width * 3 / 2;
job->offset.y = -job->focus.x * job->compscale.y + job->height / 2.;
-
- job->transform.xx = 0;
- job->transform.yy = 0;
- job->transform.xy = job->compscale.x;
- job->transform.yx = job->compscale.y;
- job->transform.x0 = job->offset.y;
- job->transform.y0 = job->offset.x;
} else {
job->clip.UR.x = job->focus.x + sx + EPSILON;
job->clip.UR.y = job->focus.y + sy + EPSILON;
job->clip.LL.y = job->focus.y - sy - EPSILON;
job->offset.x = -job->focus.x * job->compscale.x + job->width / 2.;
job->offset.y = -job->focus.y * job->compscale.y + job->height / 2.;
-
- job->transform.xx = job->compscale.x;
- job->transform.yy = job->compscale.y;
- job->transform.xy = 0;
- job->transform.yx = 0;
- job->transform.x0 = job->offset.x;
- job->transform.y0 = job->offset.y;
}
if (gvre) {
gvre->usershape(job, us, b, filled);
#ifdef WITH_CODEGENS
else {
- point *A;
codegen_t *cg = job->codegen;
if (sizeA < n) {