~ubuntu-branches/ubuntu/oneiric/ghostscript/oneiric

« back to all changes in this revision

Viewing changes to base/gsistate.c

  • Committer: Bazaar Package Importer
  • Author(s): Till Kamppeter
  • Date: 2011-07-15 16:49:55 UTC
  • mfrom: (1.1.23 upstream)
  • Revision ID: james.westby@ubuntu.com-20110715164955-uga6qibao6kez05c
Tags: 9.04~dfsg~20110715-0ubuntu1
* New upstream release
   - GIT snapshot from Jult, 12 2011.
* debian/patches/020110406~a54df2d.patch,
  debian/patches/020110408~0791cc8.patch,
  debian/patches/020110408~507cbee.patch,
  debian/patches/020110411~4509a49.patch,
  debian/patches/020110412~78bb9a6.patch,
  debian/patches/020110418~a05ab8a.patch,
  debian/patches/020110420~20b6c78.patch,
  debian/patches/020110420~4ddefa2.patch: Removed upstream patches.
* debian/rules: Generate ABI version number (variable "abi") correctly,
  cutting off repackaging and pre-release parts.
* debian/rules: Added ./lcms2/ directory to DEB_UPSTREAM_REPACKAGE_EXCLUDES.
* debian/copyright: Added lcms2/* to the list of excluded files.
* debian/symbols.common: Updated for new upstream source. Applied patch
  which dpkg-gensymbols generated for debian/libgs9.symbols to this file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
   San Rafael, CA  94903, U.S.A., +1(415)492-9861, for further information.
12
12
*/
13
13
 
14
 
/* $Id: gsistate.c 11548 2010-07-28 18:44:46Z robin $ */
 
14
/* $Id$ */
15
15
/* Imager state housekeeping */
16
16
#include "gx.h"
17
17
#include "gserrors.h"
44
44
static
45
45
ENUM_PTRS_WITH(line_params_enum_ptrs, gx_line_params *plp) return 0;
46
46
    case 0: return ENUM_OBJ((plp->dash.pattern_size == 0 ?
47
 
                             NULL : plp->dash.pattern));
 
47
                             NULL : plp->dash.pattern));
48
48
ENUM_PTRS_END
49
49
static RELOC_PTRS_WITH(line_params_reloc_ptrs, gx_line_params *plp)
50
50
{
51
51
    if (plp->dash.pattern_size)
52
 
        RELOC_VAR(plp->dash.pattern);
 
52
        RELOC_VAR(plp->dash.pattern);
53
53
} RELOC_PTRS_END
54
54
private_st_line_params();
55
55
 
94
94
    }
95
95
} RELOC_PTRS_END
96
96
 
97
 
 
98
97
/* Initialize an imager state, other than the parts covered by */
99
98
/* gs_imager_state_initial. */
100
99
int
108
107
    /* Color rendering state */
109
108
    pis->halftone = 0;
110
109
    {
111
 
        int i;
 
110
        int i;
112
111
 
113
 
        for (i = 0; i < gs_color_select_count; ++i)
114
 
            pis->screen_phase[i].x = pis->screen_phase[i].y = 0;
 
112
        for (i = 0; i < gs_color_select_count; ++i)
 
113
            pis->screen_phase[i].x = pis->screen_phase[i].y = 0;
115
114
    }
116
115
    pis->dev_ht = 0;
117
116
    pis->cie_render = 0;
120
119
    pis->undercolor_removal = 0;
121
120
    /* Allocate an initial transfer map. */
122
121
    rc_alloc_struct_n(pis->set_transfer.gray,
123
 
                      gx_transfer_map, &st_transfer_map,
124
 
                      mem, return_error(gs_error_VMerror),
125
 
                      "gs_imager_state_init(transfer)", 1);
 
122
                      gx_transfer_map, &st_transfer_map,
 
123
                      mem, return_error(gs_error_VMerror),
 
124
                      "gs_imager_state_init(transfer)", 1);
126
125
    pis->set_transfer.gray->proc = gs_identity_transfer;
127
126
    pis->set_transfer.gray->id = gs_next_ids(pis->memory, 1);
128
127
    pis->set_transfer.gray->values[0] = frac_0;
129
128
    pis->set_transfer.red =
130
 
        pis->set_transfer.green =
131
 
        pis->set_transfer.blue = NULL;
 
129
        pis->set_transfer.green =
 
130
        pis->set_transfer.blue = NULL;
132
131
    for (i = 0; i < GX_DEVICE_COLOR_MAX_COMPONENTS; i++)
133
 
        pis->effective_transfer[i] = pis->set_transfer.gray;
 
132
        pis->effective_transfer[i] = pis->set_transfer.gray;
134
133
    pis->cie_joint_caches = NULL;
135
134
    pis->cie_joint_caches_alt = NULL;
136
135
    pis->cmap_procs = cmap_procs_default;
153
152
gs_imager_state_copy(const gs_imager_state * pis, gs_memory_t * mem)
154
153
{
155
154
    gs_imager_state *pis_copy =
156
 
        gs_alloc_struct(mem, gs_imager_state, &st_imager_state,
157
 
                        "gs_imager_state_copy");
 
155
        gs_alloc_struct(mem, gs_imager_state, &st_imager_state,
 
156
                        "gs_imager_state_copy");
158
157
 
159
158
    if (pis_copy) {
160
 
        *pis_copy = *pis;
161
 
        pis_copy->transparency_stack = 0;
 
159
        *pis_copy = *pis;
 
160
        pis_copy->transparency_stack = 0;
162
161
    }
163
162
    return pis_copy;
164
163
}
236
235
     * dependent structures as well.
237
236
     */
238
237
    if (pdht != 0 && pdht->rc.ref_count == 1) {
239
 
        gx_device_halftone_release(pdht, pdht->rc.memory);
 
238
        gx_device_halftone_release(pdht, pdht->rc.memory);
240
239
    }
241
240
    RCDECR(dev_ht);
242
241
    RCDECR(halftone);