summaryrefslogtreecommitdiff
path: root/source/fitz/draw-scale-simple.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.
2018-06-22Don't pollute namespace with our 'restrict' macro. Use FZ_RESTRICT instead.Tor Andersson
2017-07-19Add spots to fz_pixmaps.Robin Watts
Update separations interface further to cope with whether spots should be rendered separately, or as composite colors.
2017-05-31Avoid double literals causing casts to float.Sebastian Rasmussen
2017-04-27Include required system headers.Tor Andersson
2017-03-01Bug 697395: Fix underflow in special case scaler.Robin Watts
When scaling a single row pixmap with a flip, I was getting the offset to the far end of the line wrong due to forgetting to allow for the alpha plane. Fixed here.
2016-06-06Fix broken ARM implementation of scale_row_to_temp3.Robin Watts
I had changed some code to *3 when creating the routine from the 4 bpp variant, but this particular multiplication should still have been *4, as it was looking up in an int table.
2016-06-06Change ARM assembler to be compatible with Xcode/clangJoseph Heenan
clang only accepts the unified format - so use the unified syntax everywhere, and add .syntax unified to tell the gnu assembler we're using the unified syntax.
2016-05-27Fix ARM code for bitmap scalingRobin Watts
2016-05-26Update bitmap scaler to cope with lack of alpha.Robin Watts
If we have alpha on the input, we preserve it. If we have no alpha on the input, we have to create it in the output if the edges aren't pixel aligned.
2016-05-24Fix ARM code in light of plotter changes.Robin Watts
2016-05-24fz_pixmap revamp: add stride and make alpha optionalRobin Watts
fz_pixmaps now have an explicit stride value. By default no change from before, but code all copes with extra gaps at the end of the line. The alpha data in fz_pixmaps is no longer compulsory. mudraw: use rgb not rgba (ppmraw), cmyk not cmyka (pkmraw). Update halftone code to not expect alpha plane. Update PNG writing to cope with alpha less input. Also hide repeated params within the png output context. ARM code needs updating.
2016-03-25Rename ARCH_ARM_CAN_LOAD_UNALIGNED to be ARCH_UNALIGNED_OKRobin Watts
Now covers non-ARM arch's too, and both load/stores.
2016-01-13Add lots of consts.Robin Watts
In general, we should use 'const fz_blah' in device calls whenever the callee should not alter the fz_blah. Push this through. This shows up various places where we fz_keep and fz_drop these const things. I've updated the fz_keep and fz_drops with appropriate casts to remove the consts. We may need to do the union dance to avoid the consts for some compilers, but will only do that if required. I think this is nicer overall, even allowing for the const<->no const problems.
2015-08-20Remove a few debug functions left behind.Sebastian Rasmussen
2015-02-17Rename fz_close_* and fz_free_* to fz_drop_*.Tor Andersson
Rename fz_close to fz_drop_stream. Rename fz_close_archive to fz_drop_archive. Rename fz_close_output to fz_drop_output. Rename fz_free_* to fz_drop_*. Rename pdf_free_* to pdf_drop_*. Rename xps_free_* to xps_drop_*.
2014-01-10Bug 694879: Fix SEGV in draw-simple-scale.Robin Watts
Problems caused by the fact that -0x8000000 = 0x80000000. Sidestep the problem for all coords where floats cannot accurately represent them.
2013-09-13Fix various compile warnings spotted by the cluster.Robin Watts
2013-06-20Rearrange source files.Tor Andersson