summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-01-12Update copyright notices for 2012.Tor Andersson
2012-01-12Check the abort cookie in XPS.Tor Andersson
2012-01-12Fix memory leak in font->bbox_table.Tor Andersson
2012-01-12Use the same coordinate system for pdf and xps pages in the interface.Tor Andersson
Move coordinate space tweaks into pdf_ and xps_run_page, and provide neutral pdf_ and xps_bound_page functions to return the page size as a zero-origined bounding box.
2012-01-12Fix android for previous glyph cache changes.Tor Andersson
2012-01-11Add xps_run_page function.Tor Andersson
2012-01-11Flush warnings before printing an error message in fz_throw.Tor Andersson
2012-01-11Use enum for FZ_STORE_DEFAULT default size.Tor Andersson
2012-01-11Hide glyph cache in context.Tor Andersson
2012-01-11Set default values for alloc context and max store size if none are given.Sebastian Rasmussen
2012-01-11Do not unnecessarily use O_BINARY in X11 viewer.Sebastian Rasmussen
2012-01-11Stylistic comment and whitespace fixes.Tor Andersson
2012-01-11Add glyph bbox cache.Tor Andersson
2012-01-11Calculate accurate per-glyph bounding boxes for fz_bound_text.Tor Andersson
2012-01-11Remove fuzzing from fz_round_rect.Tor Andersson
I don't remember exactly why I added it; but there are several progressions when I remove it.
2012-01-10Make debian package files work.Sebastian Rasmussen
2012-01-10Automatically load page tree when accessing a page/page count.Sebastian Rasmussen
2012-01-10Move fuzz from fz_execute_display_list into fz_bound_text.Robin Watts
Keep the fuzz in just one place. Hopefully will be rendered unnecessary by changes to make fz_bound_text accurate.
2012-01-10Add fz_blend_pixel_function.Robin Watts
Inspired by Sumatras gdi devices need for such a function expose the blending functions. Note that we produce unsigned char's where Zenikos original produces ints, but it's otherwise identical. This requires us to make various knockon changes throughout the code from int to unsigned char, none of which should make any difference at all - I hope! We reserve the right to change/amend this function in future to operate on blocks of pixels (or pixels in different colorspaces) (or anything else we think of) in future.
2012-01-10Fix many spelling errors.Sebastian Rasmussen
2012-01-09Update fz_try/fz_catch to be fz_try/{fz_always}/fz_catch.Robin Watts
Add explanations of how to use the macros in fitz.h. Also included are 2 different formulations, with different strengths/ weaknesses for reference. Will remove these shortly, but I want a reference to them in git. Workaround bug in Mac OS Lion gcc (clang works fine).
2012-01-09Fix Android logging bug; cut and paste error.Robin Watts
Thanks to Zeniko for pointing this out.
2012-01-09Fix Bug 692356 (comment #2)Robin Watts
Take on a modified version of Zenikos patch; only take the quick exit if the whole dash length is small, or if the dash_length scaled up by the maximum possible scale in the ctm is less than 1/2 a pixel.
2012-01-09Add fz_try/fz_catch to xpsdrawRobin Watts
Avoid unhandled exceptions. Thanks to Zeniko for this.
2012-01-09Fix bug where pdf function was used after being dropped.Sebastian Rasmussen
2012-01-07Empty object store when freeing xref.Sebastian Rasmussen
Fixes a bug where objects remained in the store and would keep stable pointers to the freed xref, later on those objects could lead to false positive hits.
2012-01-07Fix compilation warningsSebastian Rasmussen
Add missing newline and remove excessive arguments.
2012-01-06Android tweaks.Robin Watts
Include android headers in fitz.h so we can debug. Arrange for error throwing to output to android error stream as well as stderr. Change jpeg library to not use backing store. Solves bug 692473.
2012-01-06XPS tweaks/fixes.Robin Watts
xps_parse_resource_dictionary can now warn and return NULL when reading an empty dictionary, rather than throwing an error. Various bits of code are therefore updated to check for a NULL return value. We should cope better with multiple Resource dictionaries. Tweak to the zip file handling when looking for parts. Again, all from (or inspired by) Zenikos patch.
2012-01-06PDF fixes/tweaks.Robin Watts
Fix 2 places where we were filling a stroked pattern rather than stroking it. Cope with being asked to run a NULL buffer. If running a stream fails, warn and return what we have, rather than giving up entirely. Should really set a return code for each render. Only look at the Print flag bit for Print renders. Only look at the View flag bit for view renders. If we find an unexpected ) or > during object parsing, warn and continue rather than giving up entirely. If optional content groups are broken, render the rest of the page anyway. Previously indirect objects that point to another indirection would cause a failure; now attempt to resolve these. We set an arbitrary limit of 10 such redirections to avoid infinite loops.
2012-01-06Various fixes to avoid arithmetic problems.Robin Watts
Various fixes to avoid overflow problems, division by zeros, use of uninitialised variables etc. All from/suggested by Zenikos patch.
2012-01-06pdf_repair tweaks; fail in fewer cases.Robin Watts
When repairing, if we hit a problem after having found a root object live with that root object rather than giving up completely. Also fix a memory leak, and cope better with trailing crap. Thanks to Zeniko for these.
2012-01-06Catch errors with impossibly wide images.Robin Watts
Thanks to Zeniko for pointing this out.
2012-01-06Clamp pixel values after applying Decode array to images.Robin Watts
Thanks to Zeniko for pointing this out.
2012-01-06Ignore decode arrays for indexed jpx images.Robin Watts
We can't do them properly at the moment, so don't try to do them at all - only makes stuff worse for now. Thanks to Zeniko for this.
2012-01-06Fix xps tiff context problem.Robin Watts
Exactly parallel to the png problem fixed a few days ago. Thanks to Zeniko for pointing this out.
2012-01-06Various memory leak fixes.Robin Watts
In error cases, ensure we free objects correctly. Thanks to Zeniko for finding the problems (and many of the solutions!)
2012-01-06Add 'marking' functions for dictionaries.Robin Watts
In various places in the code, we add markers (".seen") to dictionaries as we traverse them to ensure that we don't go into infinite loops. Adding a dictionary entry is bad as it's a) an expensive operation, b) a potentially destructive one, and c) produces another possible point of failure (as mallocs can fail). Instead, add a flag to each dict to allow them to be marked/unmarked and use that instead. Thanks to Zeniko for pointing out various places that could usefully be protected against infinite recursion.
2012-01-06fz_free_link_dest; fix a memory leakRobin Watts
Externalise free_link_dest, use it in doc_outline.c to avoid a memory leak. Thanks to again to Zeniko for pointing this out.
2012-01-06draw_device; device state stack handling fixes.Robin Watts
Only create a shape if we need to. Correctly cleanup, thus avoiding a double free of mask later on. Thanks to Zeniko for spotting these.
2012-01-06pdfshow; cope better with broken objectsRobin Watts
In pdfshow, if we fail to parse an object, just skip it rather than aborting. Thanks to Zeniko for the suggestion.
2012-01-06pdfclean; trailer dictionary expansion fixRobin Watts
The logic controlling whether to expand a trailer dictionary or not was reversed. Fixed here. Thanks to Zeniko for pointing this out.
2012-01-05Update iOS app to context branch.Tor Andersson
2012-01-05Remove stray semicolons and fix typo in xps zip code.Tor Andersson
2012-01-04Bug 692739: Add ability to abort time consuming actionsRobin Watts
A new 'cookie' parameter is added to page rendering/interpretation functions. Supply this as NULL to get existing behaviour. If you supply a non-NULL cookie, then this is taken as a pointer to a struct that can be used for simple, non-thread locked communication between caller and library. The entire struct should be memset to zero before entry, except for specific flags (thus coping with future extensions to this struct). The abort flag should be zero on entry. It will be checked periodically by the library - if the caller sets it non-zero (via another thread) then the current operation will be aborted. No guarantees are given as to how often this will be checked, or how fast it will be responded to. The progress_max field will be set to an integer (-1 for unknown) representing the number of 'things' to do. The progress field will count up from 0 to this number as time goes by. No guarantees are made as to the accuracy of this information, but it should be useful for offering some sort of progress bar etc. Note that progress_max may increase during the job. In general, callers should be careful to accept out of range or invalid data in this structure as this is deliberately accessed 'unlocked'.
2012-01-03Add mubusy buildRobin Watts
Add simple combined exe build for mupdf/muxps tools.
2012-01-03Rework draw device stack handling.Robin Watts
As we create clips/transparency groups etc, we maintain a stack of draw device states. Here we change this from having a 'current' state, and storing changes on the stack to always keeping the complete current state on the head of the stack. This should make error cleanup easier, as well as being conceptually easier to follow (for me at least).
2012-01-02Fix bug 692593 - solve crash due to inappropriately sized shape plane.Robin Watts
When starting to tile, create a shape plane if one exists. When finishing tiling, plot the shape plane back too. This solves the SEGVs. Something isn't quite right with the blending colours on part of this file though.
2012-01-02Bound shades by the supplied bbox.Robin Watts
Fix a 'TODO'. When asking for the bounds of a shading, simply convert the shadings bbox and intersect with that.
2011-12-30Load outlines in viewer after pages to allow links to work.Robin Watts
In order for hyperlinks to work, we need to load the outlines after the pages tree.