Commit graph

974 commits

Author SHA1 Message Date
Emmanuel Pacaud
2af29f720f SVG: use xmlOutputBuffer for file creation, instead of dumping xml tree in a memory buffer. 2006-03-14 23:02:39 +01:00
Carl Worth
6f0d8eedc5 _clip_and_composite_trapezoids: Avoid NULL pointer dereference due to OOM.
This closes bug #6197:

	Null pointer dereference on OOM in _clip_and_composite_trapezoids()
	https://bugs.freedesktop.org/show_bug.cgi?id=6197
2006-03-13 12:25:25 -08:00
Carl Worth
79075b2cb1 cairo-clip: Fix memory leak during OOM handling.
This closes bug #6196:

	Memory leak in _cairo_clip_intersect_path (src/cairo-clip.c)
	https://bugs.freedesktop.org/show_bug.cgi?id=6196
2006-03-13 12:20:23 -08:00
Carl Worth
fc51a78a1e cairo-pdf-surface: Close memory leak during OOM handling.
This fixes bug #6186:

	Memory leak in emit_image_rgb_data (src/cairo-pdf-surface.c)
	https://bugs.freedesktop.org/show_bug.cgi?id=6186
2006-03-13 12:14:47 -08:00
Carl Worth
25cccaaa1f Merge branch 'cairo-origin' into cairo 2006-03-13 12:05:37 -08:00
Carl Worth
c780f4a562 cairo-output-stream: Don't dereference a NULL pointer due to OOM.
This close bug #6176:

	Null pointer dereference on OOM in _cairo_output_stream_create_for_file()
	https://bugs.freedesktop.org/show_bug.cgi?id=6176
2006-03-13 12:05:13 -08:00
Emmanuel Pacaud
118f71b438 Merge branch 'master' of git+ssh://emmanuel@git.cairographics.org/git/cairo 2006-03-12 19:30:29 +01:00
Emmanuel Pacaud
66599911e0 Don't duplicate unmodified SVG surfaces 2006-03-09 22:09:14 +01:00
Mart Raudsepp
92e09ee72f Complete the CAIRO_PATTERN_TYPE renaming
This fixes compilation of the glitz backend, and also fixes missing
renames in win32, atsui, and directfb backends.
2006-03-09 08:23:43 -08:00
Carl Worth
1cffb39ff0 cairo_show_glyphs: Do nothing if num_glyphs == 0 2006-03-08 08:16:49 -08:00
Emmanuel Pacaud
7563a23921 Fix self-copy test 2006-03-05 23:49:38 +01:00
Carl Worth
3333bba82d Merge branch 'show-glyphs-many' into cairo 2006-03-03 15:41:14 -08:00
Carl Worth
3370cd6318 _cairo_xlib_surface_old_show_glyphs: Break up rendering into chunks to fit
into X max request length protocol limits.

This fixes bug #5528:

	_XError from XRenderCompositeText8
	https://bugs.freedesktop.org/show_bug.cgi?id=5528
(cherry picked from 7d498ca912 commit)
2006-03-03 15:40:58 -08:00
Emmanuel Pacaud
62812b25c7 Fix gcc 4.0 signedness warnings 2006-03-02 14:54:37 +01:00
Christian Biesinger
3490ed9896 Remove trailing comma in enumeration
This fixes a gcc -pedantic warning and compilation with the xlc compiler.
2006-03-01 19:17:00 +01:00
Vladimir Vukicevic
2fb016c75b Merge branch 'master' of git+ssh://git.cairographics.org/git/cairo 2006-03-01 11:26:48 +01:00
Vladimir Vukicevic
8176c93bc4 Revert "Remove ft-font's usage of device offset surface fields for storing bearings"
Bogus fix; misunderstood the relationship between the font bearings
and the computed device offsets.  Real fix on my device offsets branch.

This reverts 49b4fe10d0 commit.
2006-03-01 11:26:30 +01:00
Vladimir Vukicevic
f5566c9b20 Merge branch 'master' of git+ssh://git.cairographics.org/git/cairo 2006-02-28 16:29:45 +01:00
Christian Biesinger
d985a9d669 Fixing BeOS surface part II 2006-03-01 00:40:35 +01:00
Christian Biesinger
566bb18dfe Updating BeOS surface per the get_type changes 2006-03-01 00:06:43 +01:00
manu
a69b3f2116 s/CAIRO_PATTERN/CAIRO_PATTERN_TYPE/ 2006-02-28 23:44:01 +01:00
manu
0341305fd2 Revert "Git test"
This reverts ef1c5c3961 commit.
2006-02-28 23:33:00 +01:00
manu
ef1c5c3961 Git test 2006-02-28 22:52:45 +01:00
Vladimir Vukicevic
49b4fe10d0 Remove ft-font's usage of device offset surface fields for storing bearings
cairo-ft-font was being naughty and storing glyph bearings in the
surface device_[xy]_offset fields -- this had no effect previously,
because _cairo_surface_composite ignored those fields, but once it
starts handling device offsets itself, this causes ft text rendering
to break.
2006-02-28 16:23:14 +01:00
Carl Worth
6fe93cbf5b Merge branch 'get-type' into cairo 2006-02-28 02:36:45 -08:00
Carl Worth
1dd6e417c1 Add testing for cairo_surface_get_type.
All test targets now list an expected cairo_surface_type_t. Add notes
on current limitations of PDF/PS/meta-surface support that causes
CAIRO_CONTENT_COLOR similar surfaces of PDF and PS surfaces to be
returned as image surfaces.

Add cairo_internal_surface_type_t for the meta, paginated, and various
test surfaces.
2006-02-28 00:55:27 -08:00
Carl Worth
cd84e2ab32 Add documentation for cairo_font_face_get_type,
cairo_scaled_font_get_type, cairo_surface_get_type, and
cairo_pattern_get_type.
2006-02-27 23:15:45 -08:00
Carl Worth
5797f81485 Implement cairo_pattern_get_type 2006-02-27 23:12:43 -08:00
Carl Worth
5ae0b9f912 Implement cairo_surface_get_type 2006-02-27 23:11:32 -08:00
Carl Worth
1769830e6e Implement cairo_scaled_font_get_type 2006-02-27 17:22:45 -08:00
Carl Worth
f2245a7932 Remove unused RCS $Id:$ tags. 2006-02-27 17:07:22 -08:00
Vladimir Vukicevic
1a14419126 Win32: Handle BitBlt in get_image failure and AlphaBlend not being supported
If the BitBlt in get_image fails, we pretty much can't do anything -- so
fill the destination with white and hope for the best.  This enables
somewhat accurate printing of complex operations.  Also, check the
destination device caps before calling AlphaBlend; return UNSUPPORTED if
the destination DC can't do AlphaBlend.
(cherry picked from 9831de538e347a624af5b0ca38242b198b64bd45 commit)
2006-02-27 13:47:31 +01:00
Vladimir Vukicevic
2d784815ff Win32: Set surface format based on device caps
If the DC is a display DC, inspect its depth and set out local format
appropriately.  If it's not a display DC, assume RGB24.
(cherry picked from 6dd0a70d271f93df95f4bcaff5073b9bf90cecb6 commit)
2006-02-27 13:47:27 +01:00
Vladimir Vukicevic
68ed40b6da Win32: Fix up src coords before calling AlphaBlend/BitBlt to avoid invalid calls
Fixes up src coords and width/height before calling AlphaBlend/BitBlt; it's
an error to try to use a region that extents outside of the source surface
as a source DC.

Doesn't repair the extra region relative to the operator -- e.g. regions
outside of an ARGB source surface with SOURCE operator should be cleared
to fully transparent black in the destination.
(cherry picked from bc19c5b64b0e38e9d20045907d7b47d79f6afc60 commit)
2006-02-27 13:47:20 +01:00
Vladimir Vukicevic
0852cd4492 Win32: rename cairo_surface_create_dib to cairo_surface_create_with_dib
Also adds some documentation for the win32 creation functions.
(cherry picked from 3a148bd620d709237d98a72f65118759bfc5a76d commit)
2006-02-27 12:53:38 +01:00
Vladimir Vukicevic
0fe8a93d95 Win32: expose win32 DIB (image) surface creation function, and DC getter
Adds cairo_win32_surface_create_dib() for creating a win32 DIB-backed
surface with a particular format.  Also exposes
cairo_win32_surface_get_dc() to obtain the DC of a win32 surface.
(cherry picked from 0813a1b9b6f35d786fe8cb0d4748771023956cde commit)
2006-02-27 12:53:36 +01:00
Vladimir Vukicevic
f4b34df6b6 Have mark_dirty always invalidate the last clip set on the surface
mark_dirty will force cairo to set its own clip the next time the cairo clip
is applied after mark_dirty; otherwise we run the risk of cairo's cached
clip and the device clip getting out of sync if any clip-related functions
are used on the native device back-end.
(cherry picked from 1935a28949da8569f924e37714ec19571fa95987 commit)
(cherry picked from ef8b472f0ffab7b8b828d7297c7e454bb22bd5ec commit)
2006-02-27 12:24:09 +01:00
Vladimir Vukicevic
e0f4eecb91 Win32: Rework clip and extents handling
- Save extents at surface creation and always return these
- Simplify clipping paths
(cherry picked from a67722b3d7280e6c2375778c2d46556cca261bfc commit)
(cherry picked from 7ce09732a978749a4da814feb77f50161dc42c91 commit)
2006-02-27 12:23:23 +01:00
Vladimir Vukicevic
f6b4fabaf5 Misc compilation fixes (C++-style comments, M_PI decls, etc.)
(cherry picked from d0cc56b9a24fa59febc15ac5de073da0e785e1cc commit)
(cherry picked from a6a054abe45287eb950c294e20366594313138f5 commit)
2006-02-27 12:22:33 +01:00
Christian Biesinger
dba214b944 Use C-style comments rather than C++-style 2006-02-26 11:13:42 +01:00
Carl Worth
5a3c30eafe Implement cairo_font_face_get_type.
Add font type to font_face_backend.
Also export new CAIRO_FONT_TYPE_TOY.
2006-02-24 15:32:26 -08:00
Carl Worth
5928d03b49 Remove private cairo_pattern_type in favor of new public one. Rename
all values to now include TYPE. Drop _GRADIENT from LINEAR and RADIAL.
2006-02-24 15:25:19 -08:00
Carl Worth
f58f39d7af cairo.h: Fix typo (thanks to Torsten Schoenfeld) 2006-02-24 15:06:50 -08:00
Carl Worth
2fc9fd79e7 cairo.h: Fix two typos in the documentation. 2006-02-24 11:37:50 -08:00
Carl Worth
9287d60d60 Add get_type functions: cairo_surface_get_type,
cairo_pattern_get_type, cairo_font_face_get_type, and
cairo_scaled_font_get_type.
2006-02-24 11:24:03 -08:00
Christian Biesinger
07205ddc4b Mark private functions as cairo_private
(cherry picked from a1c72cd8f244e97d4b6fe3e5d3efa622c8b3f7f9 commit)
2006-02-24 01:38:27 +01:00
Christian Biesinger
0fc25c9853 Don't call _cairo_error when returning an error
Only return it when returning a nil surface.
2006-02-18 21:45:58 +01:00
Christian Biesinger
5c5ea6d523 Fix typo. 2006-02-18 19:36:18 +01:00
Christian Biesinger
f4d9e55962 Use TRUE/FALSE instead of 1/0 for boolean values
(cherry picked from e1703520169e0cf972a6edcaa8660d14806d8c6f commit)
2006-02-16 23:56:16 +01:00
Carl Worth
57edf3f28f Normalize indentation after previous commit. 2006-02-16 09:05:52 -08:00