summaryrefslogtreecommitdiff
path: root/src/cairo-rectangle.c
Commit message (Collapse)AuthorAgeFilesLines
* stroke: Make the incremental trapezoid stroker optionally available againChris Wilson2013-01-031-1/+1
| | | | | | | | | | | Whilst it cannot handle self-intersecting strokes (which includes the antialias region of neighbouring lines and joints), it is about 3x faster to use than the more robust algorithm. As some backends delegate the rendering, the quality may still be preserved and so they should be responsible for choosing the appropriate method for generation of the stroke geometry. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* stroke: Remove redundant code for computing culling extentsChris Wilson2012-10-031-14/+2
| | | | | | Same code repeated! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* Split cairo-box-privates into struct+inlinesChris Wilson2012-04-191-1/+1
| | | | | References: https://bugs.freedesktop.org/show_bug.cgi?id=48577 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* rectangle: Fix warningAndrea Canciani2011-10-261-1/+2
| | | | | | | | | | | | In 545f3085.. the cairo_spline_add_point_func_t type was modified to accept the tangent in the point, but cairo-rectangle.c was not updated accordingly. Fixes: cairo-rectangle.c: In function '_cairo_box_add_curve_to': cairo-rectangle.c:297:11: warning: passing argument 1 of '_cairo_spline_bound' from incompatible pointer type
* API: map-to-image and create-similar-imageChris Wilson2011-07-261-0/+10
| | | | | | | | | | | | | | | | A common requirement is the fast upload of pixel data. In order to allocate the most appropriate image buffer, we need knowledge of the destination. The most obvious example is that we could use a shared-memory region for the image to avoid the transfer cost of uploading the pixels to the X server. Similarly, gl, win32, quartz... The other side of the equation is that for manual modification of a remote surface, it would be more efficient if we can create a similar image to reduce the transfer costs. This strategy is already followed for the destination fallbacks and this merely exposes the same capability for the application fallbacks. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* record: Store the untransformed operation extents along with the commandChris Wilson2011-07-261-0/+7
| | | | | | | | | This allows us to actually clip out the geometry before we record it, as suggested by allowing the user to supply an extents... But it will be advantageous in later patches for reducing the amount of work we need to perform to replay. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* box: Add _cairo_box_add_curve_toAndrea Canciani2010-10-291-0/+29
| | | | | Add a function to extend a box with the extents of a curve_to operation.
* box: Add box headerAndrea Canciani2010-10-291-9/+2
| | | | | | | Add a new header implementing very simple box functions: - initialization with the two extrema - extension with a point - in/out test
* Add _cairo_rectangle_unionAndrea Canciani2010-10-121-0/+23
| | | | | Implement _cairo_rectangle_union(), a function to compute a rectangle containing two input rectangles.
* Update FSF addressAndrea Canciani2010-04-271-1/+1
| | | | | | | | | | | I updated the Free Software Foundation address using the following script. for i in $(git grep Temple | cut -d: -f1 ) do sed -e 's/59 Temple Place[, -]* Suite 330, Boston, MA *02111-1307[, ]* USA/51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA/' -i "$i" done Fixes http://bugs.freedesktop.org/show_bug.cgi?id=21356
* Alter definition of cairo_composite_rectangles_tChris Wilson2010-01-221-21/+0
| | | | | | | 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.
* [clip] Use geometric clipping for unaligned clipsChris Wilson2009-08-291-0/+23
| | | | | | 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.
* [path] Separate the approx. bounds into 3 distinct functionsChris Wilson2008-12-181-10/+0
| | | | | | | | | 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.
* [path] Return the fixed-point bounds of the pathChris Wilson2008-12-181-0/+10
| | | | | | | | | 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.
* [path] Mark points as const during _cairo_path_fixed_interpret()Chris Wilson2008-12-121-3/+3
| | | | | Use const to document the read-only nature of the arguments passed to the callbacks.
* [cairo-spans] Introduce a type to track which pixels combine in a ↵M Joonas Pihlaja2008-12-061-0/+21
| | | | | | | | | | | | 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.
* Review users of cairo_rectangle_int_t for incorrect unsigned promotion.Chris Wilson2008-10-301-1/+5
| | | | | | 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.
* [rectangle] Fix unsigned promotion whilst computing intersect.Chris Wilson2008-10-301-14/+17
| | | | | _cairo_rectangle_intersect() incorrectly allows unsigned promotion during its arithmetic.
* [cairo-rectangle] Add new convenience functions for working with cairo_box_tBehdad Esfahbod2008-05-091-1/+34
| | | | _cairo_box_from_doubles, _cairo_box_to_doubles, _cairo_box_from_rectangle.
* Quiet a more subtle potentially-uninitialized warningCarl Worth2008-04-011-1/+1
| | | | | The compiler isn't clever enough to notice that these variables are always initialized.
* Do correct calculation of pen dimensions for stroke optimizationVladimir Vukicevic2008-02-061-1/+1
|
* Followup patch to dashed stroke optimizationVladimir Vukicevic2008-02-051-2/+8
| | | | | | 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.
* Optimize dashed strokes, part 2Vladimir Vukicevic2008-02-051-0/+94
| | | | | Pass down the bounding box to the stroker, and avoid doing expensive calculations for dash segments that are outside the box.
* [doc] Make sure all type names in docs are prefixed by #Behdad Esfahbod2008-01-281-4/+4
|
* [fixpt] Replace cairo_rectangle_int16_t with cairo_rectangle_int_tVladimir Vukicevic2007-07-181-5/+5
| | | | | Mostly s/cairo_rectangle_int16_t/cairo_rectangle_int_t/, as well as definitions to pick cairo_rectangle_int_t.
* Fix bogus cairo_rectangle_fixed_t to be cairo_rectangle_int16_t.Carl Worth2006-06-061-5/+5
| | | | | | 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).
* Remove trailing whitespace from lines with a single brace.Carl Worth2006-06-061-1/+1
| | | | | | | | 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.
* Move rectangle functions to new cairo-rectangle.cCarl Worth2006-06-051-0/+85