if (gstate->pattern) cairo_pattern_destroy (gstate->pattern);
cairo_pattern_reference (pattern); cairo_pattern_destroy (gstate->pattern);
_cairo_gstate_set_pattern (cairo_gstate_t *gstate, cairo_pattern_t *pattern){    if (pattern == NULL)	return CAIRO_STATUS_NULL_POINTER;    if (gstate->pattern)	cairo_pattern_destroy (gstate->pattern);        gstate->pattern = pattern;    cairo_pattern_reference (pattern);        return CAIRO_STATUS_SUCCESS;}