Commit graph

5388 commits

Author SHA1 Message Date
Andrea Canciani
c1fcbd0322 quartz: fix REFLECT radial gradients
The interpolation range of repeating radial gradients can safely be
reflected around any integer (previously 0), but for reflect-extended
radial gradients can only be reflected around odd integers if the
appearance is to be the same, thus reflecting around 1 is correct for both.

Fixes radial-gradient.
2010-07-26 11:39:27 +02:00
Chris Wilson
3898e46d1d image: Compensate mask origins for glyph clipping
Fixes the regression in bitmap-font and large-font pointed out by Andrea
Canciani since ef067933.
2010-07-23 09:44:00 +01:00
Karl Tomlinson
108b1c7825 clip: consider gstate target extents in _cairo_gstate_copy_clip_rectangle_list
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=29125

To be consistent with _cairo_gstate_clip_extents, the context's clip
should be intersected with the target surface extents (instead of only
using them when there is no clip).

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-17 11:32:02 +01:00
Karl Tomlinson
b79ea8a6ca clip: consider all_clipped in _cairo_clip_get_extents
If the gstate clip in _cairo_gstate_int_clip_extents() has all_clipped
set (and path NULL), then it returns the gstate target extents instead of
an empty rectangle.  If the target is infinite, then it says the clip is
unbounded.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=29124
Tested-by test/get-clip

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-17 11:30:51 +01:00
Karl Tomlinson
f2fa15680e clip: return empty clip from _cairo_clip_copy_rectangle_list when all_clipped
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=29122
Tested by test/get-clip

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-17 11:29:54 +01:00
Benjamin Otte
51b0c21f02 build: Add explicit dependcy to cxx lib
Otherwise the build will fail because it doesn't add the dependency
manually.

https://bugs.freedesktop.org/show_bug.cgi?id=29114
2010-07-16 19:49:53 +02:00
Oleg Romashin
6b92d5a0f9 qt: Use native glyph rendering.
Remove the hack of using the xlib surface to do glyph rendering and use
the new interface introduced with Qt4.7, or else fallback to image
rendering with freetype.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
[2 files changed, 35 insertions(+), 140 deletions(-) \o/]
2010-07-16 09:49:42 +01:00
Chris Wilson
f53f072a22 clip: Do the NULL check before the dereference.
Breakage introduced in the commit earlier today.
2010-07-12 18:53:29 +01:00
Chris Wilson
ef0679333d image: Manually clip against bounds when rendering directly
This is path is slightly peculiar in that it explicitly avoid the
intermediate mask and the geometry is not pre-clipped.

This in conjunction with the previous commit fixes:

  Clip doesn't work for text
  https://bugs.freedesktop.org/show_bug.cgi?id=29008

which is captured in test/partial-clip-text.
2010-07-12 16:33:42 +01:00
Chris Wilson
679e5a600b Differentiate between reducing clip to composite extents and a rectangle
This is required for handling glyphs when rendering directly to the
surface.
2010-07-12 16:33:38 +01:00
Chris Wilson
459b8ae660 Make distcheck happy. 2010-07-12 11:05:57 +01:00
M Joonas Pihlaja
0152db263b build: Sync up autogenerated win32 build files. 2010-07-12 10:39:18 +03:00
Eric Anholt
06ffb7df71 gl: Only use a mat3 for the transformation for gradients coordinates.
No point in passing in a column of zeroes that we multiply by zero, or
the row that we drop on the floor.  We could do even better by just
passing in a 3x2, at the expense of adding a language version
dependency (or just pass in 2 vectors).

No significant performance difference.
2010-07-11 21:56:55 -07:00
Benjamin Otte
dd6026b613 doc: Make the necessity of flush/mark_dirty more obvious 2010-07-11 23:32:12 +02:00
Benjamin Otte
8a1944f45b check: Allow unprefix type names in the title
Some documentation sections use the type name as the title, and we don't
want to use that title as a link.
2010-07-11 23:32:12 +02:00
Benjamin Otte
d6362a0d76 qt: Define cairo-qt's API as C symbols
That way, the C linker doesn't mess up when linking libcairo.so.
2010-07-11 18:53:42 +02:00
Benjamin Otte
5d4a4775c8 build: Fix typo that makes C++ libs not build 2010-07-11 18:53:42 +02:00
Chris Wilson
9b9952ab4f Convert mime data length to use unsigned long
What we want to use is size_t, but we don't want the implied POSIX
dependency. However, POSIX does say that size_t is an unsigned integer
that is no longer than a long, so it would appear safe to use an
unsigned long as a replacement. Safer at least than unsigned int.
2010-07-10 11:16:19 +01:00
Chris Wilson
eb85ab998b subsurface: Don't assume we ever own the target.
Andrea pointed out that snapshots can be shared, and so the subsurface
should not be calling finish even on a snapshot.
2010-07-10 11:16:19 +01:00
Benjamin Otte
59c83117d7 build: Commit new versions of autogenerate Windows build files
The recent commits to the build system changed a bunch of stuff in
there, so update the files.
2010-07-09 18:55:11 +02:00
Benjamin Otte
bf117e4ea7 build: fix glew include
Currently wether internal glew is built is dependant on wether the
tarball in use was built with internal glew or not. And that's not how
it should be.
2010-07-09 18:43:38 +02:00
Benjamin Otte
0bd704bd1e build: Remove wrong flags from libcairo_cxx.la
They're useful for the final so, but not for an intermediate noinst lib.
2010-07-09 17:15:02 +02:00
Benjamin Otte
faceffd5be build: copy/paste failure: Don't build libcxx.la 2010-07-09 16:58:18 +02:00
Benjamin Otte
dbb386d3c0 gl: Use unsigned int instead of GLuint
GLuint is not defined in cairo-gl.h. If unsigned int is not compatible
enough to GLuint, we might consider to use #include <GL/gl.h> instead.
2010-07-09 12:49:10 +02:00
Benjamin Otte
f7fc8569a7 build: Fix C++ issues with automake
This is an attempt to fix the broken situation we've been in where
automake links libcairo.la with c++ because it might potentially maybe
include C++ files.

Those potential files only exist in Chris' throwaway backends (skia, qt)
and the BeOS backend, so for 99.99% of cases, these backends are not
needed and linking with c++ is overkill. Also, no one wants to have
libcairo.so link to libstdc++.

This patch fixes that in mutliple steps:
1) Add build infrastructure to distinguish between C and C++ backends.
   This is done by allowing to specify backend_sources as well as
   backend_cxx_sources variables in Makefile.sources.
2) Optionally build a libcairo_cxx.la noinst library
   This intermediate library is built for C++ backends only and therefor
   linked using c++. It is then linked into the final libcairo.la. This
   does not require c++, so the linking of libcairo.la is done with cc.

This also works around various weirdnesses that the current build system
exposes, where it assumes cisms when in fact using c++ semantics, like
not detecting c++ properly or:
https://bugzilla.redhat.com/show_bug.cgi?id=606523
2010-07-09 12:38:37 +02:00
Benjamin Otte
df6d49f6ea build: Get rid of $(foo_files) Makefile.am variables
They're unused, and less variables make the build system easier to
understand.
2010-07-09 11:10:20 +02:00
Benjamin Otte
ce530b2802 doc: Add "@Since: 1.10" tags to device docs 2010-07-09 04:24:51 +02:00
Benjamin Otte
c1fed69302 gl: Remove double ** from some comments
gtk-doc doesn't like that unless it's a real gtk-doc comment.
And it wasn't.
2010-07-09 04:20:42 +02:00
Benjamin Otte
5c73b371ae doc: Document remaining cairo-device functions 2010-07-09 04:20:06 +02:00
Benjamin Otte
9877c1932a doc: Add more documentation for devices
Add general docs and document acquire/release. I'm not happy with the
documentation yet. In particular, I have 2 issues:
1) The threading guarantees Cairo provides are missing.
2) There's no docs on which Cairo functions do acquire devices.

I guess I'll have to fix them later.
2010-07-09 04:09:19 +02:00
Benjamin Otte
739d6e35fa doc: Clarify that cairo_surface_get_device() can return NULL 2010-07-09 03:04:27 +02:00
Benjamin Otte
65d0590b04 doc: Copy docs for standard device APIs
Copied from the surface equivalents
2010-07-09 02:23:51 +02:00
Benjamin Otte
5e76bc6deb doc: Add missing region documentation 2010-07-09 02:11:59 +02:00
Benjamin Otte
57da730d28 doc: Fix a syntax issue in quartz-font gtkdoc
A missing empty line caused the long description to be part of
@See_Also. Ooops.
2010-07-09 02:11:59 +02:00
Benjamin Otte
b870cc030d doc: Move tmpl/ docs to inline docs
I did this manually so I could review the docs at the same time.
If anyone finds typos or other mistakes I did, please complain to me (or
better: fix them).
2010-07-08 14:27:16 +02:00
Benjamin Otte
e7594aebce doc: Fix some consistency issues that confuse gtk-doc 2010-07-08 13:58:53 +02:00
Benjamin Otte
71d17e4b1f drm: Fix Makefile for drm_xr
Use cairo_drm_xr_sources/headers for the drm_xr stuff. This makes it
work correctly in gtk-doc instead of conditionally adding it to
cairo_drm_sources/headers.
2010-07-08 13:58:52 +02:00
Benjamin Otte
4b3e488ceb skia: Add cairo-skia.h as a public header 2010-07-08 13:58:52 +02:00
Benjamin Otte
c54dff82d3 glew: The headers are private, not public 2010-07-08 13:58:52 +02:00
Benjamin Otte
729d00341c gl: Fix compile error after rebase failure 2010-07-08 13:58:51 +02:00
Kristian Høgsberg
9e6c151af8 gl: Add new cairo-gl surface constructor to create surface for texture 2010-07-07 18:11:36 -04:00
Benjamin Otte
4c91bb9a22 region: Add cairo_region_xor() and cairo_region_xor_rectangle()
gdk_region_xor() was a quite often used function in GDK and now that
GDKe uses cairo regions, it seems like a worthwhile addition to Cairo.
2010-07-06 17:27:18 +02:00
Benjamin Otte
398870e64a xlib: Setters should set finished surfaces into an error status
Caught by api-special-cases test
2010-07-06 00:22:38 +02:00
Benjamin Otte
6e562d1448 xcb: Setters should set finished surfaces into an error status
Caught by api-special-cases test
2010-07-06 00:22:31 +02:00
Benjamin Otte
3e008e8ab0 svg: Set error when extracting from finished surface
Caught by api-special-cases test
2010-07-05 23:14:19 +02:00
Benjamin Otte
2e66cbaee2 ps: Allow specifying if errors on extract_surface should be set
Getters should not set errors on passed in input. So we don't.

Caught by api-special-cases test
2010-07-05 23:11:02 +02:00
Benjamin Otte
f5dfc3ce6e ps: Set error when extracting from finished surface
Caught by api-special-cases test
2010-07-05 23:08:08 +02:00
Benjamin Otte
106357f6e2 pdf: Set error when extracting from finished surface
Caught by api-special-cases test
2010-07-05 23:07:24 +02:00
Benjamin Otte
702aa19fda gl: Fail properly when called with finished functions
Caught by api-special-cases test
2010-07-05 22:50:44 +02:00
Benjamin Otte
448653e7b9 Call _cairo_error() when setting the FINISHED error on surfaces 2010-07-05 22:42:08 +02:00