summaryrefslogtreecommitdiff
path: root/test/get-path-extents.c
AgeCommit message (Collapse)AuthorFilesLines
2009-05-15[test] Relax APPROX_EQUALS conditionChris Wilson1-4/+4
The bounding box of the text is rounded to the nearest pixel boundaries, so therefore the test must accept a similar level of imprecision.
2009-03-24[test] Check for errors during get-path-extents.Chris Wilson1-0/+9
Need to check that an error was not raised on the context before checking whether the extents match expectations.
2008-10-31[test] Build test suite into single binary.Chris Wilson1-14/+6
Avoid calling libtool to link every single test case, by building just one binary from all the sources. This binary is then given the task of choosing tests to run (based on user selection and individual test requirement), forking each test into its own process and accumulating the results.
2008-08-13[test] Preparatory work for running under memfault.Chris Wilson1-62/+64
In order to run under memfault, the framework is first extended to handle running concurrent tests - i.e. multi-threading. (Not that this is a requirement for memfault, instead it shares a common goal of storing per-test data). To that end all the global data is moved into a per-test context and the targets are adjusted to avoid overlap on shared, global resources (such as output files and frame buffers). In order to preserve the simplicity of the standard draw routines, the context is not passed explicitly as a parameter to the routines, but is instead attached to the cairo_t via the user_data. For the masochist, to enable the tests to be run across multiple threads simply set the environment variable CAIRO_TEST_NUM_THREADS to the desired number. In the long run, we can hope the need for memfault (runtime testing of error paths) will be mitigated by static analysis. A promising candidate for this task would appear to be http://hal.cs.berkeley.edu/cil/.
2008-02-28get-path-extents: Fix APPROX_EQUALS to round values on both sides of the ↵Carl Worth1-1/+6
comparison
2008-02-28get-path-extents: Use APPROX_EQUALS instead of EQUALS for text path testsCarl Worth1-3/+9
This is done grudgingly due to freetype rounding the coordinates of the extents when hinting is enabled.
2008-02-28Remove unnecessary cairo_set_tolerance call from get-path-extents testCarl Worth1-1/+0
2008-02-25[test/get-path-extents] Don't use short-circuit && operatorsBehdad Esfahbod1-81/+62
That causes some tests to be skipped if the preceding test failed.
2008-02-25[test]/get-path-extents] Use %g instead of %f to print doublesBehdad Esfahbod1-1/+1
2008-02-08Fixed rounding function callAntoine Azar1-1/+1
2008-02-06replaced round with _cairo_lround. Round doesn't compile on Win32Azar@.(none)1-1/+1
2008-01-21Test and document that fill rule has no effect on cairo_path_extentsCarl Worth1-0/+49
2008-01-21Test and document extents of degenerate "dots"Carl Worth1-0/+28
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-21Add cairo_path_extents testing to several cases missing itCarl Worth1-4/+8
With these degenerate shapes, cairo_path_extents still returns a zero-area rectangle, but with a non-zero offset.
2008-01-21Correct near-pangram to be an actual pangramCarl Worth1-1/+1
This wasn't affecting the test quality at all, but it did annoy me to see this mistake.
2008-01-21Define repeated string literal onceCarl Worth1-4/+6
2008-01-21[cairo] Add cairo_path_extents()Brian Ewins1-10/+23
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-17[test/get-path-extents] Exercise cairo_scaled_font_text_extents()Chris Wilson1-1/+18
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[test/get-path-extents] Check extents of degenerate paths.Chris Wilson1-0/+35
Ensure that degenerate paths have zero extents.
2007-12-20[test/*] Create new surfaces using the group target.Chris Wilson1-1/+1
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-10-27[test/get-path-extents] Add link to bug report.Chris Wilson1-0/+1
Add a link to the original bug report for the broken extents with arcs. [http://bugs.freedesktop.org/show_bug.cgi?id=7245]
2007-09-27[test/get-path-extents] Test extents of cairo_text_path().Chris Wilson1-10/+28
Check that the text path extents match the computed metrics.
2007-09-26[test/get-path-extents] Test extents of an arc.Chris Wilson1-5/+19
Add the test case from bug 7245, https://bugs.freedesktop.org/show_bug.cgi?id=7245.
2007-02-21[test] Add test case for bug #7965 to the get-path-extents testBehdad Esfahbod1-0/+13
2006-09-25Add clip getters API + testsRobert O'Callahan1-0/+199
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.