Commit graph

812 commits

Author SHA1 Message Date
Keith Packard
935764d91c Switch fallback from list of rects to region. Check operator and patterns for non-ps drawing ability. Operators can sometimes be always opaque, independent of the pattern, sometimes always translucent, independent of the pattern and sometimes depend on whether is translucent.
reviewed by: cworth
2005-10-09 20:40:12 +00:00
Keith Packard
a0e970fad2 Add const to _cairo_surface_is_image parameter 2005-10-09 20:31:44 +00:00
Keith Packard
eeb56e713b The comment said 'blend over white', the code did 'blend under garbage'. I made the code look like the comment. More tests pass now. mmm.
reviewed by: cworth
2005-10-09 14:28:15 +00:00
Billy Biggs
ea7ac21d3b Add a "nearest" extend mode, where the closest pixel is repeated for pixels outside of the source area. Note that for gradients, applications which had explicitly set a repeat mode of NONE will now need to change to use NEAREST to get the same behaviour.
Split CARIO_EXTEND_DEFAULT to indicate defaults for surfaces and gradients. The default for gradients is still the NEAREST beaviour.
Support the NEAREST mode, change NONE to be TRANSPARENT.
Update the extend mode code to use the pixman support.
Handle NEAREST, note that support for NONE is not yet handled for gradients.
Add a check for NEAREST but don't do anything useful.
Add a check for NEAREST but don't do anything useful.
Update a comment about the extend support in the image backend.
reviewed by: davidr, cworth, otaylor
2005-10-09 09:18:16 +00:00
Kristian Høgsberg
27e12fc1db Apply patch from #4672 by Jens Taprogge to implement color stop sorting and multiple color stops for gradients. 2005-10-07 13:21:01 +00:00
Carl Worth
74af57339c Add missing initialization for ximage.xoffset. 2005-10-06 11:32:54 +00:00
Anders Carlsson
cdaa48655c Bring the ATSUI backend up to date wrt the new font backend changes. Also, add cairo_atsui_font_face_create_for_atsu_font_id which takes an ATSUFontID and returns a cairo_font_face_t. 2005-09-30 08:31:36 +00:00
Bertram Felgenhauer
a028678179 simplify id initialisation of last patch
reviewed by: keithp
2005-09-29 20:00:14 +00:00
Bertram Felgenhauer
fa2d0ab5b7 Using a pointer comparison as the fallback total order was wrong - these pointers are not stable. So we introduce our own total order instead.
mark 4599 as fixed
reviewed by: cworth
2005-09-29 17:26:20 +00:00
Carl Worth
76634781e2 Oops. Reverting debug output that was mistakenly committed. 2005-09-29 10:09:59 +00:00
Carl Worth
4ef5f08563 Add date of 2005-10-03 for 1.0.2. Add 4630 to the 1.0.2 roadmap. 2005-09-29 06:49:47 +00:00
Tor Lillqvist
303e3e9748 Use _cairo_utf8_to_utf16 for character conversion. 2005-09-28 10:35:55 +00:00
Tor Lillqvist
dc711cd88d Note that Bug #4612 (Text not being drawn if first character entirely out of surface) is now fixed.
Add cast so that sign conversion doesn't alter comparison.
2005-09-28 10:25:23 +00:00
Tor Lillqvist
58113099f9 Note that Bug #4602 (use of 0x0 images causes win32 backend failure) is now fixed.
Avoid creating size-0 bitmap, which fails.
2005-09-27 13:22:46 +00:00
Carl Worth
abaf346810 Note that bug #4409 (Dashes are missing initial caps) is now fixed.
Move face-flipping from inside _cairo_stroker_add_caps to new _cairo_stroker_add_leading_cap variant of _cairo_stoker_add_cap.
Change to call _cairo_stroker_add_leading_cap or _cairo_stroker_add_trailing_cap as appropriate.
Remove dash-caps-joins from the XFAIL list and add reference image.
2005-09-27 12:44:32 +00:00
Tor Lillqvist
1010e9052f Set LOGFONT::lfHeight negative. A negative lfHeight means "em height" which is what we want, and matches how other toolkits interpret font sizes on Win32. (Positive lfHeight means "cell height".) (#4593) (_cairo_win32_scaled_font_init_glyph_metrics): If GetGlyphOutlineW() fails, print error message and set metrics to zero. (#3927, Hans Breuer) (cairo_win32_scaled_font_select_font): Add detail on what API failed to the error messages. 2005-09-26 07:48:10 +00:00
Carl Worth
8fc9e099fd Avoid attempting to create a size-0 Pixmap, (to prevent the associated X error). This actually showed up when the clip region is empty. Thanks to Radek Doulík for the bug report.
Remove clip-all from the XFAIL list since it works now.
2005-09-19 17:24:52 +00:00
Carl Worth
fa5d17f466 Originally: 2005-09-19 Hans Breuer <hans@breuer.org>
src/cairoint.h : win32 specific definitions for CAIRO_MUTEX_DECLARE, CAIRO_MUTEX_LOCK etc. [not based on win32 mutex but critical sections]
src/cairo-win32-surface.c : add DllMain() to do global, single-threaded 'mutex' (de)initialization. No ifdefs needed, some variables would simply not be used when the respective backend would not be compiled in.
2005-09-19 14:24:00 +00:00
Carl Worth
d7bdc94775 Add cairo-cache-private.h which was missing from the list, (thanks to sunmoon1997). 2005-09-19 14:14:03 +00:00
David Reveman
91e188bc78 Add missing break to switch statement 2005-09-19 07:18:51 +00:00
Carl Worth
6d14b3c1fc Prefer cairo_bool_t, TRUE, and FALSE over int, 1, and 0. 2005-09-16 10:49:48 +00:00
Carl Worth
5b9be26d26 Tested by: John Ellson Closes bug #4408 https://bugs.freedesktop.org/show_bug.cgi?id=4408
Add support for dashed splines. (The antialiasing quality isn't perfect, but at least the curves are dashed now).
2005-09-16 10:24:54 +00:00
David Reveman
34c6f5de9b Change Carl's comment about saturate operator 2005-09-14 09:25:07 +00:00
David Reveman
6121df6b72 White-space cleanups to glitz backend 2005-09-14 09:12:13 +00:00
David Reveman
82cb5baeb2 Track changes to glitz and update glyph caching in glitz backend 2005-09-14 09:07:00 +00:00
Carl Worth
c9ad68e6e9 Set return-value *glyphs to NULL after freeing it in the error case. 2005-09-13 15:53:19 +00:00
Carl Worth
56e7e9d5bd Add missing locking around the call into the thread-shared cache here. 2005-09-13 12:40:36 +00:00
Carl Worth
ef35d00615 Expand locking to encapsulate any modification to the reference count of a scaled font, rather than just modifcations of the scaled_font_map, since scaled fonts are shared between threads. 2005-09-13 12:26:29 +00:00
Carl Worth
999c2a8a2b Originally 2005-09-06 Carl Worth <cworth@cworth.org>:
_cairo_cache_preserve -> _cairo_cache_freeze _cairo_cache_release -> _cairo_cache_thaw
Track rename of _cairo_cache_freeze/thaw.
Track rename. Add stacking behavior to _cairo_cache_freeze/thaw. Abstract out shrinking from _cairo_cache_insert so that _cairo_cache_thaw will also shrink as necessary.
Make this function static since its current limitation to accept an entry rather than a key makes it not as externally useful as would be desirable. Document this limitation.
2005-09-12 11:15:52 +00:00
Carl Worth
b1a38efd34 Fix for bug #4401 as reported by Tim Mooney:
Don't bother checking for sincos function.
Don't use sincos function since it is apparently buggy on some platforms, (Tru64 at least).
2005-09-12 11:11:33 +00:00
Carl Worth
0b9c0efc3a Put win32 mutex locking on the 1.2.0 roadmap.
Portability improvements for win32 thanks to Hans Breuer <hans@breuer.org>:
Defined sized-integer types when under the influence of _MSC_VER and without stdint.h.
Use #error which is more portable than #warning, (and more indicative of where we want to be before the next release).
2005-09-07 16:57:59 +00:00
Carl Worth
63c208d83d Give cairo_public an empty definition by default.
Add new cairo_public macro before every public function call prototype.
2005-09-07 16:31:22 +00:00
Tor Lillqvist
05c0c98aee Pass appropriate pointer for image_extra to release_dest_image. 2005-09-07 09:07:13 +00:00
Tor Lillqvist
c00698ebf5 Pass scratch space instead of NULL for image_extra to acquire/release_dest_image. 2005-09-07 08:38:43 +00:00
Carl Worth
f2dc1ebe82 Ignore cairo.def.
Remove cairo_private since we only use it in .h files, not .c files.
2005-09-06 15:19:00 +00:00
Carl Worth
93289f14cc Clean up some documentation issues pointed out by otaylor. 2005-09-02 11:22:40 +00:00
Keith Packard
0cfa350fa8 Oops. Call _cairo_scaled_font_set_metrics to set user-space metrics for scaled fonts.
reviewed by: otaylor deserves credit for noticing a problem
2005-09-01 20:38:07 +00:00
Bertram Felgenhauer
25edf235f0 Add missing pair of braces. This fixes a crash on text output. 2005-09-01 06:13:46 +00:00
Carl Worth
0f4beab507 Add call to XSynchronize, (the expected clip-all failure isn't occuring without it for some reason).
Note reason for expected failure.
src/cairo-scaled-font.c: Add an optional text_to_glyphs() virtual function that the backend can implement instead of ucs4_to_index().
Protect inclusion of fontconfig.h with HAVE_FCFINI.
2005-08-31 19:11:22 +00:00
Owen Taylor
d56b0d1d80 Handle displays which don't match the local endianness by byteswapping on GetImage/PutImage. (#4321, reported by Sjoerd Simons) 2005-08-31 15:09:35 +00:00
Keith Packard
b0c58593b3 Split out scaled font code to cairo-scaled-font.c
Replace cairo cache implementation (this code from cworth)
No more global glyph cache to clean up
Store glyphs in new per-scaled font caches which hold user-space metrics and device space bounding boxes
Refactor glyph drawing APIs so that the surface API is invoked directly from the gstate code.
Add path creation/destruction routines (to hold glyph paths)
New implementation of scaled fonts which uses per-scaled_font caches for glyphs and keeps user-space metrics, device-space bboxes along with glyph images and/or glyph paths.
Adapt to new scaled font API changes.
New cache and scaled_font APIs
Repond to bug fix in metrics computation for glyphs where y values were rounded up instead of down because of a sign difference between cairo and FreeType.
Reviewed by: otaylor, cworth
2005-08-31 15:08:02 +00:00
Owen Taylor
44d6afc8a8 Liberalize the ServerVendor check so that we can handle the Mandriva vendor string. (#4298, Frederic Crozat) 2005-08-30 10:50:27 +00:00
Owen Taylor
a4418a63d7 Use a 8xN rather than a 1xN strip for a vertical gradient. This is much more tolerant of slow compositing code, and is worth some extra expense computing the gradient. (#4263, found in test case from Richard Stellingwerff) 2005-08-30 10:42:17 +00:00
Owen Taylor
96342fe7be Make the check for rectangular trapezoids simpler and more accurate. (#4220, found using test case from Richard Stellingwerff)
reviewed by: cworth
2005-08-27 18:54:03 +00:00
Owen Taylor
30e3d538df Make the vendor string check for XFree86 more liberal, to deal with older versions of gentoo that modified it in a different way. (#4231, fix from Billy Biggs) 2005-08-27 18:49:06 +00:00
Owen Taylor
a6acc962f7 Undef MIN/MAX before defining them in case some system header happens to define them. (#4196, Christian Biesinger) 2005-08-27 18:46:34 +00:00
Owen Taylor
3c53414cf3 Fix docs not to talk about %NULL returns. #4271, Duncan Coutts. 2005-08-27 18:40:46 +00:00
Tor Lillqvist
bd510d8b4b Drop PDF and PS backend and FT font API from Win32 DLL entry points for now. 2005-08-24 07:56:45 +00:00
Billy Biggs
985d8571d2 Fix some minor typos in the doc. 2005-08-24 06:09:11 +00:00
Keith Packard
235838d49f Use new device_x_scale/device_y_scale surface fields to set the device coordinate space to the nominal pixels.
Treat more alpha values as translucent (up to 0.999)
Fix emit_image to actually use a temporary image when necessary.
Change PS coordinate space to match cairo (top-down), adjust PS output to use new space.
Find more cases where PS output was not supported and fall back to image surface.
reviewed by: cworth
2005-08-24 01:47:13 +00:00