Commit graph

3670 commits

Author SHA1 Message Date
Eugeniy Meshcheryakov
8b31761583 TrueType Subsetting: Correct the checksum calculation of 'head' table
Checksum field should be zero before calculating checksum.
2007-02-04 16:22:12 +10:30
Eugeniy Meshcheryakov
0bf5e18b14 TrueType Subsetting : Correct the checksum calculation 2007-02-04 16:19:05 +10:30
Carl Worth
2bd590b649 ROADMAP: Note that linear gradient bug is fixed. 2007-02-02 16:43:27 -08:00
David Turner
ae4f37e0a3 fixing gradient repeat mode computations
This fixes the regression of linear gradient as demonstrated
by the recently added linear-gradient-reflect test.
2007-02-02 16:42:43 -08:00
T Rowley
0b7ba5ccfa Add linear-gradient-reflect test case
This testcase works before the
e9bef30d2b landing, and has visual
artifacts afterwards.
2007-02-02 16:37:27 -08:00
Carl Worth
1757b49ebd ROADMAP: Add bug about broken cairo_show_text on win32 2007-02-01 16:17:29 -08:00
Carl Worth
c621201a41 Don't finish a finished surface in cairo_surface_destroy
Calling cairo_surface_finish from cairo_surface_destroy was
triggering an error due to finish being called twice. The
error was usually hidden as the surface would still eventually
be destroyed. But it did clutter things up quite badly if a
user was trying to break on _cairo_error to track down a
problem.

Thanks again to Stuart Parmenter <stuartp@gmail.com>
for pointing out the problem.
2007-02-01 16:05:59 -08:00
Carl Worth
159359325d Fix crashes in cairo_surface_finish for NULL or nil
Thanks to Stuart Parmenter for alerting us of this bug.
2007-02-01 15:22:27 -08:00
Carl Worth
26ef4746e6 Add two tests of cairo_surface_finish to test/nil-surface.c
This tests calling cairo_surface_finish with either NULL or
with a nil surface, (either currently causes a crash).
2007-02-01 15:21:12 -08:00
Dan Amelang
382e021ccb Add "rectangles" perf test
This test draws many small, solid pixel-aligned rectangles one at a
time.
2007-01-31 11:53:06 -08:00
Eugeniy Meshcheryakov
7abfb39709 CFF Subsetting: Add charset data to embedded font
Current code for subsetting CFF fonts does not write charset information
into it. According to spec this means that font have ISOAdobe charset.
This charset contains only 228 names (excluding .notdef). This is not
enough for subfonts with 256 glyphs and causes bugs when viewing
generated PDFs.
2007-01-28 19:01:38 +10:30
Carl Worth
a63ceef06c Fix _cairo_pattern_acquire_surface_for_surface to not clone outside surface extents
Rotation and other transformations would cause extents to be
computed which were outside the bounds of the surface to be
cloned, (and for non repeating patterns). Now we simply
restrict the computed extents to the surface extents.

This fixes the xlib failure of the recent rotate-image-surface-paint
test, (the apparently distinct ps failure remains).
2007-01-26 18:03:43 -08:00
Carl Worth
ebc1cd91f8 Add rotate-image-surface-paint test case
This test exercises a clone_similar extents bug noticed by
Benjamin Otte. As expected, the xlib backend fails due to
that bug, (and interestingly, the ps backend is showing a
failure as well).
2007-01-26 11:43:27 -08:00
Vladimir Vukicevic
691f9d1c0c [mmx] avoid casts between int32 and __m64 types
The MS compiler doesn't like this; _mm_cvtsi32_si64 and _mm_cvtsi64_si32
must be used.
2007-01-25 12:01:50 -08:00
Vladimir Vukicevic
8ff70d6b91 [win32] regression with win32 glyph y-offsets (mozbug#365021) 2007-01-25 12:01:50 -08:00
Vladimir Vukicevic
0231d18a57 [atsui] add function prototype for a public 10.4 function that's 2007-01-25 12:01:50 -08:00
Eugeniy Meshcheryakov
50136a7806 [PDF-CFF] Fix bad /LastChar value for CFF fonts in PDF backend
PDF backend sets /LastChar value in Type1C font dictionary incorrectly.
acroread then complains about incorrect /Widths in font.
The last char is numchars - 1, since it's zero-based.
2007-01-24 15:51:00 -05:00
Michael Emmel
bb02b4e5ec Merge branch 'master' of ssh+git://git.cairographics.org/git/cairo 2007-01-23 22:22:20 -08:00
Michael Emmel
48c2896f69 Turned off acclerated rectangle drawing in dfb backend
causes bugs in gtk
2007-01-23 22:17:24 -08:00
Behdad Esfahbod
3b7751279c [pixman/src/fbmmx.c] Add comment around M64
/* cast to void* in the middle to shut gcc up warning about
 * "dereferencing type-punned pointers".
 */
2007-01-22 14:42:48 -05:00
Brian Ewins
c316b7220d [ATSUI] Some glyph operations cannot be 'unsupported'. (#9530)
The atsui font backend returned the internal 'unsupported' error 
code for errors in operations that do not have fallbacks. Now that 
the underlying cause, deleted glyphs, has been fixed, I'm changing 
the status code returned to the public 'no memory' one; it should 
be the only condition triggering the failure now.
2007-01-22 01:13:50 +00:00
Brian Ewins
49b9f0c082 [ATSUI] out-of-range glyphs should be treated as deleted. (#9530)
Glyphs outside the range 0x0-0xffff are not valid in atsui, but
scaled_glyph stores unsigned long. Ensure that invalid values do
not cause errors.
2007-01-22 01:10:52 +00:00
Brian Ewins
4dfa5d33e4 [ATSUI] Handle deleted glyphs correctly. (#9530)
This code ensures that deleted glyphs are not drawn.
2007-01-22 01:09:49 +00:00
Behdad Esfahbod
1a9d3b5185 [configure.in] Use AC_MSG_RESULT in PKG_CHECK_MODULES's second branch
If PKG_CHECK_MODULES fails, it does not print out any check results and so, no
newlines.  This is kinda silly, at least in the case that no second branch is
provided, but I think that's the way it is, to let users decide what to print.

We now just do a AC_MSG_RESULT(no) and continue with what we used to do.
Inspired by Tor Lillqvist's similar change in Pango.
2007-01-21 15:17:59 -05:00
Behdad Esfahbod
6aa8e80cc7 [pixman/src/fbmmx.c] Hide "dereferencing type-punned pointer" warnings
The warning happens all the place when the code converts from ullong to __m64.
The way the conversion is done is a C idiom: 1) get a pointer to the value, 2)
convert it to the suitable pointer type for the target, 3) dereference it.
That is "*(__m64*)(&m)" in this case.  This is necessarily (as opposed to just
casting to target type) because the two types may not be "compatible" from the
compiler's point of view.  Example of types that are not compatbile is structs
vs anything.

The "dereferencing type-punned pointer will break strict-aliasing rules" from
gcc exactly means: "some code may be assuming that pointers with different
types do not compare equal (or otherwise share the same target object).  If
you case a pointer to a different type and dereference it, it may happen
here."  However, in our usecase, it's clear that the compiler cannot make any
false assumptions.  So we just go ahead and hide it by using a middle cast to
"void *".  Since the compiler does not many any aliasing assumptions about
generic pointers, it will not warn either. (Though the problems if any, will
still occure.  So this is not an ideal solution to this problem and should be
used very carefully, to no hide useful warnings for when things go loose on
some weird architecture.)

Another solution would have been to use gcc's "may_alias" function attribute,
but trying to define a may_alias version of __m64 hit a bug in gcc.  That is,
try replacing "__m64" with "m64" and define:

  typedef __m64 m64 __attribute__((may_alias));

and see it fail to compile.  This seems to be because of the special vector
type that __m64 has.
2007-01-21 15:06:02 -05:00
Behdad Esfahbod
1a8d0a33ce PDF: Fix approximate diagonal in recent commit
Use x+y as an upper bound for sqrt(x*x+y*y), not x*y.
2007-01-20 13:01:35 -05:00
Carl Worth
1e52ce5a09 doc tmpl churn 2007-01-20 03:20:30 -08:00
Carl Worth
53358ddc73 configure.in: Increment version to 1.3.13 after making the 1.3.12 snapshot 2007-01-20 03:20:18 -08:00
Carl Worth
c34a1a75fd configure.in: Increment cairo version to 1.3.12 2007-01-20 03:04:31 -08:00
Carl Worth
26e6c73aab NEWS: Add notes for 1.3.12 snapshot 2007-01-20 03:01:06 -08:00
Carl Worth
87b3ac10af cairo-wideint: Fix to eliminate comparison of signed and unsigned values 2007-01-20 02:01:29 -08:00
Carl Worth
d6bb0d7720 .gitignore: Add text-glyph-range 2007-01-20 01:47:06 -08:00
Carl Worth
b06222b990 ROADMAP: Add 3 bugs to fix before the next snapshot 2007-01-20 00:56:07 -08:00
Carl Worth
6c40575a22 Fix two misspellings in a recent comment. 2007-01-19 23:23:32 -08:00
Carl Worth
5f9d70a561 PDF: Fix CAIRO_EXTEND_NONE for source surface patterns
The former workaround for the lack of non-repeating patterns in PDF
(as far as we can tell) was broken for a source pattern matrix that
resulted in scaling the source surface pattern down. This was
demonstrated by the failure of the scale-down-source-surface-paint
test which now passes.

The old code would have also allowed for bogus repeated pattern
instances to appear if the source surface pattern was translated
sufficiently far off the destination surface in just the right
direction. This bug is also fixed.
2007-01-19 23:11:09 -08:00
Kalle Vahlman
2f6d184e66 Add --use-ms option to cairo-perf-diff-files
This allows for comparing perf files generation on different hardware
platforms, (since the ticks can be very different on different hardware).
2007-01-19 16:47:31 -08:00
M Joonas Pihlaja
8354906381 Make UTF-8 output from cairo-perf-diff-files optional
This patch adds options to disable the UTF-8 change bars and replace
them with ASCII '*' gfx. The motivation is that UTF-8 really does some
damage to some terminals, and some always forget to pipe stuff through
a pager to make it safe. The new options for cairo-perf-diff-files are:

	--no-utf
	--no-bars
2007-01-19 16:47:31 -08:00
Carl Worth
d91d5d12f3 Add new scale-down-source-surface-paint test
This new test case demonstrates a bug in the PDF backend, (source
surface patterns are repeated even with a pattern extend of NONE).

Thanks to Romuald <mydevel@free.fr> and Claudio Saavedra
<csaavedra@alumnos.utalca.cl> for pointing out the bug.
2007-01-19 16:47:31 -08:00
Vladimir Vukicevic
d08502d939 Merge branch 'master' of git+ssh://git.cairographics.org/git/cairo 2007-01-18 16:50:41 -08:00
Vladimir Vukicevic
eefcfbf5a1 [nquartz] add test reference files for nquartz backend 2007-01-18 16:49:42 -08:00
Vladimir Vukicevic
7b67c20a01 [nquartz] use pattern snapshots, and correctly setup/teardown source
Use a snapshot for the pattern, to avoid the pattern being freed undreneath
us before we actually render (as when rendering to a CG PDF context).  Also
correctly return UNSUPPORTED from setup source, avoiding brokenness when
the source isn't torn down correctly.
2007-01-18 16:49:14 -08:00
Carl Worth
28d6a228f0 Fix cairo_get_dash and cairo_get_dash_count APIs
Make these functions consistent with other cairo_get functions
by making cairo_get_dash_count return the count directly, and
removing the cairo_status_t return value from cairo_get_dash.
2007-01-18 13:09:23 -08:00
Carl Worth
bc7072064e cairo-path-fixed: Don't add redundant, succesive MOVE_TO operations to the path
Instead, we can simply tweak the argument value for the last
MOVE_TO operation that's already at the end of the path.

This helps backends like pdf that are currently emitting all
of the redundant MOVE_TO operations in the output.
2007-01-17 16:24:00 -08:00
Vladimir Vukicevic
d9df44d807 Merge branch 'master' of git+ssh://git.cairographics.org/git/cairo 2007-01-17 15:08:21 -08:00
Robert O'Callahan
4e1c2b1ad8 Rename cairo_copy_clip_rectangles to cairo_copy_clip_rectangle_list 2007-01-17 15:07:31 -08:00
Adrian Johnson
b02b86da5c PDF: Compress the content stream
Use cairo-deflate-stream to compress all content streams emitted by the
PDF surface.
2007-01-17 13:21:26 -08:00
Adrian Johnson
7f246462eb Add cairo-deflate-stream.c
Add a new stream type that compresses the stream using the zlib deflate method.
This is intended for use by the PDF surface.
2007-01-17 13:21:03 -08:00
Adrian Johnson
b3440e8530 PDF: Use Td where possible instead of Tm for positioning glyphs
This avoids emitting the font matrix for every single glyph.
2007-01-17 13:20:43 -08:00
Dan Williams
5c2136ea7c Implement pixman fbCompositeSrc_8888x0565mmx
MMX-accelerate for fbCompositeSrc_8888x0565.  Upstream X bug for the
same issue:

http://bugs.freedesktop.org/show_bug.cgi?id=9682
2007-01-17 12:48:51 -08:00
Pavel Roskin
a2ec383ff1 Clean up _fbOnes()
The implementation of _FbOnes in iccolor.c would not work on 64-bit
longs correctly.  Fortunately, it's only used on integers, so make it
explicit in the declaration.

Use an inline function for the gcc builtin implementation to make sure
that it's never used with arguments of incorrect size.

There is no __INT_MIN__ in gcc 4.1.1, but it's not an issue now because
the argument is 32-bit.

Signed-off-by: Pavel Roskin <proski@gnu.org>
2007-01-16 16:38:36 -08:00