diff options
author | Chris Liddell <chris.liddell@artifex.com> | 2016-02-24 12:50:47 +0000 |
---|---|---|
committer | Chris Liddell <chris.liddell@artifex.com> | 2016-06-06 15:25:53 +0100 |
commit | 45dcf097558e880a76f569dd8d6c678f6ed186ce (patch) | |
tree | a6053769310375ff63efd5e493e8562d410e0112 /contrib/lips4/gdevl4v.c | |
parent | 41d8d83a77ee6ea12109dde7b72dedc61cca01a3 (diff) | |
download | ghostpdl-45dcf097558e880a76f569dd8d6c678f6ed186ce.tar.gz |
Make gs_imager_state == gs_state.
Change how gstate initialisation is done:
Previously we relied on the imager state being a subset of the gstate (thus
assigning an imager state to a graphics state over wrote to the entries
common to both, and didn't overwrite any already set graphics state specific
entries).
Making the imager and graphics states the same means that approach doesn't work,
so this changes it to initialise the entries individually.
Renames gsistate.c->gsgstate.c and gxistate.h->gxgstate.h
Cleanup and fix the gs_state gc stuff.
Uses different check for pre/post clist pdf14 device
Previously, the code used "is_gstate" in the imager/graphics state object
to determine if the code was being called pre or post clist (post clist would
only ever have had an imager_state so is_gstate = false).
With no imager state any more, that test would no longer work (and I am dubious
about whether it was really safe, anyway). Other places check for the presence
of a clist reader device in the pdf14 device structure - so use that here
too.
Adds initial (NULL) value for show_gstate pointer in gs_state.
Removes the now pointless macro for the contents of the graphics state
Changes function names that had "imager" to use "gstate"
Removes the redundant 'is_state' flag
Cleans up gs_(g)state_putdeviceparams():
Previously we had to similar routines: one took a graphics state, and used the
device from the graphics state, the other took an imager state and the device
as an explicit parameter.
With the removal of the imager state, "merge" those two functions
Replaces gs_state with gs_gstate
It makes for less confusion as it really is a g(raphics)state
Diffstat (limited to 'contrib/lips4/gdevl4v.c')
-rw-r--r-- | contrib/lips4/gdevl4v.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/contrib/lips4/gdevl4v.c b/contrib/lips4/gdevl4v.c index fe556a377..47918b947 100644 --- a/contrib/lips4/gdevl4v.c +++ b/contrib/lips4/gdevl4v.c @@ -228,9 +228,9 @@ gx_device_lips4v far_data gs_lips4v_device = { /* Vector device implementation */ #if GS_VERSION_MAJOR >= 8 static int lips4v_beginpage(gx_device_vector * vdev); -static int lips4v_setfillcolor(gx_device_vector * vdev, const gs_imager_state * pis, +static int lips4v_setfillcolor(gx_device_vector * vdev, const gs_gstate * pgs, const gx_drawing_color * pdc); -static int lips4v_setstrokecolor(gx_device_vector * vdev, const gs_imager_state * pis, +static int lips4v_setstrokecolor(gx_device_vector * vdev, const gs_gstate * pgs, const gx_drawing_color * pdc); static int lips4v_setdash(gx_device_vector * vdev, const float *pattern, uint count, double offset); @@ -238,7 +238,7 @@ static int lips4v_setflat(gx_device_vector * vdev, double flatness); static int lips4v_setlogop(gx_device_vector * vdev, gs_logical_operation_t lop, gs_logical_operation_t diff); -static int lips4v_can_handle_hl_color(gx_device_vector * vdev, const gs_imager_state * pis, +static int lips4v_can_handle_hl_color(gx_device_vector * vdev, const gs_gstate * pgs, const gx_drawing_color * pdc); static int @@ -1080,7 +1080,7 @@ lips4v_setmiterlimit(gx_device_vector * vdev, double limit) #if GS_VERSION_MAJOR >= 8 static int -lips4v_setfillcolor(gx_device_vector * vdev, const gs_imager_state * pis, const gx_drawing_color * pdc) +lips4v_setfillcolor(gx_device_vector * vdev, const gs_gstate * pgs, const gx_drawing_color * pdc) #else static int lips4v_setfillcolor(gx_device_vector * vdev, const gx_drawing_color * pdc) @@ -1148,7 +1148,7 @@ lips4v_setfillcolor(gx_device_vector * vdev, const gx_drawing_color * pdc) #if GS_VERSION_MAJOR >= 8 static int -lips4v_setstrokecolor(gx_device_vector * vdev, const gs_imager_state * pis, const gx_drawing_color * pdc) +lips4v_setstrokecolor(gx_device_vector * vdev, const gs_gstate * pgs, const gx_drawing_color * pdc) #else static int lips4v_setstrokecolor(gx_device_vector * vdev, const gx_drawing_color * pdc) @@ -1291,7 +1291,7 @@ lips4v_setlogop(gx_device_vector * vdev, gs_logical_operation_t lop, #if GS_VERSION_MAJOR >= 8 /*--- added for Ghostscritp 8.15 ---*/ static int -lips4v_can_handle_hl_color(gx_device_vector * vdev, const gs_imager_state * pis1, +lips4v_can_handle_hl_color(gx_device_vector * vdev, const gs_gstate * pgs1, const gx_drawing_color * pdc) { return false; /* High level color is not implemented yet. */ @@ -2203,7 +2203,7 @@ static const gx_image_enum_procs_t lips4v_image_enum_procs = { /* Start processing an image. */ static int lips4v_begin_image(gx_device * dev, - const gs_imager_state * pis, const gs_image_t * pim, + const gs_gstate * pgs, const gs_image_t * pim, gs_image_format_t format, const gs_int_rect * prect, const gx_drawing_color * pdcolor, const gx_clip_path * pcpath, gs_memory_t * mem, @@ -2227,7 +2227,7 @@ lips4v_begin_image(gx_device * dev, if (pie == 0) return_error(gs_error_VMerror); pie->memory = mem; - code = gdev_vector_begin_image(vdev, pis, pim, format, prect, + code = gdev_vector_begin_image(vdev, pgs, pim, format, prect, pdcolor, pcpath, mem, &lips4v_image_enum_procs, pie); if (code < 0) @@ -2267,7 +2267,7 @@ lips4v_begin_image(gx_device * dev, } } if (!can_do) - return gx_default_begin_image(dev, pis, pim, format, prect, + return gx_default_begin_image(dev, pgs, pim, format, prect, pdcolor, pcpath, mem, &pie->default_info); else if (index == gs_color_space_index_DeviceGray) { @@ -2302,7 +2302,7 @@ lips4v_begin_image(gx_device * dev, pdev->TextMode = FALSE; } gs_matrix_invert(&pim->ImageMatrix, &imat); - gs_matrix_multiply(&imat, &ctm_only(pis), &imat); + gs_matrix_multiply(&imat, &ctm_only(pgs), &imat); /* [xx xy yx yy tx ty] LIPS の座標系に変換を行なう。 |