Commit graph

4590 commits

Author SHA1 Message Date
Carl Worth
e48d7ca802 Add example to documentation of cairo_pattern_set_filter
It's helpful to let the reade know about cairo_get_source here.
2008-01-28 16:11:39 -08:00
Carl Worth
cd26fa266b Add documentation for cairo_filter_t 2008-01-28 16:10:10 -08:00
Carl Worth
7c00269e00 Add pdf-specific reference images for meta-surface-pattern
This test has been "failing" ever since we had native
replay of metasurfaces to pdf. But looking at the results,
they are actually superior to the image-backend reference
images.
2008-01-28 15:39:40 -08:00
Carl Worth
9cd198d200 Test the no-Render-extension-available case in get-xrender-format 2008-01-28 15:39:40 -08:00
Carl Worth
d7fd3bd536 Add get-xrender-format test to test cairo_xlib_surface_get_xrender_format 2008-01-28 15:39:40 -08:00
Carl Worth
cc94dce250 Return NULL from cairo_xlib_surface_get_xrender_format without an error
The NULL return value will only happen if the X Render extension
is not available. We've already got that NULL return value
documented, so it's not an error if the user asks for it. In
particular, it's definitely not a surface-type mismatch.
2008-01-28 15:39:39 -08:00
Carl Worth
3c018a6e5a Add new API cairo_xlib_surface_get_render_format 2008-01-28 15:39:39 -08:00
Carl Worth
8881154072 Add missing cairo_private (for _pixman_format_to_masks) 2008-01-28 15:39:39 -08:00
Carl Worth
3841cc0932 Clarify the documentation of stride within cairo_image_surface_create_for_data 2008-01-28 15:39:39 -08:00
Carl Worth
13a5624277 Rename cairo_image_surface_stride_for_width to cairo_format_stride_for_width
Thanks for Behdad for the suggested name improvement. Also, make
it more clear that the stride passed to cairo_image_surface_create_for_data
should come from calling cairo_format_stride_for_width with the
same width.
2008-01-28 15:39:39 -08:00
Carl Worth
dc67de3d8b Add cairo_image_surface_stride_for_width
Document this function as a required call to get the correct
stride value before calling cairo_image_surface_create_for_data.
This means that previously-failing calls with non-multiple-of-4
stride values are now documented as errors. Also, we now have
the possibility of moving to more stringent alignment constraints,
(one can imagine doing 64-bit or 128-bit boundaries for example).
2008-01-28 15:39:36 -08:00
Carl Worth
b151cb0709 Rename cairo_format_width to cairo_format_bits_per_pixel and correct its logic 2008-01-28 15:39:36 -08:00
Nis Martensen
538ace5b51 re-indent xml after removal of structuring level 2008-01-28 08:38:39 -05:00
Nis Martensen
642e1af892 remove empty tutorial stub and one level of structuring 2008-01-28 08:38:36 -05:00
Nis Martensen
be93e61d70 Add index of new symbols in 1.6 2008-01-28 08:38:32 -05:00
Nis Martensen
0874834ec4 Describe cairo_operator_t, add link to operators/ wiki page 2008-01-28 08:38:27 -05:00
Behdad Esfahbod
b18bc660c6 [test/font-matrix-translation] Fix function signature 2008-01-28 02:33:58 -05:00
Vladimir Vukicevic
936edecb35 [quartz] only use DrawTiledImage if transformed image is integer aligned
This Quartz API seems to only tile at integer coordinates; if the source image is
scaled to anything less than integer-aligned, seams appear between tiles.  Detect
this and fall back to slower but more general CGPattern path.
2008-01-27 16:52:39 -08:00
Vladimir Vukicevic
182b022401 [win32] Fix initial clip region test
I misread the docs; GetClipBox's return value doesn't necessarily correspond to
GetClipRgn's region type.
2008-01-27 15:26:00 -08:00
Behdad Esfahbod
0e73763290 [src] Fix make check 2008-01-27 02:19:47 -05:00
Behdad Esfahbod
b3eea75d1f Change cairo_get_current_point() to return cairo_status_t instead of void
So we can return CAIRO_STATUS_NO_CURRENT_POINT.  Previously it wasn't easy
to fetch that information.
2008-01-26 13:56:08 -05:00
Behdad Esfahbod
7938384152 [doc] Update list of private header files 2008-01-25 19:48:36 -05:00
Behdad Esfahbod
58f6aed93d [doc] Update for recent API changes 2008-01-25 19:47:07 -05:00
Behdad Esfahbod
45e7ba356d [cairo-pdf-operators] Reformat typedef to not confuse gtk-doc 2008-01-25 19:46:43 -05:00
Behdad Esfahbod
756420a780 [cairo_surface_show/copy_page()] Make them return void, like cairo_show/copy_page() do 2008-01-25 19:38:27 -05:00
Nis Martensen
c4ec5539ca [cairo-surface] Fix doc typo 2008-01-25 19:13:13 -05:00
Behdad Esfahbod
ab188f2e90 [cairo-ft] Disable embedded bitmaps if hinting style NONE is requested 2008-01-25 18:28:57 -05:00
Behdad Esfahbod
2df9944a8a [.gitignore] Add check-has-hidden-symbols.i 2008-01-25 18:28:57 -05:00
Behdad Esfahbod
3d2144b6af [cairo-ft] Fix font metrics computation for bitmap fonts and no metrics-hinting
Preivously we were returning NAN font metrics.  Fixed now.  Makes bitmap-font
test pass again.
2008-01-25 18:28:57 -05:00
Vladimir Vukicevic
c621d8d719 [ps] Pad image mask lines out to full lines
The PostScript backend was generating image masks with packed mask
bits, when PS seems to expect each line of the mask to be padded out
to 8 bytes.

Ref: https://bugzilla.mozilla.org/show_bug.cgi?id=407360
2008-01-25 15:01:57 -08:00
Behdad Esfahbod
bae496df11 [test/bitmap-font] Test under all combinations of hinting, test font metrics too
This is now failing as we compute NAN font metrics for bitmap-only fonts under
disabled metrics hinting.  A very infamous bug excercised with PangoCairo's PDF
output.
2008-01-25 08:03:32 -05:00
Behdad Esfahbod
20c8531243 [test/text-zero-len] Test text and font extents for font size 0 2008-01-25 07:14:07 -05:00
Behdad Esfahbod
83bd590760 [test] Test that cairo_text_extents() and cairo_scaled_font_text_extents() match
in results.
2008-01-25 07:02:25 -05:00
Behdad Esfahbod
4c432b0955 [cairo-scaled-font] Fix bug in glyphs bounding box computation
In 02970ac8cf Vlad introduced the following
innocent-looking change:

-    short min_x = INT16_MAX, max_x = INT16_MIN;
-    short min_y = INT16_MAX, max_y = INT16_MIN;
+    cairo_point_int_t min = { CAIRO_RECT_INT_MIN, CAIRO_RECT_INT_MIN };
+    cairo_point_int_t max = { CAIRO_RECT_INT_MAX, CAIRO_RECT_INT_MAX };

Well, read it carefully... yeah.  That caused each show glyph operation
upload a mask the size of the surface.  With evince/poppler and certain
PDF files that each glyph is rendered in its own cairo_show_glyphs()
call, that meant a 20x slowdown in rendering a page of PDF.

If still wondering what's wrong with that change, here is the answer:

-    cairo_point_int_t min = { CAIRO_RECT_INT_MIN, CAIRO_RECT_INT_MIN };
-    cairo_point_int_t max = { CAIRO_RECT_INT_MAX, CAIRO_RECT_INT_MAX };
+    cairo_point_int_t min = { CAIRO_RECT_INT_MAX, CAIRO_RECT_INT_MAX };
+    cairo_point_int_t max = { CAIRO_RECT_INT_MIN, CAIRO_RECT_INT_MIN };

Yay for git-bisect.
2008-01-25 04:16:44 -05:00
Behdad Esfahbod
8983208f45 [configure.in] Require pixman >= 0.9.6
I was experiencing very weird rendering problems and crashes in evince with
pixman 0.9.4.  Upgrading to pixman 0.9.6 fixed the all.  Lets just require it.
2008-01-25 01:00:21 -05:00
Behdad Esfahbod
5dfe47a3f1 [cairo-scaled-font] Unbreak it after my recent commit
Sigh.
2008-01-25 00:35:11 -05:00
Behdad Esfahbod
efd3a96524 [cairo-scaled-font] Don't err on font size 0, really
First, seems like we were rejecting degenerate font matrix right away
at the constructor.  Don't do that.

Next, PS/PDF were inverting the font scale matrix, assuming that it's
invertible.  We now keep the inverse too, so they can use it.  For the
case of a size 0 font, both the scale matrix and its invert are set to
0,0,0,0.  That's safe, even if slightly inconsistent.
2008-01-24 23:35:06 -05:00
Behdad Esfahbod
45f269e330 [cairo-scaled-font] Oops, return err if not handling it 2008-01-24 22:39:28 -05:00
Behdad Esfahbod
6d0dc3e076 [cairo-scaled-font] Don't err on font size 0 2008-01-24 22:27:27 -05:00
Vladimir Vukicevic
ea9afecc9a [quartz] Do dynamic symbol lookups for 10.4/10.5 optimization symbols
The gcc-__attribute-__ based weak linking was causing all sorts of problems;
do dlsym lookups at runtime instead.
2008-01-24 11:48:02 -08:00
Vladimir Vukicevic
287de2ce58 [quartz] Clean up unused APIs a bit
The data parameter from get_image was never really used; get rid of it and clean up
callers.  Also get rid of a chunk of dead code in release_dest_image.
2008-01-24 11:32:27 -08:00
Vladimir Vukicevic
b96c6c26c2 [win32] Print non-black/white text correctly in show_glyphs 2008-01-24 11:24:02 -08:00
Vladimir Vukicevic
8e7c0db801 [win32] Better tracking of initial clip
There were a few corner cases that the win32 surface was failing
at when there was an initial clip set; the win32-printing surface
had more serious problems when painting meta surface patterns.
This cleans up the initial DC clip tracking for both surfaces.
2008-01-24 11:24:02 -08:00
Carl Worth
c05e3b08b4 Remove ROADMAP and TODO, mentioning their URLs in README
We're maintaining these as part of cairo's website now,
rather than as part of the source code.
2008-01-24 10:12:01 -08:00
Behdad Esfahbod
2182384277 [test] Minor fix for check-ref-dups rule 2008-01-23 15:07:26 -05:00
Behdad Esfahbod
e7c0a69dcb [test] Also check for reference images listed in Makefile.am but missing
in git, and if this is not a git checkout, in source directory.
2008-01-23 14:57:59 -05:00
Bertram Felgenhauer
188765c8e8 improve comments for the pixman transformation anchoring math. 2008-01-23 19:22:18 +01:00
Bertram Felgenhauer
b6c7236443 update reference images for some non-aa testcases 2008-01-23 18:09:20 +01:00
Bertram Felgenhauer
5a0b15d2c9 anchor pattern transformations at the pattern origin
This keeps the rounding errors due to the conversion to 16.16 fixed point
numbers small and improves cairo's translation invariance.
2008-01-23 18:02:02 +01:00
Vladimir Vukicevic
431e846c03 cairo_point_int32_t is really int32_t, not int16_t
Oops.
2008-01-22 16:30:37 -08:00