summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2008-12-08UserFontFace redesign to use virtual functionsJonathon Jongsma1-0/+4
* cairomm/fontface.cc: * cairomm/fontface.h: Change UserFontFace implementation to a vfunc-based implementation rather than requiring people to supply callbacks at runtime as sigc::slot objects. This was requested by Ian Britten on the mailing list and was my original plan but ran into issues in my original implementation. This isn't a fully-working implementation yet, but I think I can overcome the issues now, so I'm moving forward on the redesign. * tests/test-font-face.cc: disable UserFontFace tests for now Conflicts: ChangeLog cairomm/fontface.cc cairomm/fontface.h
2008-10-25distcheck fixesv1.7.0Jonathon Jongsma1-0/+1
2008-10-22Add an overloaded Context::get_matrix() that returns a copy of the MatrixJonathon Jongsma1-0/+1
2008-10-07Update API to officially released 1.8 APIJonathon Jongsma5-29/+39
* cairomm/context.cc: * cairomm/context.h: remove has_show_text_glyphs() (moved to Surface) * cairomm/surface.cc: * cairomm/surface.h: added has_show_text_glyphs() (moved from Context) * cairomm/enums.h: removed LcdFilter enum, added a TextClusterFlags enum * cairomm/fontface.cc: * cairomm/fontface.h: changed the 'backwards' bool argument of SlotTextToGlyphs to use TextClusterFlags instead. Same general change for the C callback text_to_glyphs_cb * cairomm/fontoptions.cc: * cairomm/fontoptions.h: remove get/set_lcd_filter() since it was removed from cairo just before the 1.8 release * cairomm/scaledfont.cc: * cairomm/scaledfont.h: changed the 'backwards' bool argument of text_to_glyphs() to use TextClusterFlags instead * tests/test-context.cc: * tests/test-font-face.cc: * tests/test-font-options.cc: * tests/test-scaled-font.cc: * tests/test-surface.cc: update tests for API changes
2008-10-06Fixe some test failures that were accidentally introducedJonathon Jongsma3-6/+30
Also fix a distcheck issue where the example png file was not being opened from the correct location when builddir != srcdir
2008-10-05Overhaul of the newly-wrapped Matrix API (+documentation)Jonathon Jongsma2-51/+53
* cairomm/matrix.cc: * cairomm/matrix.h: Add documentation for newly-wrapped matrix functions. Also, changed how the cairo_matrix_init_XXX() functions are wrapped. Initially I had basically wrapped them directly (as Matrix::init_XXX()), however, on the advice of Chong Kai Xiong (descender) on IRC, I have moved these into standalone 'generator' functions: - scaled_matrix() - translation_matrix() - rotation_matrix() - identity_matrix() * tests/test-font-face.cc: * tests/test-matrix.cc: modify the tests for the change in API. The new API does make things much more comfortable to use.
2008-09-14Inherit Cairo::Matrix from cairo_matrix_tJonathon Jongsma3-10/+105
2008-09-10Added Surface::get_fallback_resolution() + testJonathon Jongsma1-0/+12
2008-09-10Add Surface::get_content() + testJonathon Jongsma1-0/+10
2008-09-10Add ScaledFont::get_scale_matrix() + testJonathon Jongsma1-0/+15
2008-09-10Add PsSurface::get_eps()Jonathon Jongsma1-0/+12
2008-09-10Add Context::has_show_text_glyphs() + testJonathon Jongsma1-0/+13
2008-09-10 Change the names of the stream creation functions to 'create_for_stream()'Jonathon Jongsma1-3/+3
In order to avoid ambiguous template overload issues (I was getting compile failures when passing a literal string for the std::string parameter of the normal create() function)
2008-09-10add Context::get_font_options()Jonathon Jongsma1-0/+12
2008-09-10Add basic test for Win32FontFace from ArminJonathon Jongsma1-0/+39
2008-09-10add Freetype font supportJonathon Jongsma1-0/+25
2008-09-03Add UserFontFace text-to-glyphs APIJonathon Jongsma1-0/+46
2008-08-27Add LcdFilter enum and FontOptions API for LCD filteringJonathon Jongsma2-1/+38
2008-08-27add Context::show_text_glyphs()Jonathon Jongsma1-0/+2
2008-08-27Add a default value for the font_options parameter of the ScaledFont constructorJonathon Jongsma1-0/+4
2008-08-27Add ScaledFont::text_to_glyphs()Jonathon Jongsma2-1/+49
2008-08-27Add Context::get/set_scaled_font()Jonathon Jongsma1-0/+23
2008-08-21All Image Surface creation tests now pass (no exceptions thrown)Jonathon Jongsma2-5/+17
2008-08-19Add sigc::slot versions of all of the functions that take a ↵Jonathon Jongsma2-1/+91
cairo_write_func_t or cairo_read_func_t
2008-08-18Add UserFontFace APIJonathon Jongsma1-0/+202
2008-08-14Implement the ToyFontFace classJonathon Jongsma2-2/+55
2008-08-13Fix boost unit test detectionJonathon Jongsma1-1/+1
2007-07-10Add ability to use dynamic casting with the return values from more functions,Jonathon Jongsma1-0/+32
including: Context::get_target() Context::get_target() const Context::get_source() Context::get_source() const Context::get_group_target() Context::get_group_target() const Context::pop_group() * tests/test-context.cc: a few additional tests to verify the const / non-const versions both work with dynamic casting.
2007-07-10Add alternate API for Context::set_dash() which takes a std::vector argumentJonathon Jongsma1-0/+14
instead of the slightly unexpected std::valarray argument * tests/test-context.cc: test that both API work correctly and compile correctly without any problems
2007-07-04Added some tests for matrix transformations and user-to-device coordinate ↵Jonathon Jongsma1-44/+64
mappings The matrix transformation 'test' does nothing more than call the functions to excercise them a bit Also used BOOST_CHECK_EQUAL in most places instead of BOOST_CHECK to get more meaningful failure messages.
2007-07-04Fix dynamic casting of Pattern retrieved with Context::get_source()Jonathon Jongsma1-18/+42
* cairomm/context.cc: when getting the source pattern of a Cairo::Context, check which type of Pattern it is so that we create the correct C++ wrapper. Without this, RefPtr<>::cast_dynamic() doesn't seem to work as we would expect it to. * tests/test-context.cc: improve the Context::get_source() / Context::set_source () tests now that dynamic casting works correctly
2007-07-04examples/, tests/: fix a bunch of minor compile errors when compiling with ↵Jonathon Jongsma1-19/+22
-Werror
2007-03-242007-03-23 Jonathon Jongsma <jjongsma@gnome.org>Jonathon Jongsma2-0/+275
* Makefile.am: * autogen.sh: * configure.in: * m4/ax_boost_base.m4: * m4/ax_boost_unit_test_framework.m4: Add some basic test infrastructure. It's disabled by default, and must be explicitly enabled by passing --enable-tests to configure (or by setting the CAIROMM_DEVEL environment variable to "on"). It uses the boost unit test framework, but this should not be required unless you've explicitly enabled tests. If tests are enabled, you can easily run them with 'make check' * tests/Makefile.am: * tests/test-context.cc: added the beginning of a test for Cairo::Context. Most of these tests are really very interesting. Basically what I'm trying to do is a) test some basic behaviors, and b) excercise the functionality a little bit. One of the tests currently fails due to a RefPtr::cast_dynamic failure, so I have to see what's going on there.