summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--ChangeLog10
-rw-r--r--test/.cvsignore1
-rw-r--r--test/Makefile.am4
-rw-r--r--test/clip-all-ref.pngbin0 -> 118 bytes
-rw-r--r--test/clip-all.c69
6 files changed, 85 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
index 3eea7ebd3..9642dd845 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -8,6 +8,7 @@ Damien Carbery <damien.carbery@sun.com> Build fixes
Andrew Chant <andrew.chant@utoronto.ca> Adding const where needed
Steve Chaplin <stevech1097@yahoo.com.au> Bug fixes for PNG reading
Tomasz Cholewo <cholewo@ieee-cis.org> Bug fixes
+Radek Doulík <rodo@novell.com> Bug report and test case
John Ehresman <jpe@wingide.com> Build fixes for win32
John Ellson <ellson@research.att.com> First font/glyph extents functions
Behdad Esfahbod <behdad@behdad.org> Release script improvements, bug fixes.
diff --git a/ChangeLog b/ChangeLog
index 2ca943ca4..133425d9a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2005-08-31 Carl Worth <cworth@cworth.org>
+
+ * AUTHORS: Add Radek Doulík.
+
+ * test/.cvsignore:
+ * test/Makefile.am:
+ * test/clip-all.c: (draw), (main): Add test exposing a BadValue
+ (0-size pixmap) bug in cairo-xlib-surface when everything is
+ clipped away (thanks to Radek Doulík <rodo@novell.com>).
+
2005-08-30 Owen Taylor <otaylor@redhat.com>
* src/cairo-xlib-surface.c (_cairo_xlib_surface_create_internal):
diff --git a/test/.cvsignore b/test/.cvsignore
index 1b255b35c..bfda73e66 100644
--- a/test/.cvsignore
+++ b/test/.cvsignore
@@ -4,6 +4,7 @@ Makefile
Makefile.in
a8-mask
caps-sub-paths
+clip-all
clip-nesting
clip-operator
clip-twice
diff --git a/test/Makefile.am b/test/Makefile.am
index 1cf987969..c056a8d90 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -2,6 +2,7 @@
TESTS = \
a8-mask \
caps-sub-paths \
+clip-all \
clip-nesting \
clip-operator \
clip-twice \
@@ -77,6 +78,7 @@ endif
EXTRA_DIST = \
a8-mask-ref.png \
caps-sub-paths-ref.png \
+clip-all-ref.png \
clip-nesting-ref.png \
clip-operator-ref.png \
clip-twice-ref.png \
@@ -140,6 +142,7 @@ rel-path-ref.png
# provide an explanation for the expected failure.
XFAIL_TESTS = \
a8-mask \
+clip-all \
filter-nearest-offset \
pixman-rotate \
self-intersecting \
@@ -184,6 +187,7 @@ endif
# from autogen.sh. My, but this is painful...
a8_mask_LDADD = $(LDADDS)
caps_sub_paths_LDADD = $(LDADDS)
+clip_all_LDADD = $(LDADDS)
clip_nesting_LDADD = $(LDADDS)
clip_operator_LDADD = $(LDADDS)
clip_twice_LDADD = $(LDADDS)
diff --git a/test/clip-all-ref.png b/test/clip-all-ref.png
new file mode 100644
index 000000000..6c14df51f
--- /dev/null
+++ b/test/clip-all-ref.png
Binary files differ
diff --git a/test/clip-all.c b/test/clip-all.c
new file mode 100644
index 000000000..0fbcc4ac1
--- /dev/null
+++ b/test/clip-all.c
@@ -0,0 +1,69 @@
+/*
+ * Copyright © 2005 Novell, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software
+ * and its documentation for any purpose is hereby granted without
+ * fee, provided that the above copyright notice appear in all copies
+ * and that both that copyright notice and this permission notice
+ * appear in supporting documentation, and that the name of
+ * Novell, Inc. not be used in advertising or publicity pertaining to
+ * distribution of the software without specific, written prior
+ * permission. Novell, Inc. makes no representations about the
+ * suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * NOVELL, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL NOVELL, INC. BE LIABLE FOR ANY SPECIAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+ * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Author: Radek Doulík <rodo@novell.com>
+ */
+
+#include "cairo-test.h"
+
+#define SIZE 10
+#define CLIP_SIZE 2
+
+cairo_test_t test = {
+ "clip-all",
+ "Test clipping with everything clipped out",
+ SIZE, SIZE
+};
+
+static cairo_test_status_t
+draw (cairo_t *cr, int width, int height)
+{
+ cairo_rectangle (cr, 0, 0, SIZE, SIZE);
+ cairo_set_source_rgb (cr, 0, 0, 1);
+ cairo_fill (cr);
+
+ cairo_reset_clip (cr);
+ cairo_rectangle (cr, CLIP_SIZE, CLIP_SIZE, CLIP_SIZE, CLIP_SIZE);
+ cairo_clip (cr);
+ cairo_rectangle (cr, 3*CLIP_SIZE, 3*CLIP_SIZE, CLIP_SIZE, CLIP_SIZE);
+ cairo_clip (cr);
+
+ cairo_translate (cr, .5, .5);
+
+ cairo_reset_clip (cr);
+ cairo_rectangle (cr, CLIP_SIZE, CLIP_SIZE, CLIP_SIZE, CLIP_SIZE);
+ cairo_clip (cr);
+ cairo_rectangle (cr, 3*CLIP_SIZE, 3*CLIP_SIZE, CLIP_SIZE, CLIP_SIZE);
+ cairo_clip (cr);
+
+ cairo_rectangle (cr, 0, 0, SIZE, SIZE);
+ cairo_set_source_rgb (cr, 1, 1, 0);
+ cairo_fill (cr);
+
+ return CAIRO_TEST_SUCCESS;
+}
+
+int
+main (void)
+{
+ return cairo_test (&test, draw);
+}