static void cmd_curveto_abs(svg_state_t *state, const float *p) { float s[2], c[2], d[3], e[2]; s[0] = state->cur[0]; s[1] = state->cur[1]; c[0] = p[0]; c[1] = p[1]; d[0] = p[2]; d[1] = p[3]; e[0] = p[4]; e[1] = p[5]; state->cur[0] = e[0]; state->cur[1] = e[1]; float ts[2], tc[2], td[3], te[2]; svg_mtx_vec_mul(ts, state->ctm, s); svg_mtx_vec_mul(tc, state->ctm, c); svg_mtx_vec_mul(td, state->ctm, d); svg_mtx_vec_mul(te, state->ctm, e); cmd_curve(state, tc, td, te); }
static void cmd_lineto(svg_state_t *state) { float pt[2]; svg_mtx_vec_mul(pt, state->ctm, state->cur); vec_emit_f1(state->pm, VC_LINE_TO, pt); }
static void cmd_move(svg_state_t *state) { float pt[2]; svg_mtx_vec_mul(pt, state->ctm, state->cur); vec_emit_f1(state->pm, VC_MOVE_TO, pt); }
static void cmd_lineto(svg_state_t *state) { float pt[2]; svg_mtx_vec_mul(pt, state->ctm, state->cur); FT_Vector v; toVector(&v, pt); if(state->inpath) FT_Stroker_LineTo(state->stroker, &v); }
static void cmd_move(svg_state_t *state) { float pt[2]; FT_Vector v; svg_mtx_vec_mul(pt, state->ctm, state->cur); toVector(&v, pt); if(state->inpath) { FT_Stroker_LineTo(state->stroker, &v); } else { FT_Stroker_BeginSubPath(state->stroker, &v, 0); state->inpath = 1; } }