Commit graph

182 commits

Author SHA1 Message Date
Carl Worth
c3fe1bbe33 Add comment indication cairo_copy will be going away at some point. Some indentation fixes. 2004-02-17 18:47:34 +00:00
Carl Worth
122b2d8504 Bump version to 0.1.18. Includes new functions cairo_current_path, cairo_current_path_flat, cairo_surface_get_filter. Support for XCB backend. Fixes for building in cygwin. Adds cairo_surface_get_filter.
Add new path query functions.
Implement support for cairo_current_path and cairo_current_path_flat. These functions just provide an interface to _cairo_path_interpret and take care of mapping from device space back to user space.
2004-02-17 18:38:23 +00:00
Carl Worth
b55f107679 Add typedefs for new callbacks to be used by cairo_current_path: cairo_move_to_func, cairo_line_to_func, cairo_curve_to_func, and cairo_close_path_func.
cairo_path.last_move_point and cairo_path.current_point are now fixed-point not doubles for consistency.
Now accept 4 explicit function pointers rather than a structure. Eliminate unnecessary done_path callback.
Track change in _cairo_path_interpret. Code previously in done_path callback is now here immediately after call to _cairo_path_interpret.
Internal _cairo_path API modified to accept fixed-point data everywhere. Much cleaner this way.
Have to convert doubles to fixed-point to track changes in _cairo_path API.
Keep data in fixed-point rather than going through intermediate doubles. Track changes in _cairo_path API.
New function to help when working with freetype.
2004-02-12 19:02:33 +00:00
Jamey Sharp
810037bc7c Ported the Xlib surface backend to XCB. 2004-02-02 23:24:14 +00:00
Graydon Hoare
34e0e7eec8 New predicate. (_cairo_xlib_surface_set_filter): Skip filterless servers. (_cairo_xlib_surface_clone_similar): Fix typo. 2004-02-02 11:20:44 +00:00
Graydon Hoare
b66bbf4879 New "filter" field.
New function. (cairo_surface_set_filter): Store filter in surface.
Declare.
Copy filter setting. (_cairo_xlib_surface_set_filter): Use constants from Xrender.h
2004-01-30 14:44:18 +00:00
Carl Worth
62520eb2d1 Fix to use tessellate_polygon instead of tessellate_rectangle as the matrix may have skewed the coordinates into a non-rectangular shape. 2004-01-24 01:56:26 +00:00
Carl Worth
f05248faef Add missing break statements to switch. 2004-01-24 01:46:20 +00:00
Richard Worth
5c490d2160 Add '-no-undefined' to end of libcairo_la_LDFLAGS to enable building shared library under cygwin.
Remove all 'extern ' and ' __external_linkage' (macro for __declspec(dllexport) and __declspec(dllimport)) from function declarations. These are no longer needed for cygwin.
Changed type of _line_segs_intersect_ceil from 'static cairo_fixed_t' to 'static int' to match definition. This was necessary to compile under cygwin.
2004-01-22 20:47:24 +00:00
Carl Worth
decf8b395c Remove trailing commas from enums, (some compilers like to complain about them). 2003-12-17 12:59:37 +00:00
Carl Worth
fb93261e37 Bump version to 0.1.17 for new functions: cairo_text_extents, cairo_glyph_extents, cairo_text_path, cairo_glyph_path.
Re-enable cairo_text_path and cairo_glyph_path.
Add missing transformation.
Initial implementation of glyph_path.
2003-12-16 07:20:20 +00:00
Carl Worth
bf40046a4e Move all current_point state fields from cairo_gstate_t to cairo_path_t.
Add current_point state. (_cairo_path_current_point): New function. (_cairo_path_rel_move_to): (_cairo_path_rel_line_to): (_cairo_path_rel_curve_to): New functions.
Eliminate current_point state. (_cairo_gstate_show_text): (_cairo_gstate_text_path): Use new _cairo_path_current_point.
2003-12-16 07:10:48 +00:00
Carl Worth
b5983fab84 A couple of changes missed in the last batch of commits (reordering so that path is final argument). 2003-12-16 06:58:10 +00:00
Carl Worth
368b4d269b Change cairo_font_backend_t to use a void * for the abstract font. Put create, copy, and destroy as the first functions in the list. Fix text_path and glyph_path so that the path to be returned is the last argument. Add x,y arguments to text_path.
Compute x,y now needed by cairo_font_text_path. (_cairo_gstate_glyph_path): Track change in cairo_font_text/glyph_path (path argument is now last).
Switch to new macro-based mechanism for including freetype headers. (cairo_ft_font_face): (cairo_ft_font_pattern): Minor cleanup. (_cairo_ft_font_copy): (_cairo_ft_font_destroy): (_utf8_to_glyphs): (_cairo_ft_font_font_extents): (_cairo_ft_font_glyph_extents): (_cairo_ft_font_text_extents): (_cairo_ft_font_show_glyphs): (_cairo_ft_font_show_text): Track changes to cairo_font_backend_t interface.
Track changes to cairo_font_backend_t interface.
2003-12-16 06:50:37 +00:00
Carl Worth
dea75c8333 Rename cairo_text_exextents_t fields: left_side_bearing -> x_bearing ascent -> y_bearing right_side_bearing (replaced by) width descent (replaced by) height 2003-12-15 19:00:15 +00:00
Carl Worth
39bb4f1d99 Need to divide out the scale factor to return user-space extents. (_cairo_gstate_glyph_extents): Don't transform glyph locations as they're not relevant to extents.
Clean up implementation. (_cairo_ft_font_glyph_extents): Initial implementation. Thanks to John Ellson <ellson@research.att.com> for most of the work on this function. (_cairo_ft_font_show_text): Clean to use num_glyphs not nglyphs.
Re-enable cairo_text/glyph_extents.
2003-12-15 18:26:51 +00:00
Carl Worth
9d4fe7e369 Move this function from cairo_ft_font.c (_get_scale_factors). 2003-12-15 18:02:03 +00:00
Carl Worth
0095dcb49d Fix minor errors in fixed/floating-point conversion. 2003-12-15 17:26:25 +00:00
Carl Worth
1cd1330aa3 font->show_glyphs no longer accepts an offset point.
_utf8_to_glyphs now accepts a point by which each glyph should be offset. (cairo_ft_font_backend): Remove evil void * casts on function pointers.
Fix to not require a current point.
Move initialization of current device-space point from setup_text_rendering_context to _cairo_gstate_show_text. (_cairo_gstate_show_glyphs): Fix to not reference current point.
2003-12-15 14:20:56 +00:00
Dave Beckett
8b00a61e8b Add compatibility defines FONTCONFIG_LIBS, X_LIBS, XRENDER_LIBS to keep automake happy - they look like automake variable names. 2003-12-12 16:00:19 +00:00
Carl Worth
2309a8b98a Add comment about building in a font.
Check for NULL return value from cairo_ft_font_create.
2003-12-12 12:00:50 +00:00
Carl Worth
e232072c12 Add conditionals for ps_surface functions, etc.
Get rid of AC_PATH_XTRA. Instead, find X includes/libraries only via pkg-config xrender. Switch option from --without-x to --disable-xlib Add option --disable-ps
Add -lz only if ps_surface backend is compiled.
2003-12-12 11:44:16 +00:00
Carl Worth
a02d8aaa59 Add missing definitions from slim_import.h. 2003-12-12 11:02:07 +00:00
Carl Worth
849c780a63 Rename surface->ic_image to surface->pixman_image.
Rename functions and indentifiers with ic_ in the name that were missed by the recent renaming. Fix indentation problems left by the recent renaming.
Shift everything over from libic/libpixregion/slim to libpixman. Many thanks to Dave Beckett <dave.beckett@bristol.ac.uk> for all of the heavy lifting with this renaming effort.
2003-12-11 13:04:39 +00:00
Carl Worth
5b38b14ff2 Directly fold in slim stuff rather than depending on it from an external package.
Switch from libic to libpixman.
Include pixman.h not ic.h. (__external_linkage): Directly fold in slim stuff rather than depending on it from an external package.
Look for libpixman instead of libic and slim.
2003-12-11 12:43:58 +00:00
Andrew Chant
18ae004832 cairo_select_font: _cairo_font_create: _cairo_gstate_select_font: cairo_ft_font_create: change char * family to const char * family 2003-12-11 11:12:59 +00:00
Carl Worth
c2696a7d8d Replace mysterious image->depth == 32 ? 24 : image->depth with simply image->depth. 2003-12-11 10:01:10 +00:00
Carl Worth
b95d2066a5 Fix to use shifts and masks for endianness-correct PS image generation. Rename bgr to rgb now that the byte order issues are clear. 2003-12-11 07:03:41 +00:00
Carl Worth
0949a86dd1 Track change in cairo_path_callbacks interface. 2003-12-08 17:39:32 +00:00
Carl Worth
08553e75b7 Clean up cairo_path_callbacks to have move_to, line_to, curve_to, abd close_path instead of add_edge, add_spline, and done_sub_path. Much, much nicer.
Provide cairo_polygon_move_to and cairo_polygon_line_to instead of cairo_polygon_add_point.
Track change in cairo_polygon interface.
2003-12-08 13:38:26 +00:00
Carl Worth
76e2cd9a74 Don't include obsolete cairo-xlib.h. 2003-12-05 10:47:42 +00:00
Carl Worth
928095693b Bump version to 0.1.15 for new CAIRO_HAS_XLIB_SURFACE macro.
Add missing #include <cairo-features.h>
Rename cairo-config.h to cairo-features.h.
Rename XLIB_BACKEND_DEFINE to XLIB_SURFACE_FEATURE. Rename AM_CONDITIONAL HAVE_XLIB_BACKEND to CAIRO_HAS_XLIB_SURFACE. Rename user-visibile macro CAIRO_HAS_XLIB_BACKEND to CAIRO_HAS_XLIB_SURFACE.
2003-12-05 08:53:07 +00:00
Carl Worth
aae17d3b6b Bumped version to 0.1.14 to indicate dropped cairo-xlib.h and new cairo-config.h.
New support for "./configure --without-x" to compile without the xlib backend. Many thanks to Sasha V. <sasha@aftercode.net>.
We do three things here: Make the pkg-config check for xrender conditional, set XLIB_BACKEND_DEFINE to either CAIRO_HAS_XLIB_BACKEND or CAIRO_HAS_NO_XLIB_BACKEND to be substituted into cairo-config.h, and set an AM_CONDITIONAL for HAVE_XLIB_BACKEND to enable conditional compilation of cairo_xlib_surface.c. Perhaps that could be simplified a tad, but it's what we have working now. Also split up various PKG_CHECK_MODULES into separate checks.
Remove errant reference to cairo_gstate_set_drawable.
Move xlib-specific calls in from old cairo-xlib.h, now guarded in #ifdef CAIRO_HAS_XLIB_BACKEND.
Make compilation of cairo_xlib_surface.c conditional. (INCLUDES, libcairo_la_LIBADD): Add the new variables from splitting up the PKG_CHECK_MODULES calls.
2003-12-03 12:27:44 +00:00
Carl Worth
765a1ad0fd Use 0 and 1 not False and True, (to avoid false dependency on X headers).
Use cairo_point_double_t not XPointDouble, (to avoid false dependency on X headers). Thanks to "Sasha V." <sasha@aftercode.net> for pointing these out.
2003-11-21 06:22:02 +00:00
Carl Worth
97cfea914d Fix build for new freetype header include mechanism, (thanks to Christof Petig <christof@petig-baender.de>) 2003-11-18 06:18:05 +00:00
Carl Worth
f27af5d98d Remove infinite looping when stroking with a line width at or close to 0.0. Thanks to Rob Buis <buis@kde.org> and Noah Levitt <nlevitt@columbia.edu> for providing in-the-wild examples of SVG files with stroke-width:0 that demonstrated the problem, (cowboy.svg and albania.svg).
Do nothing if the pen is a degenerate, single point. This happens when the line width is a very small, non-zero value.
Do nothing when asked to stroke a path with a line_width of 0.0. Previously, this would lead to an infinite loop.
Force negative line width to 0.0.
Updated TODO list.
2003-11-17 07:04:15 +00:00
Carl Worth
f86a979b49 Bumped version to 0.1.12 for new cairo_in_stroke and cairo_in_fill functions.
Added new cairo_in_stroke and cairo_in_fill.
* src/cairo_gstate.c (_cairo_gstate_in_stroke): (_cairo_gstate_in_fill): New functions to support for cairo_in_stroke and cairo_in_fill. Many thanks to Thomas Hunger <info@teh-web.de> for the initial implementation which demonstrated how easy this would be and pushed me to go and write it already.
Fixed to use _cairo_fixed_from_double instead of XDoubleToFixed.
2003-11-06 18:33:28 +00:00
Carl Worth
a3ad052795 Move declaration to beginning of function to avoid requiring a C99-compatible compiler. 2003-11-06 13:32:15 +00:00
Carl Worth
7262e1554f Add comment pondering memory management semantics of cairo_current_target_surface.
NULL out pen->vertices after free.
NULL out durface->data after free.
2003-11-06 12:53:39 +00:00
Carl Worth
443b8cb6a2 Enable cairo_set_target_surface (cr, NULL) to work. This can be useful to force the current target surface to be finalized. 2003-11-04 10:46:45 +00:00
Carl Worth
7765a3c676 Add support for cairo_copy_page. Fixes so PS output can be more than one page. Bump version to 0.1.11 for new cairo_copy_page. 2003-11-03 19:17:31 +00:00
Carl Worth
aa40d2e2e1 Add several missing checks for out of memory 2003-11-03 18:24:45 +00:00
Carl Worth
cbc1ea78d6 Added __external_linkage to a few functions that were missing it. 2003-11-03 13:44:53 +00:00
Carl Worth
51da155707 Fix misplacement of PS origin, (was translating vertically by width instead of height). 2003-10-31 21:56:14 +00:00
Carl Worth
c6255f9c29 Implemented preliminary PostScript output support. Added cairo_show_page. Bumped version number to 0.1.10 2003-10-31 21:30:35 +00:00
Carl Worth
9736375a7a Do nothing when radius <= 0.0, (which is much better than the current infinite loop). 2003-10-31 19:27:33 +00:00
Carl Worth
32df4d217d Moved all libic-related drawing into cairo_image_surface.c 2003-10-31 10:41:37 +00:00
Carl Worth
6dca2ab9d3 Fixed a few memory leaks 2003-10-30 18:39:20 +00:00
Carl Worth
5a9cf4f1a1 A set of changes to eliminate the static FT_Library field, (which could introduce nasty problems with respect to threading). With the new code, each font created with the toy API will own its own FT_Library. Meanwhile, cairo_ft_font_create now accepts an FT_Library parameter.
Bumped version number to 0.1.9
2003-10-30 12:39:49 +00:00
Carl Worth
fb46d7390e A few cleanups to eliminate a memory leak. 2003-10-30 10:55:04 +00:00