summaryrefslogtreecommitdiff
path: root/xps/xpspath.c
Commit message (Collapse)AuthorAgeFilesLines
* Update postal address in file headersChris Liddell2023-04-041-2/+2
|
* Bug 706120 XPS dash buffer overrunMichael Vrhel2023-01-101-3/+35
| | | | | Avoid overrun of fixed sized array by doing dynamic allocation and reallocating when needed.
* Update copyright to 2021Chris Liddell2021-03-151-1/+1
|
* Bug 703404: XPS to pdfwrite patternsMichael Vrhel2021-02-171-0/+4
| | | | | | | | | | | | | | | | Patterns that are filled with glyphs and then subsequently filled with another pattern (Visual brush in XPS) was not working when going to pdfwrite due to the fact that gs_text_begin gets called by the XPS interpreter before we have finished the pattern fill of the glyph. This ends up referencing the pattern that is not done which ends badly for high level patterns. Instead if we are already in a high level pattern, set the color to just a gray. Then after the gs_text_begin, the XPS interpreter sets the brush to the visual brush which is subsequently collected. Fixing this, has revealed another XPS to PDF bug where we are not doing shading fills of glyphs correctly (at least when dealing with patterns).
* Update copyright to 2020Chris Liddell2020-04-101-1/+1
|
* Squashed commit of the opacity_shape branchMichael Vrhel2020-03-271-1/+1
| | | | | | | | | | | | | | | | | This commit removes shape.alpha and opacity.alpha from the graphic state. This involved removal of methods in the postscript based PDF interpreter, changes in the pdf14 device, changes in pdfwrite, the XPS interpreter, and the PS transparency test file that is present in examples and on the cluster. The goal of this commit was to avoid confusion and conflicts between shape.alpha opacity.alpha and the stroke and fill alpha values (CA ca). This change resulted in progressions in the XPS file. There were changes in a couple PDF files that required some investigation. In particular, the change in the dashed lines of Bug694981.pdf. Robin and I looked at this. Robin determined it was due to differences in stroke_add and stroke_fill not giving identical results. In the end, the new output looks closer the what AR provides.
* Reference count image colorspaces in XPS.Robin Watts2019-07-091-1/+6
| | | | This avoids leaks.
* Update source/header file copyright notice to 2019Chris Liddell2019-01-161-1/+1
|
* xps: Remove needless NULL terminator when parsing abbreviated geometry.Tor Andersson2018-03-291-3/+2
|
* 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 buffer overrun in xpspath.cRobin Watts2017-05-181-1/+1
| | | | | | | | | | Seen with tests_private/xps/sumatra/buffer_overflow_in_path_handling.xps Specifically: bin/gxps -sOutputFile=out.pdf -sDEVICE=pdfwrite -r72 -Z: -dNOPAUSE -dBATCH -dClusterJob tests_private/xps/sumatra/buffer_overflow_in_path_handling.xps
* Squash warnings: XPS MSVCRobin Watts2016-01-041-3/+3
| | | | | | | | Add some casts etc to squash (most of) the warnings seen in an MSVC debug build of ghostxps. We have an unavoidable "cast away of const" in a devspecop call, and various stupidities in the jpegxr lib left over.
* xps: Fix warnings.Tor Andersson2015-11-241-1/+0
|
* xps: Multiply alpha from opacity attribute with alpha from color attribute.Tor Andersson2015-11-241-2/+2
|
* xps: Avoid generating unnecessary linetos for arcs.Tor Andersson2015-11-241-10/+5
|
* xps: Add special case handling of zero-length dash patterns.Tor Andersson2015-11-241-0/+10
|
* xps: Fix uninitialized value.Tor Andersson2015-11-241-1/+1
|
* xps: Various arithmetic and uninitialized value fixes.Tor Andersson2015-11-241-1/+1
|
* xps: Fix buffer overflow in xps_parse_color.Tor Andersson2015-11-121-1/+1
|
* Fix segfault with ppmraw -r300 from fts_06_0626.pdf.xpse when allocation failsRay Johnston2015-01-031-0/+4
| | | | | | | The gxps had numerous places where allocation failures were ignored, writing to RAM at offsets from 0 (NULL). This no longer fails, but the fixes are not yet complete. Running a memento build with the parameters: MEMENTO_SQUEEZEAT=1 gxps -o /dev/null -sDEVICE=ppmraw in.xps
* xps: Remove trailing whitespace.Tor Andersson2014-07-221-9/+8
|
* xps interpreter - correct high level pattern handlingKen Sharp2013-10-111-4/+6
| | | | | | | | | | A silly error was causing fills to be applied twice. For opaque fills this is merely a performance penalty but for transparent fills the result is incorrect. Thanks to Phil McSharry for identifying the problem and supplying a solution. This shows progressions in a number of test files.
* xps: Check for number of arguments when parsing abbreviated paths.Tor Andersson2013-08-291-106/+157
| | | | Thanks to Shailesh Mistry.
* xps: Avoid infinite loop on syntax errors in abbreviated path geometry.Tor Andersson2013-08-291-0/+2
| | | | Thanks to Shailesh Mistry.
* Introduce GS_THREADSAFE define and modify printing calls.Robin Watts2012-09-181-14/+14
| | | | | | | | | | | | | | | | | | | | Lots of debugging/error information is printed using eprintf and dlprintf etc. These functions do not take a gs_memory_t * and are not safe for use within code that runs under multiple instances created by gsapi. Introduce new versions (dmprintf, dmlprintf etc) that DO take a gs_memory_ *, and move as much of ghostscript/ghostpdl's usage over to these as possible. I have not touched the contrib directory, and some locations in the code do not easily have a gs_memory_t to hand, so I have left them be. If the GS_THREADSAFE define is made during building, then the functions that don't take an explicit memory handle are #defined away to nothing. If the GS_THREADSAFE define is made, we disable the gsapi check that checks for a single init.
* Fix for mistake in commit 951adcd6 . which was the xps transparency fixMichael Vrhel2012-07-091-0/+3
| | | | Fixes the reopening of bug 693042
* Fix in XPS interpreter to ensures we only push the smallest transparency ↵Michael Vrhel2012-07-051-17/+56
| | | | | | | | | | group needed + more For a path that included an opacity mask, the XPS interpreter was pushing a soft mask that included the entire page (it actually just looked at the current clip path). This fix incorporates the path that we are filling in the computation of the transparency group size. Also, there were issues with the softmasks in general that were causing them to be double applied. Fixes 693042 and also provides improvements for 690951. Also this should fix 693137 and 692892
* Update copyright "headers".Chris Liddell2012-06-131-6/+9
| | | | | | | | | | | | | | | | | | As agreed on IRC and via e-mail: Reinstate the reference to the LICENSE file. Remove copyright references to Aladdin Enterprises and artofcode (some references remain in comments about historical copyright assignments, and the like), in favour of Artifex copyright notices. Update copyright dates. Remove the $Id$ "tag". Since the move to git, the $Id$ "tag" comment in each file is redundant. No cluster differences.
* XPS Whitespace handling fixRobin Watts2012-01-261-9/+5
| | | | | | | | | | | | | Update the xps point reading code to use strtod rather than atof; this returns us an updated string pointer, rather than relying on us second-guessing where it may end up. Change xps_get_point to return this updated pointer, and change some calls of this to avoid having to skip whitespace (and potentially getting it wrong) after the call. Spotted as part of the commit to take the latest XPS changes into MuPDF.
* Squash warnings in MSVC build.Robin Watts2011-11-101-1/+1
| | | | All self evident, really. Lots of char's that should be bytes etc.
* Fix for Bug 692510 white space XPS interpreter fixMichael Vrhel2011-10-191-11/+47
| | | | | | XPS interpreter was not very robust in its handling of white space in many locations. I created a general function to handle this in place of the many uses of sscanf in the interpreter.
* Fix for Bug 692509. Issues with parsing of dashed line attributes.Michael Vrhel2011-10-191-1/+2
| | | | | Problem was caused by a space preceding the ending quote, which gave the dashed line lengths.
* Use gx_effective_clip_path to get the current visible area instead of ↵Tor Andersson2010-06-301-164/+12
| | | | | | manually maintaining the bounds while parsing. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11466 a1074d23-0009-0410-80fe-cf8c14f379e6
* Balance transparency group and gsave/grestore calls when returning with errors.Tor Andersson2010-06-301-3/+12
| | | | git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11465 a1074d23-0009-0410-80fe-cf8c14f379e6
* revert back to 11450.Henry Stiles2010-06-291-12/+3
| | | | git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11462 a1074d23-0009-0410-80fe-cf8c14f379e6
* Balance transparency group and gsave/grestore calls when returning with errors.Tor Andersson2010-06-291-3/+12
| | | | git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11459 a1074d23-0009-0410-80fe-cf8c14f379e6
* Add error propagation in a few more places.Tor Andersson2010-06-231-2/+2
| | | | git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11423 a1074d23-0009-0410-80fe-cf8c14f379e6
* Whitespace and indentation fixes.Tor Andersson2010-06-221-4/+3
| | | | git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11419 a1074d23-0009-0410-80fe-cf8c14f379e6
* Add error propagation where it is missing, and remove error returns where ↵Tor Andersson2010-06-221-39/+38
| | | | | | they are not used. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11417 a1074d23-0009-0410-80fe-cf8c14f379e6
* Enhancement to XPS interpreter - add high level pattern supportKen Sharp2010-06-211-4/+10
| | | | | | | | | | | | | | High level devices (pdfwrite basically) prefer to receive patterns as high level, rather than pattern tiles as this is more compact. This patch checks the device capabilities and if it can support high level patterns we emit those rather than tiles. This is done by returning gs_error_Remap_Color from the 'remap' procedure and then controlling the device's pattern accumulator. Many files work better (converting to PDF) with this approach, though there are still some problems. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11409 a1074d23-0009-0410-80fe-cf8c14f379e6
* Fix indentation error.Tor Andersson2010-05-281-1/+1
| | | | git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11337 a1074d23-0009-0410-80fe-cf8c14f379e6
* Run "git stripspace" over the GhostXPS source to remove trailingTor Andersson2010-04-221-3/+0
| | | | | | whitespace and duplicate blank lines. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11104 a1074d23-0009-0410-80fe-cf8c14f379e6
* Update GhostXPS copyright blobs for year 2010.Tor Andersson2010-04-201-1/+1
| | | | git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11091 a1074d23-0009-0410-80fe-cf8c14f379e6
* Reformat GhostXPS source to use 4 spaces for indentation rather than a mix ↵Tor Andersson2010-04-201-460/+460
| | | | | | of tabs and spaces. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11090 a1074d23-0009-0410-80fe-cf8c14f379e6
* Use a tighter bounding box when creating transparencyTor Andersson2010-02-161-35/+36
| | | | | | | | | groups used to draw paths with opacity or opacity masks. There are some minor single-pixel color differences in the rendering of some gradients. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@10753 a1074d23-0009-0410-80fe-cf8c14f379e6
* Fix some leaks in XPS. Make sure we call close_job at the end of an XPS file ↵Tor Andersson2010-01-211-0/+2
| | | | | | and free the zip_table and xps fonts at dnit time. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@10627 a1074d23-0009-0410-80fe-cf8c14f379e6
* Add support for the new start/end/dash caps in the XPS parser.Tor Andersson2009-12-041-13/+16
| | | | git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@10448 a1074d23-0009-0410-80fe-cf8c14f379e6
* Fix for bug 690890. We always use the CPSI_mode version of the gs_strokepathRobin Watts2009-11-061-1/+1
| | | | | | | | | | | code (when executing strokepath or ustrokepath postscript operators). This means we better match acrobat. This frees us to optimise the non CPSI_mode version so as to produce simpler stroked paths with the same outlines. This should allow us to be faster in the non strokepath cases. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@10291 a1074d23-0009-0410-80fe-cf8c14f379e6
* Implement a random file access mode for the XPS parser that uses less memory.Tor Andersson2009-10-291-0/+2
| | | | | | | | | | | To enable this mode, set the XPS_ZIP_SEEK environment variable which will cause the interpreter to spool the data to a temp file and then run the parser in the new mode. This is going to change in a later patch to plmain that will enable the interpreters to directly access the job files. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@10243 a1074d23-0009-0410-80fe-cf8c14f379e6
* Remove some unused variables.Ralph Giles2009-10-201-3/+2
| | | | | | | | Also, make xps_debug_bounds() static, converting the missing prototype warning into another ununsed function warning. xps_debug_bounds() could be exported; I don't know what the best policy choice is here. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@10187 a1074d23-0009-0410-80fe-cf8c14f379e6