Age | Commit message (Collapse) | Author |
|
It seems that JPX images can be supplied in indexed format, with
both a palette internal to the jpx stream, and a palette in the
PDF. Googling seems to suggest that the internal palette should
be ignored in this case, and the external palette applied.
Fortunately, since OpenJPEG-1.5 there is a flag that can be used
to tell OpenJPEG not to decode palettes. We update the code here
to spot that there is an external palette, and to set this flag.
|
|
Currently all conversions from rect to bbox are done using a single
function, fz_round_rect. This causes problems, as sometimes we want
'round, allowing for slight calculation errors' and sometimes we
want 'round slavishly to ensure we have a bbox that covers the rect'.
We therefore split these 2 cases into 2 separate functions;
fz_round_rect is kept, meaning "round outwards allowing for slight
errors", and fz_bbox_covering_rect is added to mean "give us the
smallest bbox that is guaranteed to cover rect".
No regressions seen.
|
|
When coping with missing transparency entries, fill with 255,
not 0. Simplify code slightly so we fill completely, not just
to depth.
|
|
If entries are larger than they need to be, accept just the amount
we need. If not large enough, pad out with zeros.
|
|
Move fz_stroke_state from being a simple structure whose contents
are copied repeatedly to being a dynamically allocated reference
counted object so we can cope with large numbers of entries in
the dash array.
|
|
From SumatraMuPDF.patch - Many thanks.
|
|
Taken from SumatraPDF.patch - Many thanks.
|
|
Thanks to SumatraPDF for the patch.
|
|
|
|
last character was across style changes.
|
|
|
|
|
|
When we have finished replacing tiff->samples, free the old samples
block. Taken from Sumatra.patch - many thanks.
|
|
Taken from Sumatra.patch - Many thanks.
|
|
Bring up to date with current APIs, including text device changes.
|
|
Also tidy up the taking of fz_context *'s, and hide an unwanted indent
param.
|
|
Fix a couple of silly problems (one gccism, and one windows specific
bug).
|
|
|
|
Debug printing functions: debug -> print.
Accessors: get noun attribute -> noun attribute.
Find -> lookup when the returned value is not reference counted.
pixmap_with_rect -> pixmap_with_bbox.
We are reserving the word "find" to mean lookups that give ownership
of objects to the caller. Lookup is used in other places where the
ownership is not transferred, or simple values are returned.
The rename is done by the sed script in scripts/rename3.sed
|
|
|
|
|
|
|
|
|
|
In the existing code, glyphs are stored/retrieved from the glyphcache
with no reference to the antialias level used to create them. This
means that if we are using different aa levels in different threads,
we can retrieve 'non-matching' glyphs and hence get rendering
indeterminisms.
Fixed simply here by storing the aa level in the glyphcache too.
|
|
Details of buffers hidden in fitz-internal.h. Public API now just
lets us keep/drop and get storage details for a buffer.
fz_debug_outline{,_xml} lose the 'level' param in their public API.
fz_matrix_max_expansion hidden, as it's only used internally.
Document fz_setjmp/fz_longjmp and Apple specific hackery.
|
|
C's standard is copy(dst, src), so we move to adopt that here.
Hopefully no one is calling this routine other than us - if they are,
then I apologise! Better to aim for consistency before we freeze
the API at v1.0 than to carry an inconsistent API around ever after.
|
|
C's standard is copy(dst, src), so we move to adopt that here.
Hopefully no one is calling this routine other than us - if they are,
then I apologise! Better to aim for consistency before we freeze
the API at v1.0 than to carry an inconsistent API around ever after.
|
|
|
|
|
|
Instead of returning in 1.0 for underflow/overflow, return minimum
value for underflow and maximum value for overflow. NaN returns 1.0.
|
|
Floating point numbers are now clamped, division by zero is
approximated by minimum or maximum value and NaN results in 1.0.
|
|
Make fz_clone_context copy existing AA settings.
Add accessor function for fz_bitmap.
Add more documentation for various functions/types.
|
|
|
|
Add some function documentation to fitz.h.
Add fz_ prefix to runetochar, chartorune, runelen etc. Change
fz_runetochar to avoid passing unnecessary pointer.
|
|
A NULL halftone pointer passed to fz_halftone_pixmap is now taken
to mean "use the default halftone".
This means we can remove most of the halftone functions from the
public API until (post 1.0) we decide to flesh out the functionality.
|
|
|
|
Attempt to separate public API from internal functions.
|
|
I'd foolishly removed a check in the previous commit that was needed.
refs can be < 0 for static resources.
|
|
When we attempt to insert a key/value pair into the store, we have
to allow for the possibility that a racing thread may have already
inserted an equivalent key/value. We have special code in place to
handle this eventuality; if we spot an existing entry, we take the
existing one in preference to our new key/value pair.
This means that fz_store_item needs to take a new reference to any
existing thing it finds before returning it.
Currently the only store user that is exposed to this possibility
is pdf_image; it spots an existing tile being returned, and was
inadvertently double freeing the key.
|
|
|
|
We were dropping the FREETYPE lock before completing the copy out
of the glyph.
|
|
Add docs for fz_store, fz_image, fz_halftones.
Move fz_item definition into res_store.c as it does not need to be
external.
Rename fz_store_context to fz_keep_store_context to be consistent.
|
|
When inserting an item into the store we check for an identically
keyed item being there already (for instance a pixmap created from
an image I at factor F may find that such a pixmap has already been
inserted). The correct thing to do is to return the old one so we
can use that in preference.
The code was attempting to do this, but was returning a pointer
to the fz_item rather than to the item->val. Fixed here.
|
|
First, fix a couple of the 'alternative formulations' of the
try/catch code in the comments.
Secondly, work around a Mac OS X compiler bug.
|
|
Also, the attempts to keep it up to date were causing race
conditions in multithreading cases.
|
|
On Apple OSs setjmp/longjmp also mess with the signal handlers;
we don't use signals, so we don't need the slowdown this causes.
CLUSTER_UNTESTED as not tested on cluster.
|
|
When detecting a clash when inserting into a hash table (which
should only ever happen in multithreaded cases), we should give
a warning, and return the existing item from the table.
The current code doesn't do this due to a stupid typo. Fixed here.
CLUSTER_UNTESTED as we don't test multithreaded operation in the
cluster.
|
|
Currently, we are in the slightly strange position of having
the PDF specific object types as part of fitz. Here we pull
them out into the pdf layer instead. This has been made possible
by the recent changes to make the store no longer be tied to
having fz_obj's as keys.
Most of this work is a simple huge rename; to help customers who
may have code that use such functions we have provided a sed
script to do the renaming; scripts/rename2.sed.
Various other small tweaks are required; the store used to have
some debugging code that still required knowledge of fz_obj
types - we extract that into a nicer 'type' based function
pointer. Also, the type 3 font handling used to have an fz_obj
pointer for type 3 resources, and therefore needed to know how
to free this; this has become a void * with a function to free
it.
|
|
More changes still to come.
|
|
|