Commit graph

1395 commits

Author SHA1 Message Date
Kristian Høgsberg
73cdfa0b2b [ Grr... previous commit from test/, missed the ChangLog changes ]
Fix missing rounding in these two functions.
Update these to versions with properly rounded alpha values.
Move clip_twice out of XFAIL now that rounding works.
Add new test cases.
2005-01-27 11:59:55 +00:00
Kristian Høgsberg
81d03b3048 Fix missing rounding in these two functions.
Update these to versions with properly rounded alpha values.
Move clip_twice out of XFAIL now that rounding works.
Add new test cases.
2005-01-27 11:40:29 +00:00
Owen Taylor
0f5b7d82de configure.in Makefile.am docs/Makefile.am docs/public/*: Add framework for doing docs via gtk-doc.
src/cairo.[ch] src/cairo-matrix.c: Add some inline docs for arcs and matrices.
gtk-doc.m4 acinclude.m4: Check in files from gtk-doc to make the dependency on gtk-doc optional.
Add --enable-gtk-doc to the default args.
2005-01-27 11:35:25 +00:00
Kristian Høgsberg
17ec6f1482 The overall idea of this rewrite is that we want to pass the source pattern all the way down into the backends. The motivation for this is that not all backends want a surface for the source operand, and by passing the pattern down, backends can choose to convert it to a surface if they need that.
The patch removes the create_surface function pointer from the surface vtable and moves much of that code into a couple of helper functions. The composite, compsite_trapezoids, and show_glyphs backend functions are updated to take a cairo_pattern_t instead of a surface as the source.
Change these functions to not create a surface for the pattern and just pass the pattern down to the backend functions.
New function to translate a set of trapezoids.
Break out the code to adjust and restore surface transformation and repeat settings into _cairo_pattern_prepare_surface and _cairo_pattern_restore_surface.
Split cairo_pattern_create_for_surface into an init function and a create function.
Utility functions to create a surface from a pattern.
Update these backends to work with the new pattern API. Glitz work by David Reveman.
Update these to pass through the new set of args.
Update this reference image as we now render it correctly.
2005-01-27 10:46:20 +00:00
Kristian Høgsberg
2654df6afb New test case to verify that the clip surface is correctly updated when extending an existing clip path. 2005-01-26 21:46:01 +00:00
Kristian Høgsberg
79d9b82ff3 Set alpha to 1 before setting clip mask.
Added the right reference PNG. Running test against stock 0.3.0 gives the expected results.
2005-01-26 14:21:53 +00:00
Kristian Høgsberg
d4fb5c9240 New test case, covering various combinations of pattern types, drawing operations and clipping. Currently fails, for some combinations, coverage-ref.png is just a placeholder.
Added this PNG from cairo-snippets to use for pattern fills.
expose PNG loading to test cases.
2005-01-26 13:41:55 +00:00
Carl Worth
6dce601fd3 Use 32-bits for pixman_bits_t, even on 64-bit platforms. This should fix bug #2335 as well as rendering problems seen on 64-bit platforms. 2005-01-26 09:10:15 +00:00
Alexander Larsson
dfee909d51 Fix access to uninitialized data
key must be first element in cache entry
2005-01-26 06:49:16 +00:00
Carl Worth
2a7a9d00cc test/imagediff.c
Add new testsvg script and accompanying imagediff program, (for interim SVG-based test suites while we wait for the standard cairo test suite to mature).
Split buffer_diff out into its own file for the purpose of imagediff.
2005-01-25 14:45:31 +00:00
David Reveman
e5e0880d67 Update mail address 2005-01-25 12:25:29 +00:00
David Reveman
b35c7a3ee5 Track changes to glitz 2005-01-25 12:21:32 +00:00
David Reveman
71f65cbad2 Add missing include directive so xcb backend compile again 2005-01-25 12:11:02 +00:00
Carl Worth
b321202d18 Fixed rounding of glyph positioning. 2005-01-25 11:48:59 +00:00
Owen Taylor
a812c7a066 Chec pdf_font for NULL, not font. 2005-01-25 10:56:50 +00:00
Alexander Larsson
55a8b62ec4 Fix typo that made cairo-ft.h not get installed 2005-01-25 06:50:33 +00:00
Carl Worth
fe0c66a821 Add Shawn T. Amundson, Calum Robinson, and Owen Taylor. 2005-01-24 09:17:10 +00:00
Carl Worth
e2afdd1458 Conditionally install header files only for backends that are compiled. Thanks to Shawn T. Amundson <amundson@gtk.org>. 2005-01-24 09:10:51 +00:00
Carl Worth
31f05254ff Qualify color argument as const. Closes bug #2336. 2005-01-24 09:01:52 +00:00
Dave Beckett
c58f6a4bcf Protect switch on hintstyle with #ifdef FC_HINT_STYLE. 2005-01-23 15:16:57 +00:00
Carl Worth
7114a77ce1 Add instructions for handling the new -head suffix of CAIRO_VERSION at release-time.
Append -head to CAIRO_VERSION to indicate state between snapshots.
2005-01-23 12:49:56 +00:00
Owen Taylor
7275be538b Call _cairo_gstate_ensure_font(). Don't reference the returned font. 2005-01-21 15:43:55 +00:00
Owen Taylor
e613961f94 Make dependence on FC_HINT_STYLE conditional. (reported by Abraham Egnor)
Use FT_LOAD_MONOCHROME if FT_LOAD_TARGET_MONO isn't defined for compatibility with older FreeType.
2005-01-21 15:31:15 +00:00
Owen Taylor
97424a3c2a Change cairo_font_t to refer to a font scaled to a particular output device resolution.
src/cairoint.h src/cairo_font.c src/cairo_ft_font.c src/cairo_xlib_surface.c src/cairo_pdf_surface.c src/cairo_gstate.c src/cairo.c: Switch many internal methods from handling cairo_unscaled_font_t and cairo_font_scale_t pairs to handling cairo_font_t.
src/cairo-ft-private.h src/cairo_ft_fontc: Add some internal interfaces for use by the FreeType backend.
Clear the gstate's current font when the transform or target surface changes.
src/cairo.h src/cairo_ft_font.c: Rename cairo_ft_font_pattern to cairo_ft_font_get_pattern().
src/cairo.h src/cairo_ft_font.c: Make cairo_ft_font_create() and cairo_ft_font_create_for_ft_face() take a font scale; make the latter take load_flags for FT_Load_Glyph() as well. Change cairo_ft_font_face() to Xft-style cairo_ft_font_lock_face, cairo_ft_font_unlock_face.
Remove the name/slant/weight=>unscaled font cache, it didn't work with the new cairo_font_t setup. If it turns out to be needed, it can be added back in some other form.
src/cairoint.h src/cairo_font.c: Add a 'flags' field to cairo_glyph_cache_key_t, we use it for load flags with freetype backend.
Switch the caching to be from resolved fontconfig pattern => file; keep only a fixed number of FT_Face objects open at once, similar to FreeType.
src/cairo_gstate.c src/cairoint.h: Add public cairo_font_glyph_extents, use it to implement _cairo_gstate_glyph_extents().
Add refcounting for glyph cache elements; there was an bug where elements got ejected from the cache and freed before they could be used.
src/cairoint.h src/cairo_cache.c (_cairo_cache_random_entry()) New function to return a random entry in the cache matching a predicate; reuse the internals for the previous _random_live_entry().
src/cairoint.h src/cairo_cache.c (_cairo_cache_lookup()): Add an optional created_entry return value.
src/cairo_ft_font.c src/cairo_xlib_surface.c: Adapt to _cairo_cache_lookup() change.
Support max_memory == 0 to indicate an unbounded cache.
src/cairoint.h src/cairo_cache.c (_cairo_cache_remove()): Add a function to manually remove entries from the cache.
Update for changes, document cairo_matrix_t, cairo_glyph_t, etc.
src/cairo.h src/cairo-atsui.h src/cairo-ft.h src/cairo-glitz.h src/cairo-pdf.h src/cairo-png.h src/cairo-ps.h src/cairo-quartz.h src/cairo-xcb.h src/cairo-xlib.h: Add CAIRO_BEGIN/END_DECLS for extern "C", use it on all public headers. Move header guards outermost.
Fix encoding.
2005-01-21 14:33:47 +00:00
Carl Worth
9068937026 Increment CAIRO_VERSION to 0.3.0
Add notes for snapshot 0.3.0
2005-01-21 12:48:11 +00:00
Carl Worth
f697490665 Update reference images for new rasterization in libpixman 0.1.3. 2005-01-21 11:27:56 +00:00
Carl Worth
1463fbb6c9 Update since directory changed after server compromise. 2005-01-21 11:20:55 +00:00
Carl Worth
fdf1ed1185 Fix typo 2005-01-21 11:18:46 +00:00
Carl Worth
886d457c2f Fix snapshot URL in description 2005-01-21 11:16:03 +00:00
Carl Worth
4b072cc7d2 Add notes for snapshot 0.1.3.
Increment version to 0.1.3
Add reminder to diff pixman.h to look for API changes since the last snapshot.
2005-01-21 11:10:07 +00:00
Carl Worth
c3e41a966c Add missing files to satisfy make distcheck. 2005-01-21 10:59:33 +00:00
Carl Worth
1c4286c2a8 Update for changed www directory on server. 2005-01-21 10:54:51 +00:00
Carl Worth
fd8974f2ad Add pixman-xserver-compat.h, (that was supposed to go in a couple of commits ago). 2005-01-21 10:52:55 +00:00
Carl Worth
dfa7b94c9c Avoid buffer ovverrun when trapezoid's right edge is on a pixel boundary. 2005-01-21 10:38:42 +00:00
Carl Worth
13225d4d3b Switch to use new fbRasterizeTrapezoid. Gut old IcRasterizeTrapezoid implementation. Remove lots of code, (and all the bugs with it).
Replace IcRasterizeTrapezoid with fbRasterizeTrapezoid. Add a couple of missing typedefs.
Minor changes to allow things to compile within libpixman tree, (replace xserver include directives with pixman-xserver-compat.h and sprinkle a few const qualifiers).
Add sources for new point-sampling rasterization.
2005-01-21 10:26:28 +00:00
Carl Worth
c64e2ccd06 Merge in changes from xserver, (mostly just whitespace). 2005-01-21 09:26:44 +00:00
Carl Worth
d466c33d1d Add a bunch of missing include directives, (now that cairo.h has been cleaned up). 2005-01-20 20:45:38 +00:00
Carl Worth
da1b3c147b Created new public header cairo-atsui.h.
Build fixes for Quartz backend courtesy of Geoff Norton <gnorton@customerdna.com>:
Fix check for atsui font backend.
Add conditional compilation for cairo_atsui_font.c and cairo_ft_font.c.
Add missing include of cairo-quartz.h.
Add include of Carbon/Carbon.h.
Advertise availability of Quartz surface.
Install cairo-quartz.h, and conditionally compile cairo_quartz_surface.c.
Add autofoo checks to detect quartz backend.
2005-01-20 20:41:40 +00:00
Carl Worth
0ad3789985 Created new public header cairo-atsui.h.
Build fixes for Quartz backend courtesy of Geoff Norton <gnorton@customerdna.com>:
Fix check for atsui font backend.
Add conditional compilation for cairo_atsui_font.c and cairo_ft_font.c.
Add missing include of cairo-quartz.h.
Add include of Carbon/Carbon.h.
Advertise availability of Quartz surface.
Install cairo-quartz.h, and conditionally compile cairo_quartz_surface.c.
Add autofoo checks to detect quartz backend.
2005-01-20 20:36:25 +00:00
Carl Worth
b646ecfe08 Track various renamings.
Insert new includes for backend-specific header files.
Remove redundant include of cairo-features.h.
Rename header-exclusion macro from _CAIRO_H_ to CAIRO_H. Remove platform-specific grubbing for cairo-features.h and pixman.h in odd places.
Remove all backend-specific prototypes, (as they are now in their own header files).
Remove deprecated
Remove printf.
Convert to utf-8. Use the proper name for multiple-header exclusion (CAIRO_FEATURES_H). Track rename of FREETYPE_FONT_FEATURE to FT_FONT_FEATURE.
Split cairo.h up into cairo.h, cairo-ft.h, cairo-glitz.h, cairo-pdf.h, cairo-png.h, cairo-ps.h, cairo-xcb.h, cairo-xlib.h. Update for rename of cairo_wideint.h to cairo-wideint.h.
Rename CAIRO_HAS_FREETYPE_FONT to CAIRO_HAS_FT_FONT, (to match cairo_ft_font functions and cairo-ft.h).
Update for public header files now in /cairo.
2005-01-20 08:28:54 +00:00
Carl Worth
68d5ba661d Allow NULL values for return pointers so that the user can easily get partial results from cairo_matrix_get_affine, cairo_current_point, and cairo_current_color_rgb as needed. 2005-01-19 12:12:42 +00:00
Carl Worth
429c1f42b5 Fix int* vs. size_t* confusion, (currently in favor of int* but only because that's easier to implement). Thanks to John Ellson <ellson@research.att.com>. Closes bug #2328. 2005-01-19 11:39:06 +00:00
Kristian Høgsberg
6fb833a84c Add byteswap macros missing for bigendian architectures. 2005-01-19 08:03:53 +00:00
Carl Worth
cc58bc3b9b Remove fill_rule and leaky_polygon from expected failures list. Both of these bugs have fixes, (fill_rule is fixed by reverting cairo_traps.c to 1.16, and leaky_polygon is fixed in a newer libpixman). 2005-01-19 07:55:28 +00:00
Carl Worth
27532eda85 Remove const qualifiers from the header file as well. 2005-01-19 07:11:14 +00:00
Carl Worth
8605b6ae5a Remove useless const qualifier from functions returning simple values, (quiets the warning in gcc4). Thanks to John Ellson <ellson@research.att.com>. Closes bug #2299. 2005-01-19 07:07:00 +00:00
Carl Worth
f493efa92d Add bugs on cairo_surface_create_for_image, bad names for cairo_font_set_transform and cairo_font_current_transform, segfault on AMD64. 2005-01-19 05:32:32 +00:00
Carl Worth
d894196840 Add pristine files from the X server containing Keith's newer point-sampling implementation of trapezoid rasterization. The plan is to munge these files as little as possible to make them work within libpixman, (so that it will be easier to share patches between libpixman and the X server). 2005-01-18 11:54:23 +00:00
Kristian Høgsberg
e1eec5cf0e Fix double free in error path. (cairo_pdf_ft_font_create): Reference the unscaled font to keep the FT_Face around. (cairo_pdf_ft_font_generate): Initialize end to avoid compiler warning; bail out if table write fails. Fixes from Owen. 2005-01-17 14:59:49 +00:00
Kristian Høgsberg
2c6939b7ac Add preliminary text support, including support for truetype font subsetting.
Change type of 'surface' argument in show_glyphs to void * as it is for all other surface virtual functions.
Update accordingly.
Add check for endianess.
Fix bug in array growing loop. (_cairo_array_append): Accept NULL for elements argument, in which case we just allocate space in the array.
2005-01-17 09:40:00 +00:00