summaryrefslogtreecommitdiff
path: root/source/gprf/gprf-skeleton.c
AgeCommit message (Collapse)Author
2018-07-05Pass rect and matrix by value in geometry functions.Tor Andersson
Several things irk me about passing values as const pointers: * They can be NULL, which is not a valid value. * They require explicit temporary variables for storage. * They don't compose easily in a legible manner, requiring weird pointer passing semantics where the variable being assigned is hidden as an argument in the innermost function call. * We can't change the value through the pointer, requiring yet more local variables to hold copies of the input value. In the device interface where we pass a matrix to a function, we often find ourselves making a local copy of the matrix so we can concatenate other transforms to it. This copying is a lot of unnecessary busywork that I hope to eventually avoid by laying the groundwork with this commit. This is a rather large API change, so I apologize for the inconvenience, but I hope the end result and gain in legibility will be worth the pain.
2017-11-01Add separate fz_close_output step.Tor Andersson
Closing flushes output and may throw exceptions. Dropping frees the state and never throws exceptions.
2017-11-01Use int64_t for public file API offsets.Tor Andersson
Don't mess with conditional compilation with LARGEFILE -- always expose 64-bit file offsets in our public API.
2017-05-31Avoid double literals causing casts to float.Sebastian Rasmussen
2017-03-22Rename fz_putc/puts/printf to fz_write_*.Tor Andersson
Rename fz_write to fz_write_data. Rename fz_write_buffer_* and fz_buffer_printf to fz_append_*. Be consistent in naming: fz_write_* calls write to fz_output. fz_append_* calls append to fz_buffer. Update documentation.
2016-12-27Strip extraneous blank lines.Tor Andersson
2016-09-12Correct rounding in gproof skeleton files.Robin Watts
In the gproof pipeline MuPDF first generates a skeleton file with page sizes in. Then it gets gs to generate individual pages for that file. In one case, the pdf file has a height of 203.4 - at 300dpi that's 847.5 device pixels. MuPDF was rounding that up to 848pixels, whereas gs was rounding it down to 847, causing an error on load. Adjust MuPDFs skeleton file generation so that it matches gs.
2016-04-26Rename fz_write_int32be to fz_write_int32_be to be consistent with ↵Tor Andersson
fz_read_int32_be.
2015-12-15Rename fz_write_x to fz_save_pixmap_as_x or fz_save_bitmap_as_x.Tor Andersson
Separate naming of functions that save complete files to disk from functions that write data to streams.
2015-12-11Use fz_output instead of FILE* for most of our output needs.Tor Andersson
Use fz_output in debug printing functions. Use fz_output in pdfshow. Use fz_output in fz_trace_device instead of stdout. Use fz_output in pdf-write.c. Rename fz_new_output_to_filename to fz_new_output_with_path. Add seek and tell to fz_output. Remove unused functions like fz_fprintf. Fix typo in pdf_print_obj.
2015-09-02Add in support for icc profiles in gprf/gproof formatMichael Vrhel
The default profile case (sRGB and SWOP CMYK) are indicated by empty strings for those entries.
2015-07-20Code to generate a GProof file from a currently opened document.Robin Watts
Given a document, generate a gproof file from it. This encapsulates the name of the file, the desired resolution for proofing, and the page dimensions of all the pages in the file. The idea is that an app will call this when it is asked to go into 'proofing' mode, and will reinvoke itself on this file. This gives the gprf document handler just enough information to fake up a document of n pages of the required sizes. Each page will then be autogenerated on demand.