Commit graph

1500 commits

Author SHA1 Message Date
Carl Worth
f1db013547 Fix typo that was resulting in device glyph_extents of INT16_MAX in some cases. 2006-10-05 12:31:50 -07:00
Behdad Esfahbod
2041db9196 [Makefile.am] Pass srcdir down to the tests 2006-10-05 11:53:06 -04:00
Carl Worth
ad02773e9b Remove unused variable 2006-10-04 17:14:12 -07:00
Carl Worth
783b69a8d3 Rename the create_for_status pattern to create_in_error. 2006-10-04 17:14:12 -07:00
Carl Worth
01502471e3 Add new _cairo_pattern_create_for_status so that patterns properly propagate errors.
In particular, many possible error values on a surface provided
to cairo_pattern_create_for_surface were previously being swallowed
and a nil pattern was returned that erroneously reported
CAIRO_STATUS_NO_MEMORY.
2006-10-04 17:14:12 -07:00
Carl Worth
c9c259903d Cast to squelch warning message 2006-10-04 17:14:12 -07:00
Carl Worth
4d2b54a271 Fix cairo_image_surface_create to report INVALID_FORMAT errors.
This adds a new nil cairo_image_surface to hold CAIRO_STATUS_INVALID_FORMAT.
Previously the detected error was being lost and a nil surface was
returned that erroneously reported CAIRO_STATUS_NO_MEMORY.
2006-10-04 17:14:12 -07:00
Behdad Esfahbod
1e0e207509 [check-headers.sh] Don't use '\>' regexp syntax 2006-10-02 14:35:35 -04:00
Carl Worth
3b58d92f5a Add missing 'Since: 1.4' tags to documentation of 'clip getter' functions.
The following documented symbols were missing this tag:

	cairo_clip_extents
	cairo_copy_clip_rectangles
	CAIRO_STATUS_INVALID_INDEX
	cairo_rectangle_t
	cairo_rectangle_list_t
2006-09-29 17:47:01 -07:00
Carl Worth
9cacced88f Add documentation for cairo_rectangle_list_destroy 2006-09-29 17:44:34 -07:00
Carl Worth
beb778f482 Use consistent wording to document cairo_in_fill, cairo_in_stroke, cairo_fill_extents, and cairo_stroke_extents. 2006-09-29 16:56:36 -07:00
Carl Worth
b99d41a0b0 Fix typo in documentation of cairo_in_fill (thanks to Jonathan Watt) and clarify a bit. 2006-09-29 16:46:39 -07:00
Vladimir Vukicevic
b05400b559 [nquartz] Return correct values from operation setup function
Leftovers from an old half-completed patch that was breaking the world.
This fixes the world, or at least one tiny part of it.
2006-09-28 14:58:49 -07:00
Robert O'Callahan
17eeacfba8 Remove redundant call to _cairo_surface_get_extents
We called it just above with the same parameters.
2006-09-26 15:48:06 -07:00
Carl Worth
5f833c134b Fix cairo_copy_path and cairo_copy_path_flat to propagate errors.
One of these functions was already documented to be doing this, and
the other one should have been. Now the documentation and behavior
for both are consistent, (and the path-data test case verifies this).
2006-09-26 15:48:06 -07:00
Kristian Høgsberg
f9165638bf Compute right index when looking up left side bearing.
When looking up the short entries in the second part of
the hmtx table, compute the size of the first part correctly.

Fix from Adrian, see:

  https://bugs.freedesktop.org/show_bug.cgi?id=8180#c12
2006-09-26 17:33:29 -04:00
Behdad Esfahbod
7c3062240a [configure] Print out whether SVG and PDF surfaces can be tested 2006-09-26 13:54:28 -04:00
Robert O'Callahan
191e108b93 Add clip getters API + tests
Add new public API methods:

void cairo_clip_extents (cairo_t *cr,                                               double *x1, double *y1,
    double *x2, double *y2);
cairo_rectangle_list_t *cairo_copy_clip_rectangles (cairo_t *);
void cairo_rectangle_list_destroy (cairo_rectangle_list_t *);

Also add 'get-clip' and 'get-path-extents' tests.
2006-09-25 23:22:45 -07:00
Robert O'Callahan
a8ca155f83 Fix stroke/fill extents bounding boxes
Correctly return the transformed bounding box for stroke/fill extents,
instead of just transforming the two corners separately.
2006-09-25 23:16:54 -07:00
Robert O'Callahan
37fa632e59 Fix _cairo_matrix_transform_bounding_box to return tightness info
Add return is_tight value to the internal function, indicating whether
the transformed bounds still remain axis-aligned.
2006-09-25 23:14:43 -07:00
Vladimir Vukicevic
303b529195 dash and pattern getter functions
Adds API functions for inspecting the current dash state, as well as
the contents of pattern objects:

  cairo_get_dash
  cairo_get_dash_count
  cairo_pattern_get_rgba
  cairo_pattern_get_surface
  cairo_pattern_get_color_stop_rgba
  cairo_pattern_get_color_stop_count
  cairo_pattern_get_linear_points
  cairo_pattern_get_radial_circles
2006-09-19 12:19:21 -07:00
Vladimir Vukicevic
a56b962428 Add win32 output files to gitignore 2006-09-19 12:19:21 -07:00
Behdad Esfahbod
42a0c6bd59 check-def.sh: Only allow _cairo_.*_test_.* symbols, not all _cairo.* ones 2006-09-19 13:05:29 -04:00
Behdad Esfahbod
ae355453d8 cairo-nquartz.h: Add missing cairo_public decorators. 2006-09-18 13:32:41 -04:00
Behdad Esfahbod
6c01b2ffb3 cairo-directfb.h: Add missing cairo_public decorators 2006-09-18 13:32:19 -04:00
Behdad Esfahbod
7bb72f6453 cairo-pdf.h: Add missing cairo_public decorators 2006-09-18 13:32:00 -04:00
Behdad Esfahbod
01f10fb27a check-headers.sh: Add a test for cairo_public decorators in public headers
Test fails currently because of bug 8313 and similar issues.
2006-09-18 13:31:26 -04:00
Peter Weilbacher
2fd0ad9489 OS/2 build changes 2006-09-15 11:18:47 +02:00
Peter Weilbacher
8c6baacefa OS/2 backend files 2006-09-15 11:18:14 +02:00
Carl Worth
edfceea853 Fix typo in error message (enhacement -> enhancement) 2006-09-13 15:27:32 -07:00
Vladimir Vukicevic
3623da441a [nquartz] Initial commit of native quartz surface
Inital commit of Native Quartz surface.  The main missing functionality
is mask() support (which is just a noop right now, except for the simple
solid-alpha case).
2006-09-13 14:48:40 -07:00
Stuart Parmenter
f1bd0b9f98 [win32] correct win32 show_glyphs for non-y-aligned text
Correctly calculate destination glyph coordinates for win32_show_glyphs.
2006-09-12 16:27:40 -07:00
Vladimir Vukicevic
0166538126 [win32] Support for DDBs, AlphaBlend fix
Add support for the win32 surface using DDBs for similar surfaces and the
like when the orignal surface is created from a DC, or when a DDB is
explicitly created.  A DIB is still created if alpha is required.

Also fixes a case where blitting win32 RGB24 -> ARGB32 surfaces was causing
alpha to leak into the ARGB32 surface instead of being set to fully opaque.
2006-09-12 16:08:40 -07:00
Vladimir Vukicevic
924bbd06f3 Check for valid path status value before calling _cairo_set_error
cairo_status_t is a signed type, so we need to check for invalid codes
that are < 0 as well.

Also removes the MSVC goop in path-data.c that was attempting to work
around the assert earlier.
2006-09-11 12:36:41 -07:00
Carl Worth
bcc13ede9b Move the REPLACED/DEPRECATED_BY macros from cairo.h to cairo-deprecated.h 2006-09-11 11:12:47 -07:00
Carl Worth
79aed8c5fc Deprecated CAIRO_FORMAT_RGB16_565. Add cairo-deprecated.h . 2006-09-11 11:05:02 -07:00
Vladimir Vukicevic
00d5a2ed48 [win32] Makefile.win32: use correct (/MD) runtime library flag everywhere
There was a bad mix of LIBCMT (the static runtime lib) and MSVCRT (the dynamic
one) before, because LIBCMT is the default.  This specifies /MD everywhere.
2006-09-09 23:29:17 -07:00
Vladimir Vukicevic
5ab72579ef Correctly acquire/release mutex in _cairo_scaled_font_map_destroy
_cairo_scaled_font_map_destroy needs to both lock/unlock the mutex,
not just unlock it.
2006-09-09 19:52:48 -07:00
Vladimir Vukicevic
0e59041321 [win32] win32-specific Makefiles for building with MSVC
This patch adds a bunch of makefiles for building cairo with Visual C++.
gnu make is still required, and make must be run from a command prompt
that has the Visual C++ paths set up, as well as has the cygwin environment
in the path.  Run 'make -f Makefile.win32'.
2006-09-09 17:08:18 -07:00
Vladimir Vukicevic
3c5a02c3ed [win32] Misc win32 compilation fixes
Fix win32/MSVC defines for snprintf, inline, and M_PI
2006-09-09 17:06:21 -07:00
Vladimir Vukicevic
dbd0fa193c [win32] Make cairo as a win32 static library possible
This adds a win32 initialization function that is called from all
surface creation and font creation functions to ensure that the win32
mutexes are initialized.
2006-09-09 17:05:00 -07:00
Behdad Esfahbod
99360bd35d cairo_show_glphs: Mark glyphs argument as const. 2006-09-08 15:12:07 -04:00
Carl Worth
c475d2ca69 Fix bitmap-font test failure by not generating a type1 font for a bitmap font.
This was simply a matter of ensuring that the UNSUPPORTED
return value was checked for and propagated all the way
out of cairo-type1-fallback.c
2006-09-07 17:46:21 -07:00
Carl Worth
f6bd76a4b2 type1: Enforce pre-allocation usage and fail-proof behavior of charstring_encode functions
These functions were previously returning a status value that
was almost never being checked. Instead we now make these
functions void and enforce a usage pattern that the destination
array must be pre-grown to accomodate the results. This is
verified with a couple of assert statements.

The pre-allocation was already happening with all but one call.
That call is now also fixed up.
2006-09-07 17:36:36 -07:00
Carl Worth
942cd2e026 Add _cairo_array_size to allow querying the allocated size 2006-09-07 17:33:35 -07:00
Carl Worth
8796b19b5d cairo-type1-fallback.c: Regularize some whitespace. 2006-09-07 17:09:37 -07:00
Carl Worth
8364251db5 cairo_type1_font_create: Fix missing NO_MEMORY check and cleanup style. 2006-09-07 17:07:54 -07:00
Carl Worth
75ac7ee171 Remove font->status from cairo_type1_font_t
This object doesn't act like a status-holding object, (there are no
"if (status) return;" inertness-enforcing statements for example),
so it shouldn't pretend like it is.
2006-09-07 16:54:31 -07:00
Carl Worth
c28c33a588 Check status value of output_stream object at time of destroy 2006-09-07 16:42:04 -07:00
Carl Worth
179f7defdf Use new return value from _cairo_output_stream_destroy
This is a little simpler than the old idiom of calling
_cairo_output_stream_get_status just before calling
_cairo_output_stream_destroy.

I had hoped this technique would apply in more cases, but
many cases want to separate the two actions anyway to do
conditional assignment of the status value, (in order to
not overwrite an earlier error value).
2006-09-07 16:10:40 -07:00