void cmd_print_stats(void) { int ci, cj; dlprintf3("[l]counts: reset = %lu, found = %lu, added = %lu\n", stats_cmd.tile_reset, stats_cmd.tile_found, stats_cmd.tile_added); dlprintf5(" diff 2.5 = %lu, 3 = %lu, 4 = %lu, 2 = %lu, >4 = %lu\n", stats_cmd_diffs[0], stats_cmd_diffs[1], stats_cmd_diffs[2], stats_cmd_diffs[3], stats_cmd_diffs[4]); dlprintf2(" same_band = %lu, other_band = %lu\n", stats_cmd.same_band, stats_cmd.other_band); for (ci = 0; ci < 0x100; ci += 0x10) { const char *const *sub = cmd_sub_op_names[ci >> 4]; if (sub != 0) { dlprintf1("[l] %s =", cmd_op_names[ci >> 4]); for (cj = ci; cj < ci + 0x10; cj += 2) dprintf6("\n\t%s = %lu(%lu), %s = %lu(%lu)", sub[cj - ci], stats_cmd.op_counts[cj], stats_cmd.op_sizes[cj], sub[cj - ci + 1], stats_cmd.op_counts[cj + 1], stats_cmd.op_sizes[cj + 1]); } else {
/* Print a path */ void gx_path_print(const gx_path * ppath) { const segment *pseg = (const segment *)ppath->first_subpath; dlprintf5(" %% state_flags=%d subpaths=%d, curves=%d, point=(%f,%f)\n", ppath->state_flags, ppath->subpath_count, ppath->curve_count, fixed2float(ppath->position.x), fixed2float(ppath->position.y)); dlprintf5(" %% box=(%f,%f),(%f,%f) last=0x%lx\n", fixed2float(ppath->bbox.p.x), fixed2float(ppath->bbox.p.y), fixed2float(ppath->bbox.q.x), fixed2float(ppath->bbox.q.y), (ulong) ppath->box_last); dlprintf4(" %% segments=0x%lx (refct=%ld, first=0x%lx, current=0x%lx)\n", (ulong) ppath->segments, (long)ppath->segments->rc.ref_count, (ulong) ppath->segments->contents.subpath_first, (ulong) ppath->segments->contents.subpath_current); while (pseg) { dlputs(""); gx_print_segment(pseg); pseg = pseg->next; } }
int gs_begin_transparency_group(gs_state *pgs, const gs_transparency_group_params_t *ptgp, const gs_rect *pbbox) { gs_pdf14trans_params_t params = { 0 }; #ifdef DEBUG if (gs_debug_c('v')) { static const char *const cs_names[] = { GS_COLOR_SPACE_TYPE_NAMES }; dlprintf5("[v](0x%lx)begin_transparency_group [%g %g %g %g]\n", (ulong)pgs, pbbox->p.x, pbbox->p.y, pbbox->q.x, pbbox->q.y); if (ptgp->ColorSpace) dprintf1(" CS = %s", cs_names[(int)gs_color_space_get_index(ptgp->ColorSpace)]); else dputs(" (no CS)"); dprintf2(" Isolated = %d Knockout = %d\n", ptgp->Isolated, ptgp->Knockout); } #endif /* * Put parameters into a compositor parameter and then call the * create_compositor. This will pass the data to the PDF 1.4 * transparency device. */ params.pdf14_op = PDF14_BEGIN_TRANS_GROUP; params.Isolated = ptgp->Isolated; params.Knockout = ptgp->Knockout; params.image_with_SMask = ptgp->image_with_SMask; params.opacity = pgs->opacity; params.shape = pgs->shape; params.blend_mode = pgs->blend_mode; /* * We are currently doing nothing with the colorspace. Currently * the blending colorspace is based upon the processs color model * of the output device. */ params.bbox = *pbbox; return gs_state_update_pdf14trans(pgs, ¶ms); }
int gx_begin_transparency_group(gs_imager_state * pis, gx_device * pdev, const gs_pdf14trans_params_t * pparams) { gs_transparency_group_params_t tgp = {0}; gs_rect bbox; if (pparams->Background_components != 0 && pparams->Background_components != pdev->color_info.num_components) return_error(gs_error_rangecheck); tgp.Isolated = pparams->Isolated; tgp.Knockout = pparams->Knockout; tgp.idle = pparams->idle; tgp.mask_id = pparams->mask_id; pis->opacity.alpha = pparams->opacity.alpha; pis->shape.alpha = pparams->shape.alpha; pis->blend_mode = pparams->blend_mode; bbox = pparams->bbox; #ifdef DEBUG if (gs_debug_c('v')) { static const char *const cs_names[] = { GS_COLOR_SPACE_TYPE_NAMES }; dlprintf5("[v](0x%lx)gx_begin_transparency_group [%g %g %g %g]\n", (ulong)pis, bbox.p.x, bbox.p.y, bbox.q.x, bbox.q.y); if (tgp.ColorSpace) dprintf1(" CS = %s", cs_names[(int)gs_color_space_get_index(tgp.ColorSpace)]); else dputs(" (no CS)"); dprintf2(" Isolated = %d Knockout = %d\n", tgp.Isolated, tgp.Knockout); } #endif if (dev_proc(pdev, begin_transparency_group) != 0) return (*dev_proc(pdev, begin_transparency_group)) (pdev, &tgp, &bbox, pis, NULL, NULL); else return 0; }