Commit graph

18 commits

Author SHA1 Message Date
Chris Wilson
ae25f1c360 Alter definition of cairo_composite_rectangles_t
This is a more useful definition that is able to individually track the
rectangles that compose the composite operation. This will be used by
the specialist compositors as a means to perform the common extents
determination for an operation.
2010-01-22 23:01:51 +00:00
Chris Wilson
3f12d9ec5d [clip] Use geometric clipping for unaligned clips
For the simple cases where the clip is an unaligned box (or boxes), apply
the clip directly to the geometry and avoid having to use an intermediate
clip-mask.
2009-08-29 08:08:33 +01:00
Chris Wilson
813cbf13dd [path] Separate the approx. bounds into 3 distinct functions
Based on feedback from Jeff Muizelaar, there is a case for a very quick
and dirty extents approximation based solely on the curve control points
(for example when computing the clip intersect rectangle of a path) and
by moving the stroke extension into a core function we can clean up the
interface for all users, and centralise the logic of approximating the
stroke extents.
2008-12-18 14:55:20 +00:00
Chris Wilson
dea40e61ba [path] Return the fixed-point bounds of the path
When analysing the stroke extents, we need the original fixed-point
extents so that we do not incur an OBO when we round-to-integer a second
time. We also need a more accurate estimate than simply using the control
points of the curve, so pass in tolerance and decompose until someone
discovers a cheaper algorithm to determine the precise aligned bounding
box of a bezier curve.
2008-12-18 12:06:47 +00:00
Chris Wilson
bcb2724920 [path] Mark points as const during _cairo_path_fixed_interpret()
Use const to document the read-only nature of the arguments passed to the
callbacks.
2008-12-12 11:11:49 +00:00
M Joonas Pihlaja
4b227143b3 [cairo-spans] Introduce a type to track which pixels combine in a compositing op.
A cairo_composite_rectangles_t contains the coordinates of rectangular
windows into each of the source pattern, mask, clip and destination
surface containing the pixels that will combine in a compositing
operation.  The idea is to have a uniform way to represent all the
translations involved rather than overloading parameters like src_x/y,
dst_x/y, etc., sometimes with different incompatible meanings across
functions.
2008-12-06 14:04:35 +02:00
Chris Wilson
4b29988939 Review users of cairo_rectangle_int_t for incorrect unsigned promotion.
Adrian Johnson discovered cases where we mistakenly compared the result
of unsigned arithmetic where we need signed quantities. Look for similar
cases in the users of cairo_rectangle_int_t.
2008-10-30 16:19:38 +00:00
Chris Wilson
0e4156121f [rectangle] Fix unsigned promotion whilst computing intersect.
_cairo_rectangle_intersect() incorrectly allows unsigned promotion during
its arithmetic.
2008-10-30 16:19:26 +00:00
Behdad Esfahbod
2a3eec1731 [cairo-rectangle] Add new convenience functions for working with cairo_box_t
_cairo_box_from_doubles, _cairo_box_to_doubles, _cairo_box_from_rectangle.
2008-05-09 15:54:11 +02:00
Carl Worth
1489e66d25 Quiet a more subtle potentially-uninitialized warning
The compiler isn't clever enough to notice that these
variables are always initialized.
2008-04-01 14:49:03 -07:00
Vladimir Vukicevic
bf1f7f70b6 Do correct calculation of pen dimensions for stroke optimization 2008-02-06 13:07:13 -08:00
Vladimir Vukicevic
1d93e14876 Followup patch to dashed stroke optimization
Make sure that we don't test lines that start or end inside the box,
since our algorithm will find intersections on the wrong ends on the
line, and not count them.
2008-02-05 16:14:51 -08:00
Vladimir Vukicevic
4471e58c12 Optimize dashed strokes, part 2
Pass down the bounding box to the stroker, and avoid doing expensive
calculations for dash segments that are outside the box.
2008-02-05 15:04:28 -08:00
Behdad Esfahbod
0d898f2bad [doc] Make sure all type names in docs are prefixed by # 2008-01-28 20:49:44 -05:00
Vladimir Vukicevic
be3516335c [fixpt] Replace cairo_rectangle_int16_t with cairo_rectangle_int_t
Mostly s/cairo_rectangle_int16_t/cairo_rectangle_int_t/,
as well as definitions to pick cairo_rectangle_int_t.
2007-07-18 22:45:21 +02:00
Carl Worth
746f66c3fc Fix bogus cairo_rectangle_fixed_t to be cairo_rectangle_int16_t.
This rectangle has regular integer values, not fixed-point values.
So the old name was horribly wrong and misleading, (and yes I think
it was even I that had suggested it).
2006-06-06 16:54:03 -07:00
Carl Worth
00592e0757 Remove trailing whitespace from lines with a single brace.
This patch was produced with the following (GNU) sed script:

	sed -i -r -e '/^[ \t]*[{}][ \t]*/ s/[ \t]+$//'

run on all *.[ch] files within cairo.
2006-06-06 15:38:58 -07:00
Carl Worth
28d47d332a Move rectangle functions to new cairo-rectangle.c 2006-06-05 14:25:22 -07:00