summaryrefslogtreecommitdiff
path: root/source/fitz/draw-blend.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-10-24Use abort instead of NULL function to crash.Robin Watts
2017-10-24Fix spot blend routine forgetting to complement in RGB process spaces.Robin Watts
2017-10-24Fix knockout operation.Robin Watts
The "blend back" at the end of the inner knockout groups was attempting to reuse the existing blending code. This was going wrong for all sorts of reasons (not least the uncomposition phase) for knockout groups containing alpha, such as found on page 7 of Altona_Technical_v20_x4.pdf. Use a dedicated routine. This is much simpler as it doesn't have to cope with blend modes etc.
2017-09-12Update draw-blend.c to support spot blending.Michael Vrhel
Proper blending of spots is dependent upon the blending color space as well as the blend mode. In particular when the blend mode is non-separable or non-white preserving normal blending should be used for the spot colorants. Incorporates various fixes and optimisations squashed back to this one commit for clarity. Some of these fixes/optimisations are due to Michael Vrhel. In particular we move to handling non-isolated groups in the same way as gs.
2017-09-12Fix whitespace in draw-blend.cRobin Watts
2017-07-17Debug blendingRobin Watts
2017-07-17Complement subtractive colors before applying blend modes.Tor Andersson
(Incorporates fixes from Tor, Michael and Robin).
2017-07-17Support non-separable blending in gray color spacesMichael Vrhel
Also make sure to support the cases where the background alpha is 0 for non-isolated groups.
2017-07-17Fix softlight blend mode. Make nonseparable blends work with CMYKMichael Vrhel
Softlight blend mode was broken as the constants were not properly scaled for 255 arithmetic. The nonseparable blending code needs to do special handling of K when the color space is CMYK.
2017-05-31Avoid double literals causing casts to float.Sebastian Rasmussen
2017-04-27Include required system headers.Tor Andersson
2016-07-08git stripspaceTor Andersson
2016-05-29Tweak plotter code slightly for speed.Robin Watts
Use do {} while(--w) rather than while(w--) {} as this safes a test each time around the loop.
2016-05-24Sprinkle some consts and restricts in plotters.Robin Watts
Try and help C avoid pointer aliasing issues. Some of this may not help at all. None of it should hurt though.
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.
2015-03-26Avoid division by 0 in blend calls.Robin Watts
If b is out of range (-ve), then this can let s == 0 and we can get failures.
2015-03-24Don't pass interpreter context to pdf_processor opcode callbacks.Tor Andersson
Update buffer and filter processors. Filter both colors and stroke states. Move OCG hiding logic into interpreter.
2013-06-20Rearrange source files.Tor Andersson