Age | Commit message (Collapse) | Author |
|
|
|
Avoid the C++ code complaining about casting string literals
to non-const char *'s.
|
|
Conflicts:
Makefile
apps/mudraw.c
pdf/pdf_write.c
win32/libmupdf-v8.vcproj
|
|
|
|
|
|
Conflicts:
pdf/mupdf-internal.h
pdf/pdf_font.c
|
|
|
|
Generate example data appropriate to the type of field.
|
|
|
|
Instead of using macros for min/max/abs/clamp, we move to using
inline functions. These are more typesafe, and should produce
equivalent code on compilers that support inline (i.e. pretty much
everything we care about these days).
People can always do their own macro versions if they prefer.
|
|
Mudraw is updated so when the -j flag is used it guesses the length
of the text it should output for each field. It also outputs a
"Lorem Ipsum" string, which should hopefully test the layout
facilities a bit better.
Mujstest is updated so it can read the escaped chars from that
string.
|
|
|
|
Rather than having a dedicated call to enumerate the rectangles for the
annotations on a page, add an interface for enumerating annotations
with accessor functions. Currently the only accessor function is
the one to get the annotation rectangle.
Use this new scheme in place of fz_bound_annots within mudraw.
Also use this scheme to set the caret cursor in the viewer when over
a data field.
|
|
We add a new fz_bound_annots function (and associated pdf_bound_annots
function) that calls a given callback with the page rectangle of the
annotations on a given page. This is marked as being a 'temporary'
function, so we can remove it/change it in future if required. It
seems likely that we'll want to have some sort of 'iterate over
annotations' function eventually, and this does the job for now.
Add a -j flag to mudraw that outputs a simple mujstest script.
For each page with annotations, the script jumps to that page, then
for each annotation on the page, it sets some text to be entered,
and clicks the annotation. In the case of text fields, this will cause
the text to be entered into that text field; in the case of buttons
it will execute the button.
At the end of each page with annotations, the script is told to
snapshot the page.
These test scripts are not designed to be full tests, but they do
at least provide an easy way for us to generate scripts where
every field in our test suite is interacted with.
|
|
Make mudraw pass a cookie in to the rendering procedures. If any errors
are reported for any page, remember this, and set the return code to 1
on exit.
|
|
|
|
Also make page specification parsing in all tools look similar.
|
|
|
|
|
|
|
|
Currently the colorspace is selected on detecting -g, but may
then be overridden based on the filename; the -g option should
be given priority so the fix is simply to move the check for
-g down a few lines.
Thanks to James Cloos for spotting the problem and suggesting
the fix.
|
|
If -w and/or -h are used at the same time as -r, then treat -w and -h
as maximum width/height rather than absolute width/height.
|
|
|
|
Also tidy up the taking of fz_context *'s, and hide an unwanted indent
param.
|
|
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
|
|
|
|
|
|
Exact width or height values can now be specified to mudraw for output
bitmaps. If both are specified the the largest scaling consistent
with the aspect ratio not exceeding the given width or height is used,
unless the -f flag is specified too, in which case the aspect ratio
is ignored and the output 'fits' exactly.
|
|
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.
|
|
|
|
Make fz_clone_context copy existing AA settings.
Add accessor function for fz_bitmap.
Add more documentation for various functions/types.
|
|
|
|
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.
|
|
All in one command line replacement for muxpsdraw and mupdfdraw.
|