Carl Worth
e7e4a03dd3
get-path-extents: Fix APPROX_EQUALS to round values on both sides of the comparison
2008-02-28 16:39:42 -08:00
Carl Worth
602489b150
get-path-extents: Use APPROX_EQUALS instead of EQUALS for text path tests
...
This is done grudgingly due to freetype rounding the coordinates
of the extents when hinting is enabled.
2008-02-28 16:33:51 -08:00
Carl Worth
50a6fe1a2a
Remove unnecessary cairo_set_tolerance call from get-path-extents test
2008-02-28 16:32:55 -08:00
Behdad Esfahbod
ecb54b9696
[test/get-path-extents] Don't use short-circuit && operators
...
That causes some tests to be skipped if the preceding test failed.
2008-02-25 19:48:58 -05:00
Behdad Esfahbod
be316b7cfa
[test]/get-path-extents] Use %g instead of %f to print doubles
2008-02-25 19:36:44 -05:00
Antoine Azar
5e9cdcca00
Fixed rounding function call
2008-02-08 00:19:57 -05:00
Azar@.(none)
4c005f7ce3
replaced round with _cairo_lround. Round doesn't compile on Win32
2008-02-06 00:27:57 -05:00
Carl Worth
47cf7ed769
Test and document that fill rule has no effect on cairo_path_extents
2008-01-21 16:45:41 -08:00
Carl Worth
c480eedbb5
Test and document extents of degenerate "dots"
...
It's a common idiom to stroke degenerate sub-paths made with
cairo_move_to(x,y);cairo_rel_line_to(0,0) to draw dots. Test
that we get the desired extents from cairo_fill_extents,
cairo_stroke_extents, and cairo_path_extents for these cases.
Also document that the cairo_path_extents result is equivalent
to the limit of stroking with CAIRO_LINE_CAP_ROUND, (so that
these "dot" points are included), as the line width
approaches 0.0 .
2008-01-21 14:56:21 -08:00
Carl Worth
55e0dddf04
Add cairo_path_extents testing to several cases missing it
...
With these degenerate shapes, cairo_path_extents still returns
a zero-area rectangle, but with a non-zero offset.
2008-01-21 14:45:06 -08:00
Carl Worth
c15cab8b68
Correct near-pangram to be an actual pangram
...
This wasn't affecting the test quality at all, but it did annoy
me to see this mistake.
2008-01-21 13:34:53 -08:00
Carl Worth
ed695bdb9b
Define repeated string literal once
2008-01-21 13:33:46 -08:00
Brian Ewins
4177208be6
[cairo] Add cairo_path_extents()
...
This new function gets the extents of the current path, whether
or not they would be inked by a 'fill'. It differs from
cairo_fill_extents() when the area enclosed by the path is 0.
Includes documentation and updated test.
2008-01-21 12:04:32 -08:00
Chris Wilson
7b1a0eddac
[test/get-path-extents] Exercise cairo_scaled_font_text_extents()
...
Compare cairo_scaled_font_text_extents() to cairo_text_extents() in
order to provide test coverage of cairo_scaled_font_text_extents().
2008-01-17 13:51:21 +00:00
Chris Wilson
dd13a00541
[test/get-path-extents] Check extents of degenerate paths.
...
Ensure that degenerate paths have zero extents.
2008-01-17 11:50:32 +00:00
Chris Wilson
3bf06c3366
[test/*] Create new surfaces using the group target.
...
cairo_get_target() returns the original surface passed to
cairo_create(), and not the current destination as required when
testing drawing to the same surface using multiple contexts.
For completeness we also use the group target when creating similar
surfaces within the tests (to check that similar surfaces of similar
surfaces also work).
2007-12-20 21:21:32 +00:00
Chris Wilson
bb6d36561c
[test/get-path-extents] Add link to bug report.
...
Add a link to the original bug report for the broken extents with arcs.
[http://bugs.freedesktop.org/show_bug.cgi?id=7245 ]
2007-10-27 17:29:54 +01:00
Chris Wilson
abe1b89da4
[test/get-path-extents] Test extents of cairo_text_path().
...
Check that the text path extents match the computed metrics.
2007-09-27 16:14:02 +01:00
Chris Wilson
0618818f7a
[test/get-path-extents] Test extents of an arc.
...
Add the test case from bug 7245,
https://bugs.freedesktop.org/show_bug.cgi?id=7245 .
2007-09-26 14:40:36 +01:00
Behdad Esfahbod
c6a067f967
[test] Add test case for bug #7965 to the get-path-extents test
2007-02-21 11:50:24 -05:00
Robert O'Callahan
191e108b93
Add clip getters API + tests
...
Add new public API methods:
void cairo_clip_extents (cairo_t *cr, double *x1, double *y1,
double *x2, double *y2);
cairo_rectangle_list_t *cairo_copy_clip_rectangles (cairo_t *);
void cairo_rectangle_list_destroy (cairo_rectangle_list_t *);
Also add 'get-clip' and 'get-path-extents' tests.
2006-09-25 23:22:45 -07:00