Age | Commit message (Collapse) | Author |
|
|
|
|
|
TODO: Implement visual to logical reordering on the fly when building
the structured text line.
|
|
|
|
|
|
|
|
So it can be used in the filter pdf_processor too.
|
|
|
|
Closing flushes output and may throw exceptions.
Dropping frees the state and never throws exceptions.
|
|
Don't mess with conditional compilation with LARGEFILE -- always expose
64-bit file offsets in our public API.
|
|
Michael has found a crash when scrolling quickly through pages
with gsview. 2 Threads are redrawing at the same time from a
display list. The problem comes when both threads happen to be
trying to draw the same tile from the cache at the same time.
The current code alters the ->{x,y} values of the pixmap from
the cache as it tiles. If 2 threads are using the same tile
at the same time, this causes a race condition which can upset
the clipping calculations and we can access out of range.
The solution is to make a new 'wrapper' fz_pixmap around the
same data, and to alter the x/y values there instead.
We therefore introduce a (hopefully generally useful) function
fz_new_pixmap_from_pixmap, and use that.
|
|
|
|
This is needed so that we can have bgr formatting with
something other than the default sRGB
|
|
The 'producing spots' case is poorly tested, but I believe we
should be keeping the spot information internally, rather than
NULLing it out.
|
|
First, we add an fz_page_overprint function to detect if a
page uses overprint. Only PDF implements this currently (other
formats all return false). PDF looks for '/OP true' in any
ExtGState entry.
We make Mutool check this. If it finds it, and spot rendering
is not completely disabled, then it ensures that the separation
object passed to the pixmap into which we draw is non NULL. This
causes the draw device to do overprint simulation.
We ensure that mutool draw defaults to having the spot rendering
mode default to simulation in builds that support it.
Finally, we ensure that if an output intent is set by the document,
and spot rendering is not completely disabled, then we ensure the
seps object is non NULL so that we render to a group in the
specified output intent, and THEN convert down to the required
colorspace for the output.
This should make us match acrobats behaviour.
|
|
This is a first cut to get us to demo-ability. There will
likely be a few changes as we do a bit more testing with different
scenarios with Gray, RGB, CMYK combos of destination, proof and
output intent ICC profiles.
|
|
|
|
Fixes some issues in Altona test file.
|
|
|
|
Adjust the decode array to allow for the fact that the default
decode is done by the ICC code.
|
|
The proof conversion should only be done after we
have done all our drawing in the separations
group. Fixes issue in page 7 of Altona test.
|
|
|
|
|
|
|
|
Special care is required when the DeviceN color space has
cyan, magenta, yellow or black.
For example, even if we support separations in the destination, if
the color space has CMY or K as one of its colorants and we are
drawing to an RGB or Gray pixmap we will want to do the tint transform.
Also if the pixmap has no seps memember present, we support the
separations if the destination is CMYK and the DeviceN colorspace
has no "Spot" (non-CMYK) colorants.
|
|
This gives us a friendlier interface to zlib.
Simplifies PNG output and PCLM output code.
|
|
Both bandwriter and document_writer interfaces cope with multi
page docs.
Update mudraw to output pclm format too.
Incorporates fixes from Tor.
|
|
This file has a type 3 font in it. It first uses
a 'd1' glyph, that uses a pattern. Accordingly, we
we render that pattern to a mask tile and store that
tile. Then it uses a 'd0' glyph, which uses the same
pattern. The cache is checked, and we erroneously pick
up the cached tile to reuse it - but this is not a
colored rendering, so we assert on plotting.
The fix is to ensure that the required colorspaces
match. This requires us to add the colorspace to the
tile key. Unfortunately, this means that colorspaces
have to become key_storable, so the patch is slightly
larger than would otherwise be the case.
|
|
Make sure any changes to the page tree are always reflected immediately.
The rev_page_map lookup cache exists when we load the outlines in order
to resolve links faster, so we don't need to worry about that one.
The linear_page_refs stuff is more troublesome, so don't mix editing a
PDF with progressive loading!
|
|
|
|
|
|
The code only worked for string literals, not garbage collected or
short strings.
|
|
|
|
|
|
|
|
|
|
Also save link coordinates in outline nodes.
|
|
|
|
Incorporates fixes from Michael: When dealing with spot colors, if the
destination space is pure CMYK and we have unsupported spots we can
do a weighted addition of the spot CMYK colorant like Adobe does
in the PSD image format. If the destination space is RGB we need
to do a traditional color mapping of each pixel.
|
|
|
|
|
|
Incorporates fixes from Michael.
Rather than specifically giving it rgb and cmyk values,
separations now include the colorspace. Conversions can
then be done into ANY colorspace we need.
Note, that we maintain the old way of working for the
gproof device.
Also, fix pdf_page_separations to correctly find all separations.
This involves recursively looking through colorspaces, forms
and shadings for colorspaces therein, making sure we don't run
into any circular references.
We do 2 passes, so that we can pick up as many colorants as Separations
as possible. On the second pass we pick up any colorants we missed in
terms of DeviceN spaces. The purpose of this is to try to ensure that
we get as many tint transforms as single input functions as we can.
This may not be important in the grand scheme of things, but seems
neater.
|
|
If draw device is passed a pixmap with disabled separations, it
may have to push an extra group at the top to allow for the
actual rendering to properly happen in cmyk+spots, and then get
folded down at the end.
This pushing cannot happen at create time, due to it being
dependent on the defualt_cs settings. Accordingly, we push it
(just once) on the first drawing operation.
This means we need to be able to convert from "colorspace + set
of spots" to "different colorspace + different set of spots".
This in turn means we need to be able to drive lcms slightly
differently (to tell it whether to copy the spots unchanged
or not), so we have to amend the CMS interface code a bit for
that.
Currently we lack plotters to properly cope with plotting
images and shades with spots, so this will give a warning and
do nothing. To be filled in in future commits.
Ensure fz_get_icc_link accepts NULL to mean default color params.
Incorporates fixes from Michel Vrhel:
With transparency groups we can have RGB + spot pixmaps. When
drawing into those we need a mixture of colorant polarity. Ensure
that fz_convert_separation_colors takes account of this.
Fix C1 of Altona_Technical_1v1_x3.pdf (allow for output intent in
fz_clone_pixmap_area_with_different_seps).
|
|
|
|
|
|
Use fz_stext_char directly instead.
|
|
|
|
Fix color PCL writing bugs introduced when making alpha channels
in pixmaps optional.
|
|
Option parsing is not implemented yet.
|
|
For non-rotated text, this vector will always be [1 0].
|