Age | Commit message (Collapse) | Author |
|
Add simple combined exe build for mupdf/muxps tools.
|
|
As we create clips/transparency groups etc, we maintain a stack of
draw device states.
Here we change this from having a 'current' state, and storing changes
on the stack to always keeping the complete current state on the head
of the stack. This should make error cleanup easier, as well as being
conceptually easier to follow (for me at least).
|
|
When starting to tile, create a shape plane if one exists.
When finishing tiling, plot the shape plane back too.
This solves the SEGVs. Something isn't quite right with the blending
colours on part of this file though.
|
|
Fix a 'TODO'. When asking for the bounds of a shading, simply
convert the shadings bbox and intersect with that.
|
|
In order for hyperlinks to work, we need to load the outlines after
the pages tree.
|
|
Testsseem to indicate that this works, and gives noticable
improvements. Enabling by default.
|
|
The xps png reading code was overwriting its context pointer with
zero, then referencing through it.
|
|
When the page number is given by an int, rather than an indirect
reference number in a link destination, the page number is already
0 based. Remove the adjustment that I'd been incorrectly doing.
|
|
When reading an XYZ link destination, I was writing Z over X. While
fixing this, change to cryptic enums rather than unexplained magic
numbers.
When reading the outlines out of a pdf file, better to actually store
them in a linked list rather than just dropping them.
|
|
The shape plane was being incorrectly offset from the dest plane.
This could have caused SEGVs or incorrect results when blending
back.
This solves the hivemind.pdf iphone being clipped on the right hand
side.
|
|
More work on MuPDFs blending support. This seems to get l16.pdf
working pretty well. Fuller testing required to know if we get
everything right, but the maths now makes as much sense as it
ever has to me, and seems to track what gs does (more or less,
in that we don't use group alpha and gs does).
|
|
|
|
Move 'kind' into the fz_link_dest structure (as this makes more sense).
Put an fz_link_dest rather than just a page number into the outlines
structure.
Correct parsing of actions and dests from pdf outlines.
|
|
As Zeniko correctly points out in bug 692593, I had incorrectly
used hp[n1] when I should be using hp[0] at various points.
Hopefully that bug should be solved in it's entirety now with
the previous commit.
|
|
Restrict images to the size of the shape when blending back.
This seems to solve the problem; leaving code disabled until full
tests complete.
|
|
|
|
|
|
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.
|
|
gcc 4.4.5 gives helpful warnings about variables that can become
unset due to setjmp/longjmp usage. Fix that here.
Thanks to Sebras.
|
|
A couple of bits of the code SEGV in the event that values are NULL.
Fixed here by converting a do...while to a while, and adding an extra
guard in the if.
Thanks to Gaetan Bisson for the report, and patch.
|
|
|
|
|
|
Hadn't been updated to allow for context/exceptions.
|
|
One of the previous memsqueezing fixes (specifically that in
close_dctd) appears to cause the Memento fork bases squeezing
process to stop.
This appears to be because old code would do a NULL dereference
causing a SEGV. This would somehow NOT be picked up by the signal
handler, and the child would exit.
If the code is fixed to avoid the SEGV the code then somehow
goes on to do something (not in the close_dctd code) that makes
the mem squeeze process grind to a halt - but NOT in the same
instance of the executable. I am at a loss to explain this, but
would rather the code stays as it is (being as far as I can see
correct) for now.
|
|
|
|
Disabled for now by default.
Better SEGV handling under windows (to facilitate scripted squeezing)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rather than passing a stream to a close function, just pass context
and state - that's all that is required. This enables us to
call close to cleanup neatly if the stream fails to allocate.
|
|
|
|
Mupdf has some large structures (fz_shade is over 32K!), so to catch
all pointers we need to search further than the 1K I was originally
limiting ourselves to.
|
|
|
|
Missed this one last time.
|
|
|
|
|
|
|
|
|
|
The new fz_malloc_struct(A,B) macro allocates sizeof(B) bytes using
fz_malloc, and then passes the resultant pointer to Memento_label
to label it with "B".
This costs nothing in non-memento builds, but gives much nicer
listings of leaked blocks when memento is enabled.
|
|
|
|
When listing blocks from Memento, look for internal pointers to
other blocks, and use this to generate a nested list - much
easier to read when looking to see which stray reference is
causing blocks to leak.
Add new Memento_label feature to allow blocks to be labelled. Makes
block displaying much easier to read.
|
|
|
|
|
|
|
|
Slight memento tweak to simplify code (and correct problem with
repeated event numbers when squeezing).
|
|
|
|
Fixes for leaks (and SEGVs, division by zeros etc) seen when
Memsqueezing.
|