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 /base/gsimage.h | |
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 'base/gsimage.h')
-rw-r--r-- | base/gsimage.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/base/gsimage.h b/base/gsimage.h index 65d74e256..716e7ef08 100644 --- a/base/gsimage.h +++ b/base/gsimage.h @@ -119,7 +119,7 @@ typedef struct gx_image_enum_common_s gx_image_enum_common_t; #endif typedef struct gs_image_enum_s gs_image_enum; -int gs_image_begin_typed(const gs_image_common_t * pic, gs_state * pgs, +int gs_image_begin_typed(const gs_image_common_t * pic, gs_gstate * pgs, bool uses_color, gx_image_enum_common_t ** ppie); gs_image_enum *gs_image_enum_alloc(gs_memory_t *, client_name_t); @@ -145,14 +145,14 @@ int gs_image_common_init(gs_image_enum * penum, /* Initialize an enumerator for an ImageType 1 image. */ int gs_image_init(gs_image_enum * penum, const gs_image_t * pim, - bool MultipleDataSources, gs_state * pgs); + bool MultipleDataSources, gs_gstate * pgs); /* Initialize an enumerator for a general image. penum->memory must be initialized in advance. */ int gs_image_enum_init(gs_image_enum * penum, gx_image_enum_common_t * pie, - const gs_data_image_t * pim, gs_state *pgs); + const gs_data_image_t * pim, gs_gstate *pgs); /* * Return the number of bytes of data per row @@ -196,9 +196,9 @@ int gs_image_next(gs_image_enum * penum, const byte * dbytes, uint dsize, uint * pused); /* Clean up after processing an image. */ -int gs_image_cleanup(gs_image_enum * penum, gs_state *pgs); +int gs_image_cleanup(gs_image_enum * penum, gs_gstate *pgs); /* Clean up after processing an image and free the enumerator. */ -int gs_image_cleanup_and_free_enum(gs_image_enum * penum, gs_state *pgs); +int gs_image_cleanup_and_free_enum(gs_image_enum * penum, gs_gstate *pgs); #endif /* gsimage_INCLUDED */ |