summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2016-11-14Continued Layer API work.Robin Watts
Hide pdf_is_hidden_ocg from the public interface. Ensure that RBGroups and Order properly fall back to the default entries if they are missing in the OCCDs. Add pdf_set_layer_config_as_default. This sets the default layer config to be current one. This destroys the current default dictionary, but we leave the other configs intact.
2016-11-14More API tweaks.Robin Watts
Move internal functions from public to private headers.
2016-11-14Make fz_buffer structure private to fitz.Robin Watts
Move the definition of the structure contents into new fitz-imp.h file. Make all code outside of fitz access the buffer through the defined API. Add a convenience API for people that want to get buffers as null terminated C strings.
2016-11-14Bug 697336: Be more explicit about where to edit config.hRobin Watts
2016-11-14Add/fix page coordinates to link targets.Tor Andersson
Correctly transformed target coordinates for PDF. Target coordinates for EPUB and HTML.
2016-11-14Add optional 'object' argument to pdf_add_stream.Tor Andersson
2016-11-11API improvements.Robin Watts
Add missing API comments. Move private definitions to implementation headers or C files. Move internal functions to implementation headers.
2016-11-11Add pdf_layer configuration API.Robin Watts
Add API to: * allow enumeration of layer configs (OCCDs) within PDF files. * allow selection of layer configs. * allow enumeration of the "UI" (or "Human readable") form of layer configs. * allow selection/toggling of entries in the UI.
2016-11-10Add minimum line width configuration option.Robin Watts
2016-11-08Fix android warnings.Tor Andersson
2016-11-07Bug 697241: Fix blending through clips.Robin Watts
Non rectangular clips are currently handled by rendering to a 'isolated' background, and then plotting that through a mask. This runs into problems when the rendering needs to use non standard blend modes that need to access the background colors. Instead, copy the background to the new pixmap, render to that then plot that through the mask. This simplifies the painting code, because we now never have mismatched source and destination alphas.
2016-10-28epub: Add links to XHTML and FB2 formats.Tor Andersson
2016-10-28epub: Add 'id' attribute to all HTML elements, not just <a> tags.Tor Andersson
Allows id anchoring to block elements as well as inline elements. Fix for bug 697123.
2016-10-28Clean up link destination handling.Tor Andersson
All link destinations should be URIs, and a document specific function can be called to resolve them to actual page numbers. Outlines have cached page numbers as well as string URIs.
2016-10-26Bump version number to 1.10.Tor Andersson
2016-10-26Introduce options for structured text.Sebastian Rasmussen
2016-10-24Fix cluster timeouts with test file.Robin Watts
tests_private/pdf/sumatra/1297_-_interpolate_at_lower_resolutions.pdf times out in the cluster. This is due to us having empty t3 glyphs defined that define d1 rectangles that are wildly different to the default font bbox. Add code to spot that t3 glyphs are empty, and to use a tiny font bbox for them. (It might be nicer to drop the empty display lists, but then this produces knock on problems further on, where non-existent display lists lead to NULL pixmaps, which lead to us think that renders failed etc).
2016-10-21Clean up FZ_IMAGE_XXX enums and purge unused FZ_IMAGE_JBIG2.Tor Andersson
2016-10-19Move headers to make svg_document an internal type.Sebastian Rasmussen
2016-10-19Move headers to make xps_document an internal type.Sebastian Rasmussen
2016-10-19Make document handler declarations internal.Sebastian Rasmussen
2016-10-18Remove unused luminosity.Sebastian Rasmussen
2016-10-14epub: Add hyperlinks.Tor Andersson
2016-10-12Use pool allocator when parsing CSS.Tor Andersson
Fixes memory leaks when parsing throws exceptions and saves a lot of tiny mallocs for objects that have common life times.
2016-10-12Split fz_html into fz_html and fz_html_box for nodes.Tor Andersson
Removes the need to carry fz_pool along in all boxes.
2016-10-12Change code from using bandheight to using band_height.Robin Watts
Keep to our naming conventions.
2016-10-12Regularize band writer interface.Robin Watts
We have various functions that, for different image formats, write a header, then a band, then (sometimes) a trailer. Push them all through a single interface. This change also fixes potential problems caused by the trailer writing being an implicit destructor, which can cause problems in cleanup code if the trailer writing throws an error.
2016-10-10PDF Images: Add a flag for if we need to apply the decode arrayRobin Watts
This avoids us having to check the entire array each time, and makes the next commit simpler.
2016-10-10HTML: Keep 'Anchors' in the html box list.Robin Watts
Keep them as 'FLOW' entries rather than box entries. Although they technically enclose areas of text, we only ever use them as points. Thanks to Tor for fixing this code.
2016-10-10Use more bitfields in HTML.Robin Watts
Saves 12 bytes per fz_html, and we have a lot.
2016-10-10Change HTML agent to use bitfields rather than chars.Robin Watts
Saves 8 bytes on every css_style (and we have a lot of those).
2016-10-07More SWAR optimisation in plotters.Robin Watts
Slightly revised blending, making use of the fact that we can no longer overflow due to ma + masa <= 0x100.
2016-10-07Correct maths error in painters.Robin Watts
As part of the blending calculations, we do: dst = src * mask_alpha + dst * (1-mask_alpha.src_alpha) We calculate mask_alpha as ma, and 1-mask_alpha.src_alpha as masa. In full accuracy, we should never have ma + masa >= 1. Unfortunately, with the formulation used in the painters at the moment, we can. We therefore rejig the calculations slightly.
2016-10-07Rename fz_process_mesh to fz_process_shade.Robin Watts
Better name as not all shadings are meshes.
2016-10-07Add API comments for fz_shade.Robin Watts
2016-10-07Add ctx to fz_font functions.Robin Watts
2016-10-07Add comments to API declarations.Robin Watts
2016-10-07pdf: Separate functions to read text strings and text streams as UTF-8.Tor Andersson
The stream loading is used only by the JS code loading.
2016-10-07pdf: Remove unneccessary document argument to pdf_to_utf8 etc.Tor Andersson
2016-10-07Add annotation editing functions and clean interface of existing ones.Tor Andersson
2016-10-07Remove separate tmp/deleted/changed annotation lists.Tor Andersson
Use a flag in the pdf_annot struct instead. Don't pass pdf_document to annotation edit functions.
2016-10-06Hide internals of fz_colorspaceRobin Watts
The implementation does not need to be in the public API.
2016-10-05Add a const to a lookup function.Robin Watts
2016-10-05Uncouple font shaper data from harfbuzz.Robin Watts
The fz_font structure now doesn't know anything about harfbuzz at all, it merely offers an abstract 'fz_shaper_data_t' entry.
2016-10-05Move fz_font definition to be private.Robin Watts
Move the definition of fz_font to be in a private header file rather than in the public API. Add accessors for specific parts of the structure and use them as appropriate. The font flags, and the harfbuzz records remain public. This means that only 3 files now need access to the font implementation (font.c, pdf-font.c and pdf-type3.c). This may be able to be improved further in future.
2016-10-05Add some more comments to API headersRobin Watts
2016-09-26tiff: Add support for thunder decoding.Sebastian Rasmussen
2016-09-23Clean up annotation enum names.Tor Andersson
Put them in the PDF name space and separate words with underscores. Remove redundant namespace prefixes in java constants. Device.FLAG_MASK rather than Device.FZ_DEVFLAG_MASK. Use namespace for PDF annotation flag enum.
2016-09-22Bug 697015: Avoid object references vanishing during repair.Robin Watts
A PDF repair can be triggered 'just in time', when we encounter a problem in the file. The idea is that this can happen without the enclosing code being aware of it. Thus the enclosing code may be holding 'borrowed' references (such as those returned by pdf_dict_get()) at the time when the repair is triggered. We are therefore at pains to ensure that the repair does not replace any objects that exist already, so that the calling code will not have these references unexpectedly invalidated. The sole exception to this is when we replace the 'Length' fields in stream dictionaries with the actual lengths. Bug 697015 shows exactly this situation causing a reference to become invalid. The solution implemented here is to add an 'orphan list' to the document, where we put these (hopefully few, small) objects. These orphans are kept around until the document is closed.
2016-09-20Sync Memento with gs.Robin Watts
Including: Bug 697134: Tweak MEMENTO_GS_HACKS inclusion. Rather than rolling our own memset prototype in this case, use the one that gs provides. And, bug 697133: Fix typo in Memento. Causing a significant slowdown. Thanks to George Burgess IV for spotting this.