Commit graph

1016 commits

Author SHA1 Message Date
Behdad Esfahbod
b176b5c29d [test/get-xrender-format.c] Don't fail if DISPLAY is not set 2008-08-11 15:06:31 -04:00
Behdad Esfahbod
bbd5f03fd8 [test/xlib-surface-source] Skip test if DISPLAY not set 2008-08-11 14:28:28 -04:00
Behdad Esfahbod
549dd9adb5 [test] Update ref image list 2008-08-11 01:40:27 -04:00
Behdad Esfahbod
e797f6791e [test/Makefil.am] Cosmetic 2008-08-10 23:39:28 -04:00
Chris Wilson
322c3ef7f9 [.gitignore] Update list of tests 2008-08-08 10:09:55 +01:00
Chris Wilson
893b50a980 [test] Update reference image for leaky-dashed-rectangle.
Bah, it seems someone fixed the code and the error lay in discrepancies
with the antialiasing in the reference image.
2008-08-08 10:09:37 +01:00
Behdad Esfahbod
08e8a42ea1 [test/user-font] Fix comments 2008-08-08 03:01:18 -04:00
Behdad Esfahbod
597bfa922a [test/user-font] Document glyph-not-found situation 2008-08-08 03:01:17 -04:00
Behdad Esfahbod
d9408041aa Add cairo_scaled_font_text_to_glyphs()
And update user-font text_to_glyphs() method to match.

Currently disable the win32-font text_to_glyphs(), until that one
is updated.  Or better yet, remove it and implement ucs4_to_index().
It's the toy font API afterall.
2008-08-08 03:01:16 -04:00
Behdad Esfahbod
b01ad0835d [user-font] Add a cairo_t argument to cairo_user_scaled_font_init_func_t
The init func does not actually need to draw anything, but having a cairo_t
similar to that passed to render_glyph is handy for computing font extents.
This is because cairo makes doing some things really hard (if not impossible)
without a cairo_t.

The user-font-proxy test case is a great example of how the added cairo_t
makes life much easier.
2008-08-08 03:01:15 -04:00
Behdad Esfahbod
7e57892983 Add toy font constructor and getters
New public API:

	cairo_toy_font_face_create()
	cairo_toy_font_face_get_family()
	cairo_toy_font_face_get_slant()
	cairo_toy_font_face_get_weight()
2008-08-08 03:01:14 -04:00
Jeff Muizelaar
e8ddbd1a14 Add a test case showing the invariance of push/pop_group
This shows the regressions caused by
1a9809baab
2008-08-07 19:25:40 -04:00
Chris Wilson
ae7bdd7ee0 [valgrind] More suppressions for XrmGetStringDatabase().
Another variation in the callstack needs suppressing.
2008-08-07 08:29:14 +01:00
Behdad Esfahbod
1dc0f3a1ad [test/user-font] Document that Poppler is buggy with glyph 0 2008-08-06 12:00:28 -04:00
Sylvain Pasche
65d017a406 Add tests for the new LCD filter API 2008-08-05 16:30:37 -04:00
Jeff Muizelaar
3074ba02a1 Add a test for scaling a surface with device offset. 2008-07-21 22:08:46 -04:00
Behdad Esfahbod
ba62d2d30a Update .gitignore files 2008-06-26 16:20:58 -04:00
Chris Wilson
47d8739ea1 [test/xlib-surface-source] Build under --disable-xlib-xrender.
Add an ifdef to support compiling without XRender.
2008-06-19 12:25:01 +01:00
Chris Wilson
38c4bcc2da [test/solid-pattern-cache-stress] Do what it says on the tin.
Actually draw to the surface after setting the source in order to
trigger use of the solid surface cache.
2008-06-19 12:24:30 +01:00
Søren Sandmann
cba1543c92 Remove large-clip from xfail list 2008-06-10 18:09:00 -04:00
Søren Sandmann
bd0cf05623 Add the correct reference image for the large-clip test 2008-06-10 18:09:00 -04:00
Søren Sandmann
60971fb514 New large-clip test
This tests clipping to a rectangle that doesn't fit in 16 bits.
2008-06-10 18:08:59 -04:00
Adrian Johnson
c8fc587ede Update user-font test PS/PDF ref images
The PDF output no longer requires a PDF specific reference image. The
lastest poppler from git is required to get the fix for a bug in Type
3 font rendering.
2008-06-09 23:14:47 +09:30
Adrian Johnson
4c5370dad8 Update PDF/PS ref images of text-rotate and ft-show-glyphs-positioning 2008-06-04 23:27:05 +09:30
Behdad Esfahbod
51885e9a1e [test/user-font.c] Fix compiler warnings 2008-05-28 16:52:19 -04:00
Behdad Esfahbod
0f07c45fa3 [test/user-font] Use user_data to access glyphs array
This way the same callback code can be used to render multiple different
glyph arrays.  Change done for education purposes, otherwise doesn't
make any difference in the test.
2008-05-27 17:53:35 -04:00
Behdad Esfahbod
a715671c6f [test/user-font-proxy] New test using fonts inside a user-font
PDF fails and needs some fixes in the PDF surface instead of a new
ref image IMO.
2008-05-24 20:34:41 -04:00
Behdad Esfahbod
4957a78947 [test/surface-finish-twice.c] Adapt to recent change that multiple finish is ok 2008-05-24 15:16:44 -04:00
Behdad Esfahbod
d947ee0ef6 [test/large-font] Make the font REALLY LARGE
10000 that is.  xlib fails now again.  Not because of glyph size issues.
Because we skip rendering any glyphs with positions not in range -1024..15359.
Working on a fix.
2008-05-23 20:41:26 -04:00
Carl Worth
b957beb0df Add large-font test to exercise a cairo-xlib bug.
The original bug report is here:

	corrupt glyph positions with large font
	https://bugzilla.redhat.com/show_bug.cgi?id=448104
2008-05-23 08:05:18 -07:00
Carl Worth
8efb103600 Extend fallback-resolution test to expose bug with groups
Groups appear to always be rendered with a fallback resolution of
72.0 ppi rather than the desired fallback resolution.
2008-05-21 10:23:37 -07:00
Behdad Esfahbod
168447cc2b [user-font] Use opaque colors such that PS backend gets tested
Also update ref images.  All backends pass now.
2008-05-15 20:09:17 -04:00
Behdad Esfahbod
142ba30604 [test/Makefile.am] Add 'make run' target
It runs tests under a tool specified tool.  For example:

	make run TOOL=gdb TESTS=user-font TARGETS=pdf
2008-05-15 19:27:17 -04:00
Behdad Esfahbod
62652ecab7 [test/user-font] Another minor tweak to the font 2008-05-15 13:28:03 -04:00
Behdad Esfahbod
f68fb2c747 [test/user-font] Add some more glyphs
The glyph for 'z' now reveals a bug in PDF type1 code.
2008-05-13 14:07:42 -04:00
Behdad Esfahbod
17f21ea307 [cairo-user-font] Implement user fonts 2008-05-10 01:21:45 +02:00
Behdad Esfahbod
1246ff8aec [cairo-test] Implement cairo_test_log_path() to dump a cairo_path_t to logs
Dumping paths is so hard in C.  Shouldn't be.  At least not when debugging...
2008-05-09 23:21:14 +02:00
Chris Wilson
ff596c64fb [test] Add degenerate-arc
This test case is to exercise the divide-by-zero error reported by
Luiz Americo Pereira Camara <luizmed@oi.com.br>,
http://lists.cairographics.org/archives/cairo/2008-May/014054.html.
2008-05-06 14:31:02 +01:00
Chris Wilson
fed9d9060e [test/invalid-matrix] Disable floating point exception.
test/invalid-matrix purposely feeds invalid numbers into cairo, in
order to check its detection of garbage values. In doing so, cairo
raises an Invalid exception, but as this is a direct result of an abuse
of the API we can treat it as expected behaviour and ignore the
exception.
2008-05-06 14:30:49 +01:00
Chris Wilson
1755a2d27d [test] Enable floating point exceptions.
Some platforms and applications enable floating point exceptions, so it
seems sensible to run the test-suite with the most serious exceptions
enabled - divide by zero, invalid result and overflow.
2008-05-06 14:30:35 +01:00
Chris Wilson
8742429c79 [test] Add test case for a leaky dashed rectangle.
Franz Schmid reported on the mailing list,
http://lists.cairographics.org/archives/cairo/2008-April/013912.html,
an issue with drawing a dashed rubber band in Scribus. The problem
appears when segments of the dashed rectangle are outside the image,
with the errant dash connecting the ends of the visible segments.
2008-04-29 15:19:40 +01:00
Chris Wilson
5d20479b99 [test/ft-font-create-for-ft-face] Fix the lifetime issues of FT_Face.
The font_face created from cairo_ft_font_face_create_for_ft_face()
was being kept alive by a reference from the context beyond the
lifetime of the parent cairo_scaled_font_t (which owned the FT_Face).
Correct the example in the test code to remove this errant reference
before cleaning up the fonts. (To be fair, to actually trigger a bug
one has to evict the FT_Face from the cache before using the font_face
- merely creating a cairo_scaled_font_t for every font on the system is
enough.)
2008-04-29 09:28:10 +01:00
Chris Wilson
b4b77cedc9 [test/Makefile.am] EXTRA_DIST += create-from-png*-ref.png
Add the new reference images for create-from-png to the distributable.
2008-04-21 22:51:24 +01:00
Chris Wilson
a313547f6d [test/create-from-png] Check loading of various colour types.
Check that when loading from index/gray/rgb PNGs, with and without
alpha/transparency, that the correct surface is generated by read_png(),
i.e. if the PNG contains an alpha channel then the image must be an
ARGB32 surface.
2008-04-21 19:44:11 +01:00
Chris Wilson
0e315b1e60 [test/a8-mask] Perform the stride API checking once.
The stride API is independent of the surface and does not need to be
repeated for every surface.
2008-04-15 13:29:10 +01:00
Chris Wilson
8b36ca0858 [test/a1-mask] Perform the stride API checking once.
The stride API is independent of the surface and does not need to be
repeated for every surface.
2008-04-15 13:29:02 +01:00
Chris Wilson
fa5e87ad23 [cairo-test] Spelling fixes in comments.
Skim through the comments fixing trivial smelling pistakes.
2008-04-15 13:28:57 +01:00
Chris Wilson
28a1dabed8 [test] Add a regression test for bug 10921
This bug first was fixed in 40558cb15e,
but then reintroduced in 9cfd82e87b, which
became part of the 1.6.2 quick release.

As penance to make sure I never repeat this same bug again, I offer this
test case which exercises the XSetClipMask(NULL) path and hopefully
simulates some 'typical' usage of cairo by GUI toolkits.
2008-04-11 23:57:01 +01:00
Chris Wilson
f57100acd4 [test] Handle TEST_CONTENT_COLOR_ALPHA_FLATTENED similar surfaces.
Convert the boilerplate specific flattened content value to the ordinary
CAIRO_CONTENT_COLOR_ALPHA for use with cairo_push_group_with_content() -
otherwise cairo rightfully flags an error and the test harness decides
that the similar surface is not available.
2008-04-11 15:39:11 +01:00
Adrian Johnson
9166686abd Refresh text-rotate PS reference image 2008-04-11 22:50:52 +09:30