Commit graph

1491 commits

Author SHA1 Message Date
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
Carl Worth
89e7d5d420 Make _cairo_output_stream_destroy return the stream's status as a last gasp. 2006-09-07 16:01:07 -07:00
Nicholas Miell
203d70a562 Make the SLIM macros robust in the face of macro-renamed symbols
This doesn't actually fix the AMD64 link failure, but it does make the
foo/EXT_foo/INT_foo symbol names generated by the slim_hidden_proto()
and slim_hidden_def() macros consistent in the face of the meddling of
pixman-remap.h.

Signed-off-by: Nicholas Miell <nmiell@gmail.com>
2006-09-07 12:48:23 -07:00
Behdad Esfahbod
b5a64138bb [x86-64] check-plt.sh: match on JU?MP_SLO as on x86-64 "SLOT" is truncated 2006-09-06 16:39:18 -04:00
Behdad Esfahbod
cd1b665064 Add scripts to sanity check the shared object for exported and PLT symbols
src/check-def.sh checks that the list of symbols exported is the same as the
list of symbols in cairo.def, ie. symbols in public header files. (except for
symbols starting with _cairo)

src/check-plt.sh checks that no PLT entries exist for local function calls.
This makes sure we keep the 'slim' annotations uptodate.

These two are defined as tests in src/ and will be run during "make distcheck".
However, they are skipped if the commands 'nm' and 'readelf' are not found.
(We don't really rely on any functionality of eu-readelf, so using readelf
proper which should be more commonlly installed.)
2006-09-06 13:54:12 -04:00
Carl Worth
60c4add26a slim_hidden_proto: Move smeicolon from definition to use for consistency and legibility 2006-09-05 17:22:07 -07:00
Carl Worth
d7f08794ef Add many missing slim_hidden calls to bypass PLT entries for local use of public functions 2006-09-05 17:22:00 -07:00
Adrian Johnson
d716020db2 Generate Type 1 fonts from glyph outlines
This patch generates Type 1 fonts for the PS/PDF backends when TrueType
or Type 1 subsetting fails. This has the advantage over the current
Type 3 fallback of reduced font size and better quality rendering
in some PDF viewers. xpdf shows a large improvement in text display
quality with this patch.
2006-09-05 15:57:47 -04:00
Adrian Johnson
ad78eb7692 Improve error checking in TrueType subsetting
TrueType subsetting will SEGV when using OpenType fonts with CFF outlines.
2006-09-05 14:53:33 -04:00
Adrian Johnson
49fa8d353b Correct the value of /LastChar in the PDF Type 1 font dictionary. 2006-09-05 14:19:48 -04:00