Commit graph

1088 commits

Author SHA1 Message Date
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
Alexander Larsson
dfee909d51 Fix access to uninitialized data
key must be first element in cache entry
2005-01-26 06:49:16 +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
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
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
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
Kristian Høgsberg
be7b745a43 Take image_rotate-ref.png out of EXTRA_DIST until we can actually render it correctly. (XFAIL_TESTS): Update with new known bugs.
Add font backend selection options.
2005-01-17 09:18:37 +00:00
John Ellson
4358135bc9 Was using the wrong extents variable.
reviewed by: Keith Packard <keithp@keithp.com>
2005-01-15 10:53:13 +00:00
Carl Worth
3016995b0d test/Makefile.am
Add leaky_polygon test for trapezoid rasterization corner case.
2005-01-13 14:50:35 +00:00
David Reveman
3ae8c1ca65 Replace struct cairo_surface_backend with cairo_surface_backend_t 2005-01-13 14:48:15 +00:00
Carl Worth
a2af89b04a Replace all structure tags to have _ prefix. struct cairo_foo -> struct _cairo_foo Also, prefer cairo_foo_t over struct _cairo_foo in .c files. 2005-01-13 06:50:23 +00:00
Carl Worth
5235dbb80f A NULL cairo_t * is not sane.
Add freetype flags so that things work with freetype in a non-standard location, (a little extra work here since freetype doesn't use pkg-config).
Add several items culled from recent mailing list discussions.
Add bugs on cache locking and surface pattern scaling.
2005-01-12 14:40:14 +00:00
Keith Packard
72832b9760 Scale factors shouldn't include mirroring.
int32x32_64_mul and int64x64_128_mul are different from their unsigned compatriots
2005-01-11 14:52:16 +00:00
Øyvind Kolås
18680d494b renamed CAIRO_COLOR_DEFAULT to CAIRO_COLOR_WHITE 2005-01-11 13:50:13 +00:00
Øyvind Kolås
c7e80e6bff reverted accidental change 2005-01-11 13:36:41 +00:00
Øyvind Kolås
7dd4d7aad4 changed default paint color to opaque black 2005-01-11 13:28:50 +00:00
Keith Packard
ad2225c6f4 Fix math library detection to use autotools helper
Remove cache memory usage assertions as single objects can be larger than the cache size
Decompose font matrix transformations into a couple of helper routines. Return all metrics in font space.
Eliminate compiler warning
Expect glyph metrics to be in font space. Compute text extents by fetching one glyph metric at a time, transforming to user space and computing the overall bounding box.
use 'sincos' where available. Scale factors now ensure the non-scale transform is area preserving. Scale factors requires another parameter to mark the fixed axis.
Change license to LGPL Mark int32x32_64_mul as broken (which it still is)
Ensure each glyph is located as close to the specified position as possible
interface change to _cairo_matrix_compute_scale_factors
2005-01-11 10:03:01 +00:00
Kristian Høgsberg
a850136805 Add -lz to CAIRO_LIBS when compiling the PDF backend.
Don't use compressBound, since it's only available in zlib 1.2 and newer.
2005-01-06 23:20:07 +00:00
Carl Worth
f4a51d9154 Add Owen's new equation to fix clipping: ((src Op dest) In clip) Add (dest Out clip) 2005-01-06 21:28:07 +00:00
Carl Worth
cf354e9924 Added cairo_show_surface_mask and note about clipping problems. 2005-01-06 10:28:10 +00:00
Carl Worth
a513fa18c7 Added some TODO items from mailing list traffic. 2005-01-06 08:51:48 +00:00