summaryrefslogtreecommitdiff
path: root/draw/draw_path.c
AgeCommit message (Collapse)Author
2012-07-18Remove pointless test.Robin Watts
Variable i can never be zero at this point. The desired point of testing against i was to ensure that the test did not evaluate true at the first run, and the other parts of the condition are sufficent to ensure this, so just remove the test on i.
2012-07-05Move to static inline functions from macros.Robin Watts
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.
2012-04-23Fix whitespace and indentation.Tor Andersson
2012-04-19Bug 692990: Fix 'underjoin' of strokes.Robin Watts
See Bug 688655 for analysis of what we SHOULD be doing. The code changes to do this are actually quite small. Essentially, when we join we only draw the 'top' (or 'outer') join in a join dependent way. The 'under' join was always joined as a bevel before as this was easy. This produces bad effects when the lines have a significant angle between them and a large linewidth. The correct (i.e. matching Acrobat and others) way to work is to join the bottom of the line via the centre point. The sole exception to this is when drawing under beziers, as we don't want to make our approximation-by-lines obvious. All fixed in this patch.
2012-03-06Split fitz.h/mupdf.h into internal/external headers.Robin Watts
Attempt to separate public API from internal functions.
2012-02-03Remove extraneous blank lines.Tor Andersson
2012-01-23Do XPS mitering properly.Robin Watts
Modified version of Sumatras patch. Thanks for this.
2012-01-12Support proper XPS mitering. (And stroke fixes).Robin Watts
XPS differs from PS/PDF/etc in the way it handles miters; rather than simply converting a miter that's overly long to a bevel, it truncates it at the miter limit. As such it needs to be handled correctly. For clarity, expose new enumerated types for linejoins and linecaps, and use these throughout code. When we upgrade our freetype, we can move to using proper xps mitering in that too. Add new fz_matrix_max_expansion function to return a safer expansion value that works in the case where we scale up in one direction and down in another. In the xps path drawing code, avoid generating unnecessary linetos. Thanks to Zeniko for spotting these and providing implementations.
2012-01-09Fix Bug 692356 (comment #2)Robin Watts
Take on a modified version of Zenikos patch; only take the quick exit if the whole dash length is small, or if the dash_length scaled up by the maximum possible scale in the ctm is less than 1/2 a pixel.
2011-09-21Add warning context.Tor Andersson
2011-09-02Fix bug 692356: use stricter limit for dash pattern lengths.Tor Andersson
2011-09-02Fix minor regression in fix for zero-length line segment dots.Tor Andersson
2011-09-01Only draw dots for zero-length line segments with round line caps.Tor Andersson
2011-04-11Add triangle caps; separate start, dash and end cap styles for XPS.Tor Andersson
2011-04-07Check for zero length dash arrays.Tor Andersson
2011-04-05Add wrapper functions around device calls.Tor Andersson
They test for NULL and make the code look nicer.
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