Commit graph

5185 commits

Author SHA1 Message Date
Carl Worth
8efb103600 Extend fallback-resolution test to expose bug with groups
Groups appear to always be rendered with a fallback resolution of
72.0 ppi rather than the desired fallback resolution.
2008-05-21 10:23:37 -07:00
Behdad Esfahbod
26eeb1c7ee [cairo-surface] Allow flush and finish calls after surface is finished
Flushing and finishing a surface after it has already been finished is a
very well-defined operation: no-op.  Allow and document that.
2008-05-16 21:59:45 -04:00
Behdad Esfahbod
168447cc2b [user-font] Use opaque colors such that PS backend gets tested
Also update ref images.  All backends pass now.
2008-05-15 20:09:17 -04:00
Behdad Esfahbod
556b16d6a2 [cairo-traps] Fix overflow in traps_path code
This was causing the user-font test failure in type1 subsetting
code as the type1 code creates a font at size 1000.
2008-05-15 20:03:05 -04:00
Behdad Esfahbod
b355ac7a9f [cairo-fixed] Implement _cairo_fixed_mul_div()
Computes a*b/c where a,b,c are cairo_fixed_t.
2008-05-15 20:02:33 -04:00
Behdad Esfahbod
84606a900f [cairo-surface] Fix compiler warnings
by adding new status value to switch.
2008-05-15 19:41:49 -04:00
Behdad Esfahbod
142ba30604 [test/Makefile.am] Add 'make run' target
It runs tests under a tool specified tool.  For example:

	make run TOOL=gdb TESTS=user-font TARGETS=pdf
2008-05-15 19:27:17 -04:00
Behdad Esfahbod
537ffa7628 [cairo-xlib-surface.c] Fix memmove bug
This was introduced in b7272e9e8e
2008-05-15 18:47:24 -04:00
Behdad Esfahbod
4dd4d96fb1 [cairo-surface] Add cairo_surface_get_fallback_resolution() 2008-05-15 17:20:30 -04:00
Behdad Esfahbod
2321b91cba [cairo-pattern] Make a free() call conditional
to emphasize that the pointer may be NULL
2008-05-15 16:38:56 -04:00
Behdad Esfahbod
62652ecab7 [test/user-font] Another minor tweak to the font 2008-05-15 13:28:03 -04:00
Behdad Esfahbod
df9deb1853 [user-font] Set correct device-offset for rotated text
Part of patch from Peter Clifton
2008-05-15 13:13:30 -04:00
Behdad Esfahbod
16fe67ea19 [cairo-path-fixed] Implement full-matrix _cairo_path_fixed_transform()
Based on patch from Peter Clifton.
2008-05-13 16:10:28 -04:00
Behdad Esfahbod
f68fb2c747 [test/user-font] Add some more glyphs
The glyph for 'z' now reveals a bug in PDF type1 code.
2008-05-13 14:07:42 -04:00
Behdad Esfahbod
569cc30411 [user-font] Normalize the space we compute extents in
This way we wouldn't suffer from the limited precision of cairo_fixed_t.
Bug reported by Peter Clifton on mailing list.
2008-05-10 14:58:11 +02:00
Behdad Esfahbod
f1a0e9df0e [user-font] Round glyph origin position 2008-05-10 13:49:23 +02:00
Behdad Esfahbod
17f21ea307 [cairo-user-font] Implement user fonts 2008-05-10 01:21:45 +02:00
Behdad Esfahbod
9f2971440b [doc] Remove cairo-quartz-image-surface from docs
Docs only include stable API.
2008-05-10 01:21:44 +02:00
Behdad Esfahbod
74eea0f297 [cairo-quartz-image-surface] Remove one abuse of out-of-memory status
Vlad, you need to stop throwing random OOM errors...
2008-05-10 01:21:44 +02:00
Behdad Esfahbod
dca892c83e Fix gtk-doc warnings 2008-05-10 01:21:44 +02:00
Behdad Esfahbod
1246ff8aec [cairo-test] Implement cairo_test_log_path() to dump a cairo_path_t to logs
Dumping paths is so hard in C.  Shouldn't be.  At least not when debugging...
2008-05-09 23:21:14 +02:00
Behdad Esfahbod
dc33760fcb [cairo-scaled-font] In _cairo_scaled_glyph_lookup, better handle UNSUPPORTED
If we ask for a glyph info piece and the backend doesn't provide it,
we should return UNSUPPORTED, even if the backend returned SUCCESS
(perhaps because the backend doesn't know about that particular piece
of glyph info).
2008-05-09 23:20:53 +02:00
Behdad Esfahbod
a63dc13377 [cairo-scaled-font] Add a meta-surface member to scaled glyphs
No one currently uses it.
2008-05-09 15:56:35 +02:00
Behdad Esfahbod
11a0884168 Add CAIRO_INTERNAL_SURFACE_TYPE_NULL and cairo_nul_surface_create()
It creates a surface that does nothing.  This can be used with
cairo-analysis-surface, to compute bounds of cairo drawings without doing any
actual drawings.
2008-05-09 15:54:19 +02:00
Behdad Esfahbod
08334be905 [cairo-meta-surface] Add _cairo_meta_surface_get_path()
Which generates the path for each cairo operation.  If there's any paint,
mask, or intersect-clip-path operations in the meta-surface, UNSUPPORTED
is returned.

Strokes are currently tesselated to traps, then traps converted to path.
Should be made to use stroke_to_path() when we implement that.
2008-05-09 15:54:13 +02:00
Behdad Esfahbod
674cba89fe [cairo-traps] Add _cairo_traps_path()
It appends path for each trap to the path.
2008-05-09 15:54:13 +02:00
Behdad Esfahbod
af1e168bbb [cairo-meta/analysis-surface] Make width/height of -1,-1 mean unbounded surface 2008-05-09 15:54:12 +02:00
Behdad Esfahbod
a6eb9be106 [_cairo_surface_get_extents()] return UNSUPPORTED if surface has no bounds
and set the extents to the infinite bounds.

A surface has no bounds if it does not provide get_extents(), or if its
get_extents() returns UNSUPPORTED.
2008-05-09 15:54:12 +02:00
Behdad Esfahbod
d37788f995 [cairo-analysis-surface] Initialize page bounding box
If there was no operations played to the analysis surface, page_bbox
was being left uninitialized.
2008-05-09 15:54:12 +02:00
Behdad Esfahbod
ee3672efdb [cairo-pattern] Extend infinite pattern extents to negative coordinates too
With things like meta-surface, the assumption that coordinates are always
non-negative make no sense.  Extend the "infinite" extents accordingly.

Also remove stale comment.  extents->width/height are unsigned these days and
cover the full range.
2008-05-09 15:54:12 +02:00
Behdad Esfahbod
f81b857e1f [cairo-paginated-surface] Clean up reference counting mess
Previously the paginated constructor didn't reference the target surface, but
simply assume ownership of the reference, and then unref it when shutting
down.  The callers to paginated constructor then, where just give away their
reference to paginated and not unref the reference they were holding.  While
this works correctly, it's against the usual idioms that everyone is
responsible for the reference they are holding, and should get their own
reference if they need to keep an object alive.  Fix it all.
2008-05-09 15:54:12 +02:00
Behdad Esfahbod
440b339da7 [cairo-analysis-surface] Hold reference to target surface 2008-05-09 15:54:12 +02:00
Behdad Esfahbod
25700f5cd0 [cairo-ft-font.c] Throw error on font type mismatch and remove unused function 2008-05-09 15:54:12 +02:00
Behdad Esfahbod
2a1661fba9 [cairo-win32-font.c] Return error on font type mismatch 2008-05-09 15:54:12 +02:00
Behdad Esfahbod
2a9bb6f78c Add CAIRO_STATUS_FONT_TYPE_MISMATCH 2008-05-09 15:54:12 +02:00
Behdad Esfahbod
4d77dfc78d [cairo-analysis-surface] Add _cairo_analysis_surface_[gs]et_ctm()
The functionality was there.  Just add getter/setter for the ctm.
2008-05-09 15:54:12 +02:00
Behdad Esfahbod
ad7cfb4af9 [cairo-analysis-surface] Use _cairo_matrix_transform_bounding_box_fixed()
and other conversion functions.
2008-05-09 15:54:12 +02:00
Behdad Esfahbod
bdfda97f19 [cairo-matrix] Add _cairo_matrix_transform_bounding_box_fixed() 2008-05-09 15:54:11 +02:00
Behdad Esfahbod
6c9902fd74 Add more consts to function signatures and remove stale prototype 2008-05-09 15:54:11 +02:00
Behdad Esfahbod
0e965c970b [cairo-path-fixed] Add _cairo_path_fixed_append() 2008-05-09 15:54:11 +02:00
Behdad Esfahbod
e9b6bb06d6 [cairo-path-fixed] Add a couple consts to function signatures 2008-05-09 15:54:11 +02:00
Behdad Esfahbod
2a3eec1731 [cairo-rectangle] Add new convenience functions for working with cairo_box_t
_cairo_box_from_doubles, _cairo_box_to_doubles, _cairo_box_from_rectangle.
2008-05-09 15:54:11 +02:00
Behdad Esfahbod
6836b2b8ba [cairoint.h] Fix file name in comments 2008-05-09 15:54:11 +02:00
Behdad Esfahbod
ca8b917102 [cairo-surface] Call backend->flush even if backend->finish is null
Trivial bug.
2008-05-09 15:54:11 +02:00
Behdad Esfahbod
07cd614039 [cairo-scaled-font] Tolerate null scaled_font->backend->fini 2008-05-09 15:54:11 +02:00
Behdad Esfahbod
1f05cae0a9 [cairo-font-face] Tolerate null font_face->backend->destroy() 2008-05-09 15:54:11 +02:00
Behdad Esfahbod
96599225e2 Define CAIRO_RECT_INT_MIN/MAX such that ints do not overflow when converted to fixed
There's not much point in having integers that will overflow.
2008-05-09 15:54:11 +02:00
Behdad Esfahbod
eb63e5609e [_cairo_surface_set_device_scale] zero xy and yx matrix entries
Just in case...
2008-05-09 15:54:11 +02:00
Behdad Esfahbod
80c5906267 [cairo-surface] Tone down a Caution comment
We have tested the case of device transforms that have both translate and
scale.  So it basically works.  We just are not sure that we handle it in
all places (In fact we know we don't.)
2008-05-09 15:54:10 +02:00
Behdad Esfahbod
901c56cba2 [image surface] Rename cairo_image_surface_backend to _cairo_image_surface_backend 2008-05-09 15:54:10 +02:00