summaryrefslogtreecommitdiff
path: root/source/fitz
AgeCommit message (Collapse)Author
2014-01-02Add rebinding for fz_streams.Robin Watts
2014-01-02Add rebinding for fz_output.Robin Watts
2014-01-02Bug 694585: Further improve mesh rendering timesRobin Watts
Add a cached color converter mechanism. Use this for rendering meshes to speed repeated conversions. This reduces a (release build to ppm at default resolution) run from 23.5s to 13.2 seconds.
2014-01-02Bug 694585: Slow rendering of meshesRobin Watts
In the existing code for meshes, we decompose the mesh down into quads (or triangles) and then call a process routine to actually do the work. This process routine typically maps each vertexes position/color and plots it. As each vertex is used several times by neighbouring patches, this results in each vertex being processed several times. The fix in this commit is therefore to break the processing into 'prepare' and 'process' phases. Each vertex is 'prepared' before being used in the 'process' phase. This cuts the number of prepare operations in half. In testing, this reduced the time for a (release build, generating ppm at default resolution) run from 33.4s to 23.5s.
2014-01-02Cull code unused as a result of the "tolerate inline images..." fix.Robin Watts
Remove code that's not used any more as a result of the previous fix, plus some code that was unused anyway.
2014-01-01Bug 693320: Avoid unaligned accesses in SHA routines.Robin Watts
Avoid unnecessary copies. Minimise calls to isbigendian.
2014-01-01tolerate inline images without EOF markersSimon Bünzli
This is required for e.g. 1980_-_compressed_inline_image.pdf and Bug690300.pdf .
2013-12-24Bug 694587: Fix pattern repeat calculationRobin Watts
The pattern repeat calculation should be done in pattern space, but one of the arguments in the calculation was being taken from device space. Fix this. Also only apply the bias in the case where the bias would make it larger. 173 progressions.
2013-12-23Bug 694749: Fix transformation of hinted glyphsRobin Watts
Simple typo. Thanks to Alexander Monakov for spotting this.
2013-12-19Solve subpixel rendering problems with 270 degree rotationsRobin Watts
It seems that (int)-98.5 = 98, not -99. Use floorf instead.
2013-11-27fix regression from da277059b37380d57028ff79a636f4d725c96e8fSimon Bünzli
The changes to fz_render_glyph cause the scissor rectangle to no longer match the transformation matrix which causes Type 3 glyphs to be clipped at larger resolutions.
2013-11-27track font path in fz_fontSimon Bünzli
ft_file was removed in a2c945506ea2a2b58edbde84124094c6b4f69eac even though it might still be needed by downstream consumers (such as SumatraPDF) for allowing devices to load fonts again when a font has been loaded by fz_new_font_from_file which doesn't maintain a buffer.
2013-11-27Bug 694116: Solve valgrind issues in draw device.Robin Watts
The actual issue here is that a pixmap is dropped more times than it should be due to an error in the rendering pipeline. The problem arises because we fail to push a clip image mask, but still pop the mask off the stack later. This puts us off by 1 in the stack handling. The simplest solution to this (that will be safe no matter what mistakes are made by the caller too) is to add some simple tests in the draw device to ensure we do not free too early.
2013-11-26Add const keyword to some font function parameters.Tor Andersson
2013-11-26Add fz_advance_glyph and fz_encode_character functions.Tor Andersson
2013-11-11Add hooks to load system fonts. Use them in PDF interpreter.Tor Andersson
2013-11-11Add fz_new_font_from_buffer function.Tor Andersson
Use fz_buffer to wrap and reference count data used in font.
2013-11-11Remove unused variables causing warningsSebastian Rasmussen
2013-11-05Allow stroke states to be kept on the stack.Tor Andersson
Add a function to clone stroke states, a magic number to keep in the reference count to signal that a stroke state is stack-stored, and automatically clone stack stored stroke states in the keep function. Use fz_default_stroke_state to initialise stack stored stroke states.
2013-11-05Add binary search tree for mapping strings to void* pointers.Tor Andersson
Self balancing AA-tree.
2013-11-05Fix bug in fz_debug_xml.Tor Andersson
Print node and children, not node, children and siblings.
2013-11-05Improve stroke state function names that take the dash array length.Tor Andersson
2013-11-05Ignore <!DOCTYPE ...> declaration in XML parser.Tor Andersson
2013-11-04Make sure declarations come first. This would not compile with default ↵Michael Vrhel
windows settings.
2013-10-31Fix segv bug in clear_pixmap_with_value functions.Tor Andersson
Image masks don't have a colorspace; check before dereferencing.
2013-10-31Fix bug in gray to cmyk color converters.Tor Andersson
2013-10-31Special case clear_pixmap_with_value for CMYK colorspaces.Tor Andersson
2013-10-31Add CMYK support to PWG output.Tor Andersson
2013-10-31Add CMYK support to PAM output.Tor Andersson
2013-10-16Fix null device clip stack scissor handling.Robin Watts
Was failing to correctly initialise scissors when extending the stack. This caused the fill text to disappear in fts_15_109.pdf
2013-10-14Handle stroke+fill operations with transparency/blendmodes.Robin Watts
When stroking and filling in a single operation, we are supposed to form the complete stroke+fill image, then blend it back, rather than filling and blending, then stroking and blending. This only matters during transparency, or with non-normal blend modes. We fix MuPDF to push a knockout group when doing such operations.
2013-10-11SVG: Fix alpha issues.Robin Watts
While looking at fts_09_0921, I spotted that the alpha values on images and fills aren't being sent. Fix that here, together with broken colors being sent for masks. fts_09_0921 still renders badly due to the lack of support for blend modes.
2013-10-11SVG: Add simple smask support.Robin Watts
The luminosity flag and background color are currently ignored. The clip stack optionally held in the null device is updated here to be a container stack, together with a flags word (currently just used to indicate the type of the container at the current place in the stack), and a user value (used by the SVG device to stash the id for the mask it's generating).
2013-10-11SVG: Add dumb group implementation.Robin Watts
Really just a structure indicator as SVG 1.1 doesn't support blending etc.
2013-10-11SVG: Fix clip stack handling etc.Robin Watts
fts_09_0919.pdf shows up some silly mistakes in the clip stack handling and in the handling of 0 sized pixmaps. Simple fixes.
2013-10-11prevent potential heap access violationSimon Bünzli
fz_reset_gel fails to reset the length of active edges, which could (AFAICT) lead to pointers in gel->active pointing to memory that's been previously freed by fz_resize_array.
2013-10-10SVG: Fix fts_01_0106.pdfRobin Watts
A gradient fill that doesn't fill the bbox should be see through (unless background color is set, but we'll worry about that case when I find an example file that uses it). Arrange for the pixmap we draw the gradient fill into to be transparent initially. Also ensure that when we convert to png we preserve transparency.
2013-10-10SVG: Add image mask clip support.Robin Watts
2013-10-10Rename the draw devices 'stack_max' member to be 'stack_cap'Robin Watts
For consistency with the rest of the code.
2013-10-10SVG device: All gradient output (using images).Robin Watts
2013-10-10Add scissor stack functionality to null device.Robin Watts
If the appropriate device hint is set, the null device will keep a scissor stack. This saves duplicating code in every device.
2013-10-10Add fz_new_png_from_pixmapRobin Watts
This accompanies the function formerly known as fz_image_as_png (now renamed to fz_new_png_from_image).
2013-10-09SVG: Support Type3 fonts and stroked fonts.Robin Watts
2013-10-09Fix typo in pixmap handling.Robin Watts
When creating a png, a typo meant that we ALWAYS converted the pixmap even when we had an rgb or grayscale image on entry. Also, treat mask pixmaps (no colorspace) as gray.
2013-10-07SVG device: Send text as reusable pathsRobin Watts
2013-10-07Update SVG device to send text as pathsRobin Watts
2013-09-30Disable image interpolation with a hint.Robin Watts
Set the hint in mudraw when AA bits is set to 0.
2013-09-30Bug 694526: Spot non-invertable matrices and bale before strokingRobin Watts
The bug fix added in the previous commit fails to work in this case (hang-9527.pdf) because the matrix is not invertible and hence the clipping rectangle ends up infinite. Spot this case here and return early.
2013-09-30Bug 694526: Fix hang in stroking path.Robin Watts
The first file of this bug (hang-66.pdf) hangs while stroking a VERY long line segment; so long that 'used' is sufficinetly large that: used += dash_segment_len doesn't result in a change in the value of used. The fix is to clip strokes to the edge of the gel's clip area, meaning that this should never occur.
2013-09-27fix bug 694573Simon Bünzli
Currently, MuPDF throws away entire CCITT encoded images whenever an error happens in the code stream. Other PDF readers seem to rather render what has been decoded up to the point of the error. This patch enables such behavior for MuPDF as well.