summaryrefslogtreecommitdiff
path: root/src/cairo-path-stroke.c
AgeCommit message (Collapse)AuthorFilesLines
2006-04-18Merge branch 'cairo' into new-sub-pathCarl Worth1-14/+41
Conflicts: src/cairo-path-stroke.c src/cairo-pdf-surface.c src/cairo-ps-surface.c
2006-04-14Fix skipping zero length dash segments in dash_start.Jeff Muizelaar1-1/+5
The extra check makes sure zero length segments are not skipped when computing the dash start state. This is needed so that we get proper line capping if, for example, the first dash segment has zero length and we have a dash offset of zero.
2006-04-13Move the test for zero length sub edges below the computation of faces.Jeff Muizelaar1-7/+7
Face computation still works if a line has zero length, all that is needed is a slope and a point. This patch fixes bug #5561 because the faces are initialized even if the segment has zero length as expected by _cairo_stroker_line_to_dashed.
2006-04-13Move calculation of slope outside of _cairo_stroker_add_sub_edge.Jeff Muizelaar1-7/+12
This makes the slope calculation more accurate for dashed lines by computing it once for the entire line instead for each individual dash segment. It also adjusts stroker_line_to() to match the new convention for stroker_add_sub_edge().
2006-04-13Check for zero length dashed lines.Jeff Muizelaar1-1/+9
This makes line_to_dashed more like line_to by returning immediately on degenerate paths. This is needed so that we can do the slope calculation for the entire line.
2006-04-10Reset dashing for new subpaths.Jeff Muizelaar1-1/+11
Fixes the bug mentioned in b87726ee2aa0220b66ee4d97513c0ac89ffc4621 by reseting the dash pattern for each new subpath. This is correct behaviour according to the end of PDF Reference v1.6 section 4.3.2. This commit now makes the dash-caps-joins test case pass for all backends except for the PostScript backend.
2006-02-23cairo_new_sub_path: Making cairo_arc easier to use and more.Carl Worth1-18/+6
This adds a new function which has as its only effect the elimination of the current point. This makes it much easier to use the various cairo_arc calls when the initial line_to is not actually desired. This function also unifies and generalizes the long-existing behavior of cairo_line_to being treated as cairo_move_to when there is no current point. With the addition of cairo_new_sub_path this becomes a documented feature with similar behavior in cairo_curve_to as well.
2005-11-04Rework support in the surface backend for the five basic drawing operations ↵Carl Worth1-92/+50
(paint, mask, stroke, fill, and show_glyphs). Now, all 5 operations have backend functions, and all use a consistent convention for argument naming and ordering. The old fill_path has been replaced with a new fill. The old show_glyphs function was recently renamed to old_show_glyphs and has not yet been ported to the new show_glyphs, (so all backends have a NULL show_glyphs function). In fact, of the 5 new backend functions, fill is the only one that has an implementation in any backend. As part of this cleanup a new cairo_stroke_style_t object is introduced to capture the many settings unique to the stroke operation, (line_width, line_cap, line_join, miter_limit, dash, num_dashes, and dash_offset). Track changes in surface backend from fill_path to fill. Track the new canonical argument naming and ordering for the 5 drawing operations. Move various stroke style settings into new cairo_stroke_style_t. Drop NULL fill_path backend function which no longer exists.
2005-10-31Originally 2005-10-28 Keith Packard <keithp@keithp.com>:Carl Worth1-62/+123
Remove pen_regular field from the gstate. Move stroke fallback from gstate to surface where it belongs. Eliminate dependence on cairo_gstate_t object. Fix to include just cairo-clip-private.h rather than cairo-gstate.private.h.
2005-09-27Note that bug #4409 (Dashes are missing initial caps) is now fixed.Carl Worth1-16/+35
Move face-flipping from inside _cairo_stroker_add_caps to new _cairo_stroker_add_leading_cap variant of _cairo_stoker_add_cap. Change to call _cairo_stroker_add_leading_cap or _cairo_stroker_add_trailing_cap as appropriate. Remove dash-caps-joins from the XFAIL list and add reference image.
2005-09-16Prefer cairo_bool_t, TRUE, and FALSE over int, 1, and 0.Carl Worth1-9/+9
2005-09-16Tested by: John Ellson Closes bug #4408 ↵Carl Worth1-1/+75
https://bugs.freedesktop.org/show_bug.cgi?id=4408 Add support for dashed splines. (The antialiasing quality isn't perfect, but at least the curves are dashed now).
2005-08-23Fix for bug #4205:Carl Worth1-20/+35
Abstract the cap-addition code from the end of the stroke operation into a new _cairo_stroker_add_caps function. Call the new _cairo_stroker_add_caps at the beginning of every move_to so that we get caps on every subpath and not just the last one.
2005-03-23Remove unneeded includes of cairo-path-fixed-private.h.Carl Worth1-1/+0
Fix indentation.
2005-03-23Rename cairo_path_real_t to cairo_path_fixed_t and fix all _cairo_path ↵Carl Worth1-17/+17
functions to be named as _cairo_path_fixed functions. Track name change of cairo_path_real_t and _cairo_path_fixed functions.
2005-03-23Begin the process of breaking up cairoint.h, moving structure definitions of ↵Carl Worth1-0/+3
cairo_t, cairo_gstate_t, and cairo_path_real_t into their own header files. Track changes to header files, reaching into the new private headers where necessary.
2005-03-18* src/cairo.c: (cairo_copy_path), (cairo_copy_path_flat), ↵Carl Worth1-1/+3
(cairo_append_path): Rename cairo_copy_path_data, cairop_copy_path_data_flat, and cairo_append_path_data to cairo_copy_path, cairo_copy_path_flat, and cairo_append_path. Add new cairo_path_t, containing a cairo_path_data_t array and an explicit length. Remove CAIRO_PATH_END_PATH terminator from cairo_path_data_t. Rename the internal path object from cairo_path_t to cairo_path_real_t.
2005-02-22Switch from broken cworth@isi.edu address to canonical cworth@cworth.org ↵Carl Worth1-1/+1
address.
2004-10-21Convert all files to utf-8. Add copyright information to cairo_png_surface.c.Carl Worth1-1/+1
2004-09-04Add the MPL as a new license option, in addition to the LGPL.Carl Worth1-10/+27
2004-08-02Fix to explicitly refer to GNU Lesser Public License 2.1 rather than the ↵Carl Worth1-7/+5
Library Public License version 2 or 'any later version'
2004-08-02Change from MIT license to LGPL.Carl Worth1-20/+14
2004-02-12Add typedefs for new callbacks to be used by cairo_current_path: ↵Carl Worth1-60/+47
cairo_move_to_func, cairo_line_to_func, cairo_curve_to_func, and cairo_close_path_func. cairo_path.last_move_point and cairo_path.current_point are now fixed-point not doubles for consistency. Now accept 4 explicit function pointers rather than a structure. Eliminate unnecessary done_path callback. Track change in _cairo_path_interpret. Code previously in done_path callback is now here immediately after call to _cairo_path_interpret. Internal _cairo_path API modified to accept fixed-point data everywhere. Much cleaner this way. Have to convert doubles to fixed-point to track changes in _cairo_path API. Keep data in fixed-point rather than going through intermediate doubles. Track changes in _cairo_path API. New function to help when working with freetype.
2004-01-24Fix to use tessellate_polygon instead of tessellate_rectangle as the matrix ↵Carl Worth1-6/+19
may have skewed the coordinates into a non-rectangular shape.
2003-12-08Clean up cairo_path_callbacks to have move_to, line_to, curve_to, abd ↵Carl Worth1-97/+156
close_path instead of add_edge, add_spline, and done_sub_path. Much, much nicer. Provide cairo_polygon_move_to and cairo_polygon_line_to instead of cairo_polygon_add_point. Track change in cairo_polygon interface.
2003-11-21Use 0 and 1 not False and True, (to avoid false dependency on X headers).Carl Worth1-1/+1
Use cairo_point_double_t not XPointDouble, (to avoid false dependency on X headers). Thanks to "Sasha V." <sasha@aftercode.net> for pointing these out.
2003-10-23Fixed copyright attribution to refer to "University of Southern CaliforniaCarl Worth1-1/+1
2003-10-04Generate convex hull of pen before stroking.Carl Worth1-2/+2
2003-10-04Remove abbreviation of "point" as "pt". Fix cairo_destrot, ↵Carl Worth1-27/+27
cairo_set_target_surface, and cairo_set_target_image to act appropriately in the face of non-zero status.
2003-09-27Fixed some internal enums that had been mistakenly converted to lowercase at ↵Carl Worth1-4/+4
some point.
2003-09-05Preliminary support for running Cairo with X servers without the Render ↵Carl Worth1-16/+16
extension. This is still horribly slow. Removed many uses of X-specific macros, (eg. XDoubleToFixed)
2003-09-05comment face computations, check for reflecting transformation to select ↵Keith Packard1-25/+40
correct face orientations check for reflecting transform when computing pen to ensure consistent pen orientation
2003-09-04added comments describing miter join code and miter limit computation. ↵Keith Packard1-26/+74
Replace XFoo with cairo_foo for double and fixed add cairo_fixed_to_double and cairo_double_to_fixed Carl says he's got similar code, so he'll have to fix things if I get this committed quickly enough.
2003-08-26Added missing underscores to several internal functions.Carl Worth1-10/+10
2003-07-30Made all changes necessary to abandon the Xc library, (sucking the ↵Carl Worth1-33/+35
functionality up into cairo_surface_t instead). Eliminated most of the remaining X datatypes (XFixed, XPointFixed, XLineFixed, XTrapezoid). Fixed some numerical problems relating to pen initialization and intersection calculation.
2003-07-18Fixed some inconsistent tag/typedef names I missed the first time.Carl Worth1-19/+19
2003-07-18Renamed everything from Xr* to cairo_*Carl Worth1-0/+715