summaryrefslogtreecommitdiff
path: root/win32/libmupdf.vcproj
AgeCommit message (Collapse)Author
2013-05-22Update OpenJPEG to v2.0.0.Robin Watts
2013-05-21Split PWG code into a separate file.Robin Watts
2013-05-14svgwrite: First attempt at an SVG output device.Robin Watts
No font support (just font names are sent through). No group support. No shading support. No image mask support. Line art, text position/size, bitmaps, clipping all seem to work though.
2013-05-06Add UCDN unicode character library.Tor Andersson
2013-05-03Simple Image file format recogniserRobin Watts
Now can open jpeg/png/tiff files within mupdf.
2013-04-30Split dev_text into three parts.Tor Andersson
One for the raw span extraction pass, one for paragraph sorting, and another for HTML output.
2013-04-11Move pdf_image to fz_image.Robin Watts
In order to be able to output images (either in the pdfwrite device or in the html conversion), we need to be able to get to the original compressed data stream (or else we're going to end up recompressing images). To do that, we need to expose all of the contents of pdf_image into fz_image, so it makes sense to just amalgamate the two. This has knock on effects for the creation of indexed colorspaces, requiring some of that logic to be moved. Also, we need to make xps use the same structures; this means pushing PNG and TIFF support into the decoding code. Also we need to be able to load just the headers from PNG/TIFF/JPEGs as xps doesn't include dimension/resolution information. Also, separate out all the fz_image stuff into fitz/res_image.c rather than having it in res_pixmap.
2013-03-26Make pdf_functions public as fz_functions.Robin Watts
Implementations remain unexposed, but this means we can safely pass functions in shades without having to 'sample' them (though we may still choose to do this for speed).
2013-03-04Avoid interactive features causing bloat in mutoolPaul Gardiner
2013-02-06Change to pass structures by reference rather than value.Robin Watts
This is faster on ARM in particular. The primary changes involve fz_matrix, fz_rect and fz_bbox. Rather than passing 'fz_rect r' into a function, we now consistently pass 'const fz_rect *r'. Where a rect is passed in and modified, we miss the 'const' off. Where possible, we return the pointer to the modified structure to allow 'chaining' of expressions. The basic upshot of this work is that we do far fewer copies of rectangle/matrix structures, and all the copies we do are explicit. This has opened the way to other optimisations, also performed in this commit. Rather than using expressions like: fz_concat(fz_scale(sx, sy), fz_translate(tx, ty)) we now have fz_pre_{scale,translate,rotate} functions. These can be implemented much more efficiently than doing the fully fledged matrix multiplication that fz_concat requires. We add fz_rect_{min,max} functions to return pointers to the min/max points of a rect. These can be used to in transformations to directly manipulate values. With a little casting in the path transformation code we can avoid more needless copying. We rename fz_widget_bbox to the more consistent fz_bound_widget.
2013-02-04Add fz_output, and make output functions use it.Robin Watts
Various functions in the code output to FILE *, when there are times we'd like them to output to other things, such as fz_buffers. Add an fz_output type, together with fz_printf to allow things to output to this.
2013-01-30Parts of Robin's PDF editing/page creation commit useful for annotationsPaul Gardiner
2012-11-30Rejig VS projects to avoid compiling files twice.Robin Watts
We now have a libmupdf that has all the usual files in, plus a libmupdf-v8 and a libmupdf-nov8 with/without javascript respectively. libmupdf-v8 and libmupdf-nov8 both depend on libmupdf, and the apps depend on libmupdf-{no,}v8 as appropriate. This means every file is listed (and compiled) strictly once, and better matches the style of the unix builds. It also prevents VS getting confused and listing files twice in search results. Also, we strip out the unnecessary repeated calls to generate.bat, which result in occasional spurious build failures.
2012-11-26Move XML parser into fitz directory.Tor Andersson
2012-11-16Move text searching function into fitz.Tor Andersson
2012-10-17First steps towards supporting transitions.Robin Watts
Only Fade, Wipe and Blinds supported so far. Hit 'p' in the viewer to go into 'presentation' mode. Page swaps then transition from page to page. Pages auto advance until key or mouse is used.
2012-10-05Refactor compressed stream loading.Robin Watts
Refactor 'short stopped' image stream loading into fz_compressed_buffer loading. Nicer overall, and reflects the fact that this can be used for non-image streams that we want to hold compressed in memory (for instance for shading streams). This is a preparatory step for pdfwrite, and enables further shading memory use optimisations. Remove unused jbig2 function pointer from the fz_compression_params (previously fz_image_params) structure to avoid confusion.
2012-09-26Add thirdparty libraries as git submodules.Tor Andersson
jbig2dec latest freetype 2.4.10 jpeg 9 openjpeg 1.5.0 zlib 1.2.7 Update MSVC projects for thirdparty libraries as submodules. Improve thirdparty library availability checks in Makethird by checking for the existence of a README file instead of just the directory, since a checkout without active git submodules has empty directories for the third party libraries.
2012-09-18Forms: add event handling api and specifically support for javascript alertPaul Gardiner
2012-08-08Merge branch 'master' into formsPaul Gardiner
Conflicts: Makefile apps/mudraw.c pdf/pdf_write.c win32/libmupdf-v8.vcproj
2012-08-07Update VS solutions to new thirdparty files.Robin Watts
2012-06-01Merge branch 'master' into formsPaul Gardiner
Conflicts: fitz/doc_document.c fitz/fitz-internal.h fitz/fitz.h fitz/stm_buffer.c pdf/mupdf-internal.h pdf/pdf_object.c pdf/pdf_xobject.c pdf/pdf_xref.c win32/mupdf.sln
2012-05-15Add a dummy pdf_js implementation for use in non-form-supporting buildsPaul Gardiner
The calc.pdf specific version of pdf_jsimp is no longer needed and hence dropped.
2012-05-15Forms: make forms API separate to the main document APIPaul Gardiner
This also provides a way to test whether interactive methods are supported.
2012-05-11Split part of fz_document interface for pdf_document into separate file.Tor Andersson
Make a separate constructor function that does not link in the interpreter, so we can save space in the mubusy binary by not including the font and cmap resources.
2012-05-10Combine all small tools into mubusy and remove the separate executables.Tor Andersson
2012-05-08First go at Javascript-engine abstract APIPaul Gardiner
2012-05-08Forms: handle field appearance change on mouse up/downPaul Gardiner
2012-04-28Move guts of pdfclean into new pdf_write function.Robin Watts
Expose pdf_write function through the document interface.
2012-04-23Update build files for new thirdparty package with freetype 2.4.9.Tor Andersson
2012-03-12Merge branch 'master' into header-splitRobin Watts
2012-03-09Fix MSVC solution - openjpeg include paths not updated to 1.5Robin Watts
I'd missed changing the openjpeg include paths to 1.5 somehow. Fixed here. CLUSTER_UNTESTED as we don't use the solution.
2012-03-06Split fitz.h/mupdf.h into internal/external headers.Robin Watts
Attempt to separate public API from internal functions.
2012-02-29Move base_object from fitz to pdf in the VS solution too.Robin Watts
Forgot to move this earlier.
2012-02-25Rework image handling for on demand decodeRobin Watts
Introduce a new 'fz_image' type; this type contains rudimentary information about images (such as native, size, colorspace etc) and a function to call to get a pixmap of that image (with a size hint). Instead of passing pixmaps through the device interface (and holding pixmaps in the display list) we now pass images instead. The rendering routines therefore call fz_image_to_pixmap to get pixmaps to render, and fz_pixmap_drop those afterwards. The file format handling routines therefore need to produce images rather than pixmaps; xps and cbz currently just wrap pixmaps as images. PDF is more involved. The stream handling routines in PDF have been altered so that they can recognise when the last stream entry in a filter dictionary is an image decoding filter. Rather than applying this filter, they read and store the parameters into a pdf_image_params structure, and stop decoding at that point. This allows us to read the compressed data for an image into memory as a block. We can then restart the image decode process later. pdf_images therefore consist of the compressed image data for images. When a pixmap is requested for such an image, the code checks to see if we have one (of an appropriate size), and if not, decodes it. The size hint is used to determine whether it is possible to subsample the image; currently this is only supported for JPEGs, but we could add generic subsampling code later. In order to handle caching the produced images, various changes have been made to the store and the underlying hash table. Previously the store was indexed purely by fz_obj keys; we don't have an fz_obj key any more, so have extended the store by adding a concept of a key 'type'. A key type is a pointer to a set of functions that keep/drop/compare and make a hashable key from a key pointer. We make a pdf_store.c file that contains functions to offer the existing fz_obj based functions, and add a new 'type' for keys (based on the fz_image handle, and the subsample factor) in the pdf_image.c file. While working on this, a problem became apparent in the existing store codel; fz_obj objects had no protection on their reference counts, hence an interpreter thread could try to alter a ref count at the same time as a malloc caused an eviction from the store. This has been solved by using the alloc lock as protection. This in turn requires some tweaks to the code to make sure we don't try and keep/drop fz_obj's from the store code while the alloc lock is held. A side effect of this work is that when a hash table is created, we inform it what lock should be used to protect its innards (if any). If the alloc lock is used, the insert method knows to drop/retake it to allow it to safely expand the hash table. Callers to the hash functions have the responsibility of taking/dropping the appropriate lock, and ensuring that they cope with the possibility that insert might drop the alloc lock, causing race conditions.
2012-02-13Remove arch_port.c from visual C solution/Android build.Robin Watts
File references escaped deletion in previous commit.
2012-02-07Updated Visual Studio Project; generated tweaks.Robin Watts
Rather than having a custom build step that generates the font and cmap "generated" files, have it as a separate project. This enables us to nuke the generated directory as part of the clean step, and to list the files in the solution explorer.
2012-02-07Update windows viewer to latest changes.Tor Andersson
2012-01-30Add CBZ (comic book zip-file) parser.Tor Andersson
2012-01-30Move PNG, JPEG and TIFF image loading from muxps into fitz.Tor Andersson
2012-01-27Makefile/Project changes to use new thirdparty.zipRobin Watts
Updated thirdparty.zip contains newer jpeg, jbig2 and freetype code.
2011-12-23Generalise pdf_links to be fz_links.Robin Watts
Move to a non-pdf specific type for links. PDF specific parsing is done in pdf_annots.c as before, but the essential type (and handling functions for that type) are in a new file fitz/base_link.c. The new type is more expressive than before; specifically all the possible PDF modes are expressable in it. Hopefully this should allow XPS links to be represented too.
2011-12-15Rework pdf_store to fz_store, a part of fz_context.Robin Watts
Firstly, we rename pdf_store to fz_store, reflecting the fact that there are no pdf specific dependencies on it. Next, we rework it so that all the objects that can be stored in the store start with an fz_storable structure. This consists of a reference count, and a function used to free the object when the reference count reaches zero. All the keep/drop functions are then reimplemented by calling fz_keep_sharable/fz_drop_sharable. The 'drop' functions as supplied by the callers are thus now 'free' functions, only called if the reference count drops to 0. The store changes to keep all the items in the store in the linked list (which becomes a doubly linked one). We still make use of the hashtable to index into this list quickly, but we now have the objects in an LRU ordering within the list. Every object is put into the store, with a size record; this is an estimate of how much memory would be freed by freeing that object. The store is moved into the context and given a maximum size; when new things are inserted into the store, care is taken to ensure that we do not expand beyond this size. We evict any stored items (that are not in use) starting from the least recently used. Finding an object in the store now takes a reference to it already. LOCK and UNLOCK comments are used to indicate where locks need to be taken and released to ensure thread safety.
2011-11-15Merge branch 'master' into contextRobin Watts
Mostly redoing the xps_context to xps_document change and adding contexts to newly written code. Conflicts: apps/pdfapp.c apps/pdfapp.h apps/x11_main.c apps/xpsdraw.c draw/draw_device.c draw/draw_scale.c fitz/base_object.c fitz/fitz.h pdf/mupdf.h pdf/pdf_interpret.c pdf/pdf_outline.c pdf/pdf_page.c xps/muxps.h xps/xps_doc.c xps/xps_xml.c
2011-11-14Fix libmupdf.vcproj breakage.Robin Watts
Missing </File> entry.
2011-11-14Add 'simple scale' variant of scaling routines.Robin Watts
draw_simple_scale.c is a cut down version of draw_scale.c, that only uses filter functions that return values strictly in the 0 to 1 range. Because of that, we can use bytes rather than ints as intermediate storage, and have no clipping to do.
2011-11-10Add XPS outline parsing and move outline data struct to fz_outline.Tor Andersson
2011-10-04Move to exception handling rather than error passing throughout.Robin Watts
This frees us from passing errors back everywhere, and hence enables us to pass results back as return values. Rather than having to explicitly check for errors everywhere and bubble them, we now allow exception handling to do the work for us; the downside to this is that we no longer emit as much debugging information as we did before (though this could be put back in). For now, the debugging information we have lost has been retained in comments with 'RJW:' at the start. This code needs fuller testing, but is being committed as a work in progress.
2011-09-21Don't thread ctx through safe fz_obj functions.Tor Andersson
2011-09-20Reshuffle exception context code to fit Tor's aesthetic sense.Tor Andersson