/* the state setting code in pxink.c. */ void px_paint_rc_adjust(px_paint_t *ppt, int delta, gs_memory_t *mem) { if ( ppt->type == pxpPattern ) { /* * There is no public API for adjusting the reference count of a * gs_client_color, and even the private API requires having a * color space available. We'll need to fix this properly * sooner or later, but for the moment, fake it. */ gs_color_space cspace; /* * Even though this is a colored Pattern, and hence does have a * base space, we set has_base_space to false to prevent the * adjust_color_count procedure from trying to call the * adjustment procedures for the base space. */ cspace.type = &gs_color_space_type_Pattern; cspace.params.pattern.has_base_space = false; (*cspace.type->adjust_color_count)(&ppt->value.pattern.color, &cspace, delta); rc_adjust_only(ppt->value.pattern.pattern, delta, "px_paint_rc_adjust"); } }
static void gx_adjust_color_Pattern(const gs_client_color * pcc, const gs_color_space * pcs, int delta) { gs_pattern_instance_t *pinst = pcc->pattern; rc_adjust_only(pinst, delta, "gx_adjust_color_Pattern"); if (pcs && pcs->params.pattern.has_base_space) (pcs->base_space->type->adjust_color_count) (pcc, pcs->base_space, delta); }