Commit graph

5094 commits

Author SHA1 Message Date
Chris Wilson
ea6dbfd36f [cairo-meta-surface] Save and restore the original clip.
When replaying the meta-surface to the target, we apply a stack-based
clip to the surface. However, we did not remove this clip from the
surface and so a pointer into our stack existed beyond the scope of
function.

Saving the original clip pointer and restoring it before leaving the
function resolves the issue and appears to fix
https://bugzilla.mozilla.org/show_bug.cgi?id=429071.
2008-04-21 18:35:07 +01:00
Adrian Johnson
a2c4fd0572 Add "Since: 1.6" to win32 printing surface 2008-04-18 18:18:30 +09:30
Robert O'Callahan
212357cb4c Clone surface correctly when doing a deep clip copy
The rect specifies the clip surface location within the owning surface;
when cloned, the x/y should be 0 to get the entire surface.

Ref: https://bugzilla.mozilla.org/show_bug.cgi?id=409227
2008-04-18 06:15:26 +02:00
Chris Wilson
a0d71e5a38 [Makefile.am] Fix breakage in previous commit.
I checked with --disable-pdf and with --disable-ps, but forgot to
check with them both enabled. D'oh.
2008-04-16 14:33:00 +01:00
Chris Wilson
472637da05 [Makefile.am] Add cairo-pdf-operators*.[ch] to ps_sources
The postscript backends depends upon cairo-pdf-operators.c, so list it
as a requirement in ps_sources. This enables the postscript backend to
build even if the pdf backend is disable by the user during configure.

(Fixes http://bugs.freedesktop.org/show_bug.cgi?id=15532.)
2008-04-16 14:19:02 +01:00
Behdad Esfahbod
12831201d2 [doc/tutorial/src/singular.c] Fix a bug in delta computation 2008-04-15 15:57:41 -04:00
Behdad Esfahbod
cafdd01619 [Makefile.am] Document why beos was removed from build, and remove some cruft 2008-04-15 13:33:50 -04:00
Chris Wilson
0e315b1e60 [test/a8-mask] Perform the stride API checking once.
The stride API is independent of the surface and does not need to be
repeated for every surface.
2008-04-15 13:29:10 +01:00
Chris Wilson
8b36ca0858 [test/a1-mask] Perform the stride API checking once.
The stride API is independent of the surface and does not need to be
repeated for every surface.
2008-04-15 13:29:02 +01:00
Chris Wilson
fa5e87ad23 [cairo-test] Spelling fixes in comments.
Skim through the comments fixing trivial smelling pistakes.
2008-04-15 13:28:57 +01:00
Richard Hult
8514d33444 Fix to install cairo-quartz-font.pc 2008-04-14 16:55:23 -07:00
Kouhei Sutou
4ff59960f3 Fix typo in documentation (missing stride argument) 2008-04-14 16:53:37 -07:00
Carl Worth
e01072d4ea RELEASING: Send announcement of major releases to pr@lwn.net as well 2008-04-14 16:52:40 -07:00
Carl Worth
9db764c732 Merge in '1.6'
This gets us a fix for not linking with g++ from 1.6.4

We don't take from 1.6.4 the revert of the addition of
missing locking from the GC cache, (meanwhile, we've
already got a corrected fix for this).

Conflicts:

	src/cairo-xlib-screen.c
2008-04-14 16:42:07 -07:00
Adrian Johnson
d96fdd58ab win32: Fix broken printing of type1 fonts
ExtTextOut() does not work with Type 1 font glyph indices when
printing. The same code works fine when dst->dc is a display. It
appears that ExtTextOut expects unicode character values when using
Type 1 fonts and a printer DC.

Fix this by making Type 1 fonts in the win32-printing surface use the
fallback path for non Windows fonts. ie the glyphs will be emitted as
filled paths.
2008-04-13 22:16:52 +09:30
Carl Worth
af94b8d2a3 README: Note that quartz is no longer experimental 2008-04-11 16:13:18 -07:00
Chris Wilson
ff5376563b [xlib] Clear the gc_needs_clip_reset after use.
If you think this commit is reminiscent of
40558cb15e, you would be right as it fixes
exactly the same bug I made then and reintroduced in dc714106e1.

So quoting 40558cb:
After consuming the GC we need to unset the clip reset flag, so that
if we try and get a new GC without first putting a fresh one we do not
try to call XSetClipMask on a NULL GC.
2008-04-11 23:57:01 +01:00
Chris Wilson
28a1dabed8 [test] Add a regression test for bug 10921
This bug first was fixed in 40558cb15e,
but then reintroduced in 9cfd82e87b, which
became part of the 1.6.2 quick release.

As penance to make sure I never repeat this same bug again, I offer this
test case which exercises the XSetClipMask(NULL) path and hopefully
simulates some 'typical' usage of cairo by GUI toolkits.
2008-04-11 23:57:01 +01:00
Carl Worth
44e6cdd9b1 Increment version to 1.6.5 after the 1.6.4 release 2008-04-11 14:48:18 -07:00
Carl Worth
08a8048063 Increment version to 1.6.4 2008-04-11 14:33:12 -07:00
Carl Worth
a96176e12f NEWS: Add notes for cairo 1.6.4 2008-04-11 14:32:37 -07:00
Carl Worth
32e576382b Prevent cairo from being linked unnecessarilly with g++
The beos backend involves a source file written in C++.
Apparently, automake sees the conditional inclusion of
that source file and insists on doing the final link of
cairo with g++ even though that file isn't being compiled
at all.

We definitely don't want that as it makes libcairo link
and depend on libstdc++ unnecessarily, (which can break
distribution packaging when not expecting it, etc.).
2008-04-11 14:13:03 -07:00
Carl Worth
8f1c8d4b26 Revert "[xlib] Add locking around GC cache."
This reverts commit 9cfd82e87b.

The fix was broken as it introduced crashes by calling
XSetClipMask with a NULL GC, (basically a reintroduction
of the bug originally fixed here:

	7802de6d5edaf998c98b141870dc2c6b4c0f3e91

Let's revert for sake of the release, and fix this correctly
on master.
2008-04-11 14:09:15 -07:00
Carl Worth
75001079c1 Merge in origin/master, (a few changes in parallel to 1.6.2 release) 2008-04-11 10:08:14 -07:00
Carl Worth
a5770c3335 Increment version to 1.6.3 after the 1.6.2 release 2008-04-11 10:05:18 -07:00
Carl Worth
5bc6fd7139 Increment version to 1.6.2 2008-04-11 09:52:28 -07:00
Carl Worth
0c32497c34 NEWS: Add notes for 1.6.2 release 2008-04-11 09:50:53 -07:00
Chris Wilson
9cfd82e87b [xlib] Add locking around GC cache.
The per-screen cached of most-recently freed GCs lacks suitable locking
for it to be threadsafe.
(cherry picked from commit dc714106e1)
2008-04-11 09:07:24 -07:00
Adrian Johnson
cf057c1e86 PS: Fix inefficient implementation of Tm/Td operators that was crashing printers
The Td and Tm operator emulation were setting the font matrix like this:

  /some_font [xx yx xy yy x0 y0] selectfont

where [xx yx xy yy] is the font matrix and [x0 y0] is the position of
the first glyph to be drawn. This seemed to be the easiest way to
emulate the Tm operator since the six arguments to Tm required by PDF
are xx,yx,xy,yy,x0,y0.

Before the switch to pdf-operators the font matrix was set like this:

  /somefont [xx yx xy yy 0 0] selectfont x0 y0 moveto

The selectfont operator is equivalent to calling findfont, makefont,
and setfont. The makefont operator creates a new font dictionary for
specified font that contains the specified font matrix. The
description of the makefont operator in the PostScript Language
Reference Manual states:

  "The interpreter keeps track of font dictionaries recently created
   by makefont. Calling makefont multiple times with the same font and
   matrix will usually return the same font rather than create a new
   one."

So the emulation of Tm and Td was creating a new font dictionary every
time a text string was displayed due to the change in the translation
components of the font matrix. Previously the font dictionary was
re-used as with the translation components of the matrix set to zero,
the font matrix did not change frequently.

Some printers did not handle well the frequent creation a font
dictionary every time a few glyphs were displayed.

Fix this by ensuring the translation components of the font matrix
used in the emulation of Tm and Td operators is always set to
zero. Use moveto instead for the translation components.
(cherry picked from commit c5814d2aa3)
2008-04-11 09:03:49 -07:00
Chris Wilson
f57100acd4 [test] Handle TEST_CONTENT_COLOR_ALPHA_FLATTENED similar surfaces.
Convert the boilerplate specific flattened content value to the ordinary
CAIRO_CONTENT_COLOR_ALPHA for use with cairo_push_group_with_content() -
otherwise cairo rightfully flags an error and the test harness decides
that the similar surface is not available.
2008-04-11 15:39:11 +01:00
Chris Wilson
e4fc5279cc [cairo-font-options] Eliminate internal use of cairo_font_options_create()
Within the library, we know the precise size of the struct and so can
allocate temporary font options on the stack - eliminating the need
to export an internal alias of cairo_font_options_(create|destory).
2008-04-11 15:39:11 +01:00
Chris Wilson
b72fe9bb5f [cairo-arc] Check that the context is not error before proceeding.
We depend on values stored on the context that become invalid upon an
error, so stop processing as soon as an error occurs. Prior to
adjusting, the values returned from the error context, this would cause
an infinite loop whilst calculating the number of segments required for
a tolerance of 0.
2008-04-11 15:39:10 +01:00
Chris Wilson
f6834dacef [cairo] Return defaults when the context is in error.
Return the default values instead of zero for an error context. This
helps to prevent application logic faults when using the values from
the error context (for an example, see _cairo_arc_in_direction()).
2008-04-11 15:39:10 +01:00
Chris Wilson
68f53282b9 [xlib] Clear the Visual cache upon display closure.
Clear the Visual cache, similarly to flushing the GC cache, upon
XCloseDisplay.
2008-04-11 15:39:10 +01:00
Chris Wilson
a2608cdde5 [xlib] Convert the Visual cache to use the screen mutex.
Use the per-screen mutex, introduced for the GC cache, to lock access to
the Visual cache (instead of the per-display mutex).
2008-04-11 15:39:10 +01:00
Chris Wilson
dc714106e1 [xlib] Add locking around GC cache.
The per-screen cached of most-recently freed GCs lacks suitable locking
for it to be threadsafe.
2008-04-11 15:39:09 +01:00
Adrian Johnson
9166686abd Refresh text-rotate PS reference image 2008-04-11 22:50:52 +09:30
Adrian Johnson
c5814d2aa3 PS: Fix inefficient implementation of Tm/Td operators that was crashing printers
The Td and Tm operator emulation were setting the font matrix like this:

  /some_font [xx yx xy yy x0 y0] selectfont

where [xx yx xy yy] is the font matrix and [x0 y0] is the position of
the first glyph to be drawn. This seemed to be the easiest way to
emulate the Tm operator since the six arguments to Tm required by PDF
are xx,yx,xy,yy,x0,y0.

Before the switch to pdf-operators the font matrix was set like this:

  /somefont [xx yx xy yy 0 0] selectfont x0 y0 moveto

The selectfont operator is equivalent to calling findfont, makefont,
and setfont. The makefont operator creates a new font dictionary for
specified font that contains the specified font matrix. The
description of the makefont operator in the PostScript Language
Reference Manual states:

  "The interpreter keeps track of font dictionaries recently created
   by makefont. Calling makefont multiple times with the same font and
   matrix will usually return the same font rather than create a new
   one."

So the emulation of Tm and Td was creating a new font dictionary every
time a text string was displayed due to the change in the translation
components of the font matrix. Previously the font dictionary was
re-used as with the translation components of the matrix set to zero,
the font matrix did not change frequently.

Some printers did not handle well the frequent creation a font
dictionary every time a few glyphs were displayed.

Fix this by ensuring the translation components of the font matrix
used in the emulation of Tm and Td operators is always set to
zero. Use moveto instead for the translation components.
2008-04-11 21:42:19 +09:30
Carl Worth
0ac8130ae3 Merge in origin/master, (just a few 1.5.21 changes alongside 1.6.0 release) 2008-04-10 18:07:12 -07:00
Carl Worth
eac9251d9a Increment version to 1.6.1 after 1.6.0 release 2008-04-10 18:02:59 -07:00
Carl Worth
d6263bec89 Increment cairo version to 1.6.0 2008-04-10 17:34:41 -07:00
Carl Worth
709805c26f NEWS: Add notes for 1.6.0 release 2008-04-10 17:33:51 -07:00
Behdad Esfahbod
11299ae5c5 Add doc/tutorial/src/singular.c 2008-04-09 11:17:14 -05:00
Chris Wilson
089bf98df1 [test] Add group-paint
The experience of running the entire test suite under cairo_push_group()
did at least reveal that there was a potential bug in the pdf backend.
This test is just the simplest of drawing operations - simply filling
the similar surface with solid blue, and then blitting that surface to
the destination.
2008-04-08 20:17:42 +01:00
Chris Wilson
39100439ca Check surface->status and finished in cairo_surface_write_to_png_stream
Cut'n'paste from commit c1f765:
Without these checks, a user could hit an assertion failure by passing
a finished surface to cairo_surface_write_to_png_stream.  Now we return
a nice CAIRO_STATUS_SURFACE_FINISHED error in that case instead.
2008-04-08 11:32:51 +01:00
Chris Wilson
935b0bbf6e [test/filter-bilinear-extents] Memleak.
Destroy the temporary image surface.
2008-04-08 11:28:18 +01:00
Carl Worth
c7cd5b30c4 Increment cairo version to 1.5.21 after the 1.5.20 snapshot 2008-04-08 03:11:50 -07:00
Carl Worth
aadbaf7d99 Increment version to 1.5.20 2008-04-08 02:45:56 -07:00
Carl Worth
8f123d035a NEWS: Add notes for 1.5.20 snapshot 2008-04-08 02:45:31 -07:00
Carl Worth
f7dea9a8d3 Fix distcheck by renaming large-source-ref.c to large-source-ref.png (oops!) 2008-04-08 02:29:05 -07:00