| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Until recently, if we were asked to stroke a pattern we would
perform the stroke, and then for each segment of the stroke
do the fill with the pattern. This meant that we decomposed
shadings many times.
As an optimisation, we tried to perform the same trick as used
by the fill code; namely to perform a single rectangle fill, and
to clip that. That way the decomposition only happens once.
Unfortunately the mechanism we used to do that had problems. We
convert the stroke to a path to be filled and then called the
'fill with a pattern' code on that. The conversion of the stroke
to a path to be filled would be slightly different in many cases,
and in particular prevents the 'thin_line' code ever being
triggered. This produces nasty thickening of strokes.
So, we recode the optimisation here. We use a clip path accumulator
device, and stroke to that. That gives us an exact match. We
then fill that.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PostScript 'sethalftone' has an optional parameter "ObjectType" that allows
one of the three object specific types to be set: Vector, Image or Text.
Also add a new PostScript operator to set the current halftone (dev_ht,
set by sethalftone) as the device halftone to be used for an object type:
path, image and text.
For non-PostScript clients, the gs_halftone structure adds a 'objtype'
element (enum) that can be set prior to calling gs_sethalftone.
The gs_gstate_s dev_ht is now an array of HT_OBJTYPE_COUNT elements,
indexed by the gs_HT_objtype_t enum, with HT_OBJTYPE_DEFAULT (value 0)
used for prior sethalftone/setscreen/setcolorscreen operations.
NOTE: adding object types beyond the default+3 entries will require modification
of gx_select_dev_ht since it only uses 3 bits of the 'tag' to get the index
for the dev_ht[] array.
For code style, change to use != NULL instead of != 0 in most places that
this commit touched (but we may want a general cleanup of this everywhere).
TBD: Command line options for all PDL's will need a method to take a
halftone specification -- most likely a file that may be "PS-lite" syntax
and may be limited to a threshold array. Discussions are in progress.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This branch had several contributors including Robin Watts,
Ken Sharp and Ray Johnston.
The intent was to add a "fill and stroke" path device method
to ensure we get proper rendering when doing fill/stroke
methods with overprint and transparency. In addition,
adding the method made it possible for pdfwrite to match
the original pdf source file if it also had fill/stroke methods.
The interaction with overprint and transparency led to significant
changes in parts of the code related to those sections. In particular,
overprint was reworked to ensure that the overprint compositor and
the transparency compositor were aware if it was to be using
the overprint drawn_comps for stroke or for fill. The code was
rewritten so that the overprint compositor actions only occurred when
an actual operation occurred (e.g. fill, stroke, image, text) as opposed
to every time that the overprint graphic state values changed.
When there is a fill-stroke operation with transparency, depending upon the
graphic state values, a non-isolated knockout group may be pushed. From this,
an issue with knockout groups within knockout groups was revealed, which was
related to the backdrop selection. The backdrop selection code was simplified.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug #700141 "Type confusion in setpattern"
As the bug thread says, we were not checking that the Implementation
of a pattern dictionary was a structure type, leading to a crash when
we tried to treat it as one.
Here we make the st_pattern1_instance and st_pattern2_instance
structures public definitions and in zsetcolor we check the object
stored under the Implementation key in the supplied dictionary to see if
its a t_struct or t_astruct type, and if it is that its a
st_pattern1_instance or st_pattern2_instance structure.
If either check fails we throw a typecheck error.
We need to make the st_pattern1_instance and st_pattern2_instance
definitions public as they are defined in the graphics library and we
need to check in the interpreter.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gdevkrnlsclass.c Change a while...do into a do...while to see if it
pacifies a 'dereference of NULL pointer' in scanbuild
gsparamx.c Incorrect return code could lead to an earlier error not
being preserved. Fortunately this is currently only called by claptrap.
gsptype1.c remove unnecessary assignments
gssprintf.c " " "
gstype2.c " " "
gstype42.c " " "
gxfill.c " " "
gsptype2.c rejig the code to avoid setting a return code that isn't used.
Add a check on a return code that was missing.
gxchar.c add return code checking
gxcmap.c " " " "
|
|
|
|
|
|
|
|
|
| |
Also update copyright dates.
Remove gs_cmdl.ps as we no longer use it, and remove its entry from
psfiles.htm.
Remove xfonts.htm as this feature (xfont support) is long, long gone.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
There are locations in the code where Coverity has complained about
code logic that resulted in passing of unintialized values that
could only occur if num_components < 0 . Since this should never
be the case, we will make it clear by setting num_components and
max_components to uchar. This will limit our support to 256 colors
by a device.
|
|
Squashed into one commit (see branch for details of the evolution of the
branch).
This brings gpcl6 and gxps into the Ghostscript build system, and a shared
set of graphics library object files for all the interpreters.
Also, brings the same configuration options to the pcl and xps products as we
have for Ghostscript.
|