Commit graph

2812 commits

Author SHA1 Message Date
Alp Toker
e104fcab1c Introduce cairo_has_current_point()
cairo_has_current_point() can be used to determine whether a current
point is defined. We introduce this new symbol with a boolean return
value to avoid the versioning ambiguity of modifying
cairo_get_current_point(). This way we also don't have to map what
should be a routine operation to an error condition as was previously
proposed.
2008-02-06 01:06:01 -05:00
Alp Toker
1f0c3d0689 Revert "Change cairo_get_current_point() to return cairo_status_t instead of void"
This reverts commit b3eea75d1f.

Reverted in favour of an alternative approach.

Conflicts:

	src/cairo.c
2008-02-06 01:06:00 -05:00
Vladimir Vukicevic
1d93e14876 Followup patch to dashed stroke optimization
Make sure that we don't test lines that start or end inside the box,
since our algorithm will find intersections on the wrong ends on the
line, and not count them.
2008-02-05 16:14:51 -08:00
Vladimir Vukicevic
4471e58c12 Optimize dashed strokes, part 2
Pass down the bounding box to the stroker, and avoid doing expensive
calculations for dash segments that are outside the box.
2008-02-05 15:04:28 -08:00
Vladimir Vukicevic
afbd82671f Optimize stroker by hoisting some calculations out of loops
sqrt and a few other floating-point operations were being done
repeatedly within a loop; those are now precalculated and passed
down where needed.
2008-02-05 15:04:25 -08:00
Vladimir Vukicevic
bda0baa255 Fix text-zero-len on ATSUI to not infinite loop 2008-02-05 15:04:15 -08:00
Adrian Johnson
2b0da0503b Ensure PS/PDF miter is >= 1.0
The PS Language Reference requires the PS miter to be >= 1.

The PDF Reference does not specify miter limits however acroread fails
to display pages when the miter is < 1. Older versions of ghostscript
crash when the PDF miter is < 1.
2008-02-05 00:02:17 +10:30
Adrian Johnson
a74e669234 PS: Implement reflected surface patterns
The image/meta-pattern is written once. A PS pattern twice the size of
the cairo pattern is created and the surface drawn four times in a
reflect pattern inside the PS pattern.

This fixes the extend-reflect and extend-reflect-similar PS test
failures.
2008-02-03 19:34:53 +10:30
Adrian Johnson
13663d1d50 PS: Implement linear gradient repeat and reflect 2008-02-03 17:10:56 +10:30
Adrian Johnson
367e50137e PDF: Use correct surface size when emitting patterns
Store the surface size in each pattern and smask group and use this
size when the pattern/group is emitted. This is required as a pattern
or group may be used from a meta surface with a different size to the
PDF surface. However the pattern or group is emitted after the the meta
surface content has been emitted and the surface size has been
restored to the the page size.

This fixes the following pdf test failures:
  extend-reflect-similar
  extend-repeat-similar
  mask
2008-02-02 21:22:16 +10:30
Carl Worth
2fee01e2d4 check-doc-syntax.sh: Fix for non-srcdir builds (such as make distcheck) 2008-01-30 04:54:39 -08:00
Jeff Muizelaar
3b0adf4f5a Use ADD instead of IN for clipping.
ADD is already special-cased by pixman, so using it instead avoids hitting
the slower general path.
2008-01-29 09:07:54 -08:00
Carl Worth
e2bb36fe08 wAdd proper error propagation to _cairo_matrix_compute_scale_factors
Before there was just an assert statement here that the
determinant of the matrix was not infinite. That was bogus
since a user-provided can end up here. So instead, do the
correct error propagation of any CAIRO_STATUS_INVALID_MATRIX
error as necessary.

This eliminates the current failure of the invalid-matrix
test case.
2008-01-29 09:01:00 -08:00
Carl Worth
8493222357 Initialize return values for cairo_*_extents in case of error
Previously we left the return values alone, which set the
user up for a nasty trap, (using potentially uninitialized
values with no indication that there was an error). So now
we initialize these values to 0.0 if the cairo_t is in error.

The fixed functions include:

	cairo_path_extents
	cairo_stroke_extents
	cairo_fill_extents
	cairo_clip_extents
	cairo_font_extents
2008-01-29 05:40:39 -08:00
Carl Worth
6bdba4b4be Add missing libcairo_font_subset_sources to fix the build 2008-01-29 05:27:10 -08:00
Nis Martensen
3d82056cee Fix typos 2008-01-29 05:32:24 -05:00
Behdad Esfahbod
b28f4f57f2 [src/Makefile.am] Reorganize
Main goal was to be able to pass list of all cairo sources, enabled or
not, to check-doc-syntax.sh such that it doesn't check *.h, *.c, *.cpp
because that can be annoying when bisecting.
2008-01-29 04:32:55 -05:00
Behdad Esfahbod
cfce362375 [cairo_operator_t] Mark DestAtop unbounded and document boundedness 2008-01-29 01:27:47 -05:00
Behdad Esfahbod
f9b90e475e [doc] Fix cairo_operator_t docs to make Carl (and Keith) happy 2008-01-29 01:20:03 -05:00
Behdad Esfahbod
013781137f [cairo-image-surface.c] Cleanup stride checking and improve docs 2008-01-29 00:43:10 -05:00
Behdad Esfahbod
81e4cc3bd7 [cairo_image_surface_create_for_data] Document stride error status 2008-01-29 00:43:10 -05:00
Behdad Esfahbod
6153a3b620 [doc] Run check-doc-syntax.sh for SGML docs too 2008-01-29 00:43:10 -05:00
Behdad Esfahbod
3f7d301786 [src/check-doc-syntax.sh] Skip test if GNU grep is not available 2008-01-29 00:43:10 -05:00
Behdad Esfahbod
47e0ecbea5 [configure.in] Generate a cairo-no-features.h with macros for disabled supported backends
to trick gtk-doc with it.
2008-01-28 23:26:35 -05:00
Behdad Esfahbod
9d8990b6bd [doc] Remove excess paranthesis 2008-01-28 23:23:00 -05:00
Behdad Esfahbod
a55f65b5d2 [doc] Fix typo 2008-01-28 22:25:37 -05:00
Behdad Esfahbod
52cc603db1 [doc] Stricter syntax check for type names, update test 2008-01-28 22:10:20 -05:00
Behdad Esfahbod
b790c5a6bc [doc] Replace 'NOTE' by 'Note' and add it to test 2008-01-28 21:53:44 -05:00
Behdad Esfahbod
f0633f4449 [doc] Make sure all function names in docs are followed by () 2008-01-28 21:49:57 -05:00
Behdad Esfahbod
9ba8f6b1b0 [src/check-doc-syntax.sh] Check for various doc syntax consistency rules 2008-01-28 21:49:26 -05:00
Behdad Esfahbod
c133ee5acc [doc] Improve docs for new API 2008-01-28 21:00:21 -05:00
Behdad Esfahbod
0d898f2bad [doc] Make sure all type names in docs are prefixed by # 2008-01-28 20:49:44 -05:00
Behdad Esfahbod
9ecde82d35 [doc] Make sure all macro names in docs are prefixed by % 2008-01-28 20:48:48 -05:00
Behdad Esfahbod
099c3c2602 [doc] Another enum nick expansion 2008-01-28 20:32:35 -05:00
Behdad Esfahbod
b7d43d235c [src/check-*] Shut make up 2008-01-28 20:14:52 -05:00
Behdad Esfahbod
dd7ce76294 [doc] Expand a couple nicks to full enum names 2008-01-28 19:54:27 -05:00
Behdad Esfahbod
c624ff4654 [cairo_operator_t] Improve docs 2008-01-28 19:45:18 -05:00
Behdad Esfahbod
73b184fb9c [src] Fix gtk-doc warnings 2008-01-28 19:45:18 -05:00
Carl Worth
8709b943c6 Fix some documentation typos 2008-01-28 16:15:28 -08:00
Carl Worth
e48d7ca802 Add example to documentation of cairo_pattern_set_filter
It's helpful to let the reade know about cairo_get_source here.
2008-01-28 16:11:39 -08:00
Carl Worth
cd26fa266b Add documentation for cairo_filter_t 2008-01-28 16:10:10 -08:00
Carl Worth
cc94dce250 Return NULL from cairo_xlib_surface_get_xrender_format without an error
The NULL return value will only happen if the X Render extension
is not available. We've already got that NULL return value
documented, so it's not an error if the user asks for it. In
particular, it's definitely not a surface-type mismatch.
2008-01-28 15:39:39 -08:00
Carl Worth
3c018a6e5a Add new API cairo_xlib_surface_get_render_format 2008-01-28 15:39:39 -08:00
Carl Worth
8881154072 Add missing cairo_private (for _pixman_format_to_masks) 2008-01-28 15:39:39 -08:00
Carl Worth
3841cc0932 Clarify the documentation of stride within cairo_image_surface_create_for_data 2008-01-28 15:39:39 -08:00
Carl Worth
13a5624277 Rename cairo_image_surface_stride_for_width to cairo_format_stride_for_width
Thanks for Behdad for the suggested name improvement. Also, make
it more clear that the stride passed to cairo_image_surface_create_for_data
should come from calling cairo_format_stride_for_width with the
same width.
2008-01-28 15:39:39 -08:00
Carl Worth
dc67de3d8b Add cairo_image_surface_stride_for_width
Document this function as a required call to get the correct
stride value before calling cairo_image_surface_create_for_data.
This means that previously-failing calls with non-multiple-of-4
stride values are now documented as errors. Also, we now have
the possibility of moving to more stringent alignment constraints,
(one can imagine doing 64-bit or 128-bit boundaries for example).
2008-01-28 15:39:36 -08:00
Carl Worth
b151cb0709 Rename cairo_format_width to cairo_format_bits_per_pixel and correct its logic 2008-01-28 15:39:36 -08:00
Nis Martensen
0874834ec4 Describe cairo_operator_t, add link to operators/ wiki page 2008-01-28 08:38:27 -05:00
Vladimir Vukicevic
936edecb35 [quartz] only use DrawTiledImage if transformed image is integer aligned
This Quartz API seems to only tile at integer coordinates; if the source image is
scaled to anything less than integer-aligned, seams appear between tiles.  Detect
this and fall back to slower but more general CGPattern path.
2008-01-27 16:52:39 -08:00