summaryrefslogtreecommitdiff
path: root/draw/draw_affine.c
AgeCommit message (Collapse)Author
2012-06-11Fix Bug 693102: Overflows in large pixmap indexing.Robin Watts
When we allocate a pixmap > 2G, but < 4G, the index into that pixmap, when calculated as an int can be negative. Fix this with various casts to unsigned int. If we ever move to support >4G images we'll need to rejig the casting to cast each part of the element to ptrdiff_t first.
2012-05-09Bug 693021: Texture position overflow problems.Robin Watts
Keep texture position calculations in floats as long as possible, as prematurely dropping back to ints can cause overflows in the intermediate stages that don't nicely cancel out. The fix for this makes 2000 or so bitmap differences, most trivial, but with some progressions.
2012-04-20Bug 692995: Fix hang when rendering image.Robin Watts
Once the shape was combined with the image in the file in question the width/height drop to be below zero. Detect this case and bale. File rendering looks fine.
2012-03-16Bug 692805: BBox rounding issuesRobin Watts
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.
2012-03-06Split fitz.h/mupdf.h into internal/external headers.Robin Watts
Attempt to separate public API from internal functions.
2012-01-20Flip images the right side up in the PDF interpreter.Tor Andersson
This way both pixmaps for rendering and image data are top-down.
2011-12-30Fix typo in draw/draw_affine.c causing offsetting of shape planeRobin Watts
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.
2011-12-24Fix (part of) bug 69293 - typos in draw_affine for shape code.Robin Watts
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.
2011-12-24Bug 692489 - fix SEGV in non-isolated/knockout blendingRobin Watts
Restrict images to the size of the shape when blending back. This seems to solve the problem; leaving code disabled until full tests complete.
2011-12-08Stylistic changes when testing pointer values for NULL.Tor Andersson
Also: use 'cannot' instead of 'failed to' in error messages.
2011-11-14Grid fitting tweaks.Robin Watts
Extract the grid fitting code from the scaling code and the affine image drawing code into it's own separate function. This reduces code duplication. It also allows us to make better allowance for rounding errors. Add a voodoo offset in the draw_affine.c code for painting interpolated images. This gives us the best possible match between all the different combinations of scaled/unscaled and interpolated/uninterpolated images.
2011-08-06Cosmetic style fixes.Tor Andersson
2011-07-13Non-isolated group support, and fix Bug 692336.Robin Watts
Firstly, this takes on some of Zenikos patch to correct the clip stack handling that was broken by the fix to bug 692287 (in commit 2c3bbbf). This bug should now be solved. We add a new 'shape' field to the draw device structure (and clip stack). When we are inside non-isolated groups, this is set to be a pixmap where we accumulate the 'shape' of the objects drawn. When we come to blend back, if we are blending a non-isolated group back, we have to use a different blending function that takes account of the shape. Various internal groups (the page group, and groups used to force blending) are set to be isolated to avoid carrying shape planes around when this is not required. All our rendering code now has to know how to maintain the shape plane as well as doing the basic rendering.
2011-04-06Add special case gray image -> rgb device rendering code.Robin Watts
New code to render grayscale images on an rgb device without converting to rgb first.
2011-04-04Le Roi est mort, vive le Roi!Tor Andersson
The run-together words are dead! Long live the underscores! The postscript inspired naming convention of using all run-together words has served us well, but it is now time for more readable code. In this commit I have also added the sed script, rename.sed, that I used to convert the source. Use it on your patches and application code.
2011-04-04draw: Rename files in draw directory.Tor Andersson