summaryrefslogtreecommitdiff
path: root/base/gdevvec.h
Commit message (Collapse)AuthorAgeFilesLines
* Update postal address in file headersChris Liddell2023-04-041-3/+3
|
* Vector devices - fix compiler warningKen Sharp2021-05-291-1/+1
| | | | | | | | | | | | | Bug #703866 "./devices/vector/gdevpdfd.c:447: warning: ‘gdev_vector_dopath_segment’ accessing 24 bytes in a region of size 8 [-Wstringop-overflow=]" Benign warning. For the cases where we are passing a pointer to a single fixed point number the type of operation only consumes a single number. I'm not at all sure (and this code is > 20 years old) why the original author chose to define it as a pointer to an array of 3. This is very minor. However since we aim to keep compiler warnings to a minimum it is addressed in this commit by changing the function prototype.
* Move devices away from begin_image to begin_typed_image.Robin Watts2021-04-231-0/+11
|
* Update copyright to 2021Chris Liddell2021-03-151-1/+1
|
* Update copyright to 2020Chris Liddell2020-04-101-1/+1
|
* Move FILE * operations behind new gp_file * API.Robin Watts2019-05-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (squash of commits from filesec branch) Most of this commit is donkeywork conversions of calls from FILE * -> gp_file *, fwrite -> gp_fwrite etc. Pretty much every device is touched, along with the clist and parsing code. The more interesting changes are within gp.h (where the actual new API is defined), gpmisc.c (where the basic implementations live), and the platform specific levels (gp_mswin.c, gp_unifs.c etc where the platform specific implementations have been tweaked/renamed). File opening path validation All file opening routines now call a central routine for path validation. This then consults new entries in gs_lib_ctx to see if validation is enabled or not. If so, it validates the paths by seeing if they match. Simple C level functions for adding/removing/clearing paths, exposed through the gsapi level. Add 2 postscript operators for path control. <name> <string> .addcontrolpath - Add the given <string> (path) to the list of paths for controlset <name>, where <name> can be: /PermitFileReading /PermitFileWriting /PermitFileControl (Anything else -> rangecheck) - .activatepathcontrol - Enable path control. At this point PS cannot make any more changes, and all file access is checked.
* Update source/header file copyright notice to 2019Chris Liddell2019-01-161-1/+1
|
* Update copyright notice with new head office address.Ken Sharp2018-01-301-3/+3
| | | | | | | | | 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.
* Fix st_device_vector_max_ptrs.Robin Watts2017-11-151-1/+1
| | | | | | | | This should be +4, not +3, but this value appears to be pretty much unused, so nothing matters at the moment. It is used by st_device_psdf_max_ptrs, but nothing uses that either. We may remove both of these definitions in future.
* Make gs_imager_state == gs_state.Chris Liddell2016-06-061-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* pdfwrite - optimise rectangular subpaths as 're' where possibleKen Sharp2016-03-281-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current 'vector device' path code doesn't work properly with clips and doesn't optimise rectangular subpaths as rectangles. (For the purposes of 're' optimisation a rectangular subpath is a moveto, followed by 4 lineto's at right angles, followed by a closepath). This commit creates new code to handle pahts in pdfwrite, if the enumerator is a clip enumerator it correctly enumerates the subpaths from the clip instead of enumerating the path. We buffer up operations looking for rectangles; when we find one, if the current matrix is not sheared or skewed, then we check to see if the rectangle is 'x first'. If it isn't we move the starting point round by one as 're' always emits width first. We also check to see if we are doing a dashed stroke, as if we are we cannot move the initial vertex as this will cause the dash to be incorrect (abort the optimisation). We copy the code from gdevvec whcih checks to see if the whole path is a rectangle, and also the 'optimise' code whch will concatenate colinear moveto and lineto operations into a single operation. Finally we also preserve the heuristic that prevents a fill with a trailing moveto as ths apparently exposed a bug in old versions of Acrobat. Ths does result in a number of single pixel or single pixel wide differences in the test suite, but they all look like simple differences to me, not regressions. The new code doesn not appear to be singificantly slower and ths does produce a useful reduction in file size for some files.
* Commit of build_consolidation branchChris Liddell2015-07-201-0/+398
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.