/* * Push a PDF 1.4 transparency compositor onto the current device. Note that * if the current device already is a PDF 1.4 transparency compositor, the * create_compositor will update its parameters but not create a new * compositor device. */ static int gs_state_update_pdf14trans(gs_state * pgs, gs_pdf14trans_params_t * pparams) { gs_imager_state * pis = (gs_imager_state *)pgs; gx_device * dev = pgs->device; gx_device *pdf14dev = NULL; int code; int curr_num = dev->color_info.num_components; /* * Send the PDF 1.4 create compositor action specified by the parameters. */ code = send_pdf14trans(pis, dev, &pdf14dev, pparams, pgs->memory); if (code < 0) return code; /* * If we created a new PDF 1.4 compositor device then we need to install it * into the graphics state. */ if (pdf14dev != dev) { gx_set_device_only(pgs, pdf14dev); } /* If we had a color space change and we are in overprint, then we need to update the drawn_comps */ if (pgs->overprint && curr_num != pdf14dev->color_info.num_components) { code = gs_do_set_overprint(pgs); } return code; }
/* * Push a PDF 1.4 transparency compositor onto the current device. Note that * if the current device already is a PDF 1.4 transparency compositor, the * create_compositor will update its parameters but not create a new * compositor device. */ static int gs_state_update_pdf14trans(gs_state * pgs, gs_pdf14trans_params_t * pparams) { gs_imager_state * pis = (gs_imager_state *)pgs; gx_device * dev = pgs->device; gx_device *pdf14dev = NULL; int code; /* * Send the PDF 1.4 create compositor action specified by the parameters. */ code = send_pdf14trans(pis, dev, &pdf14dev, pparams, pgs->memory); /* * If we created a new PDF 1.4 compositor device then we need to install it * into the graphics state. */ if (code >= 0 && pdf14dev != dev) gx_set_device_only(pgs, pdf14dev); return code; }