[cairo-commit] 2 commits - test/.gitignore test/leaky-dash.c
test/Makefile.am
Carl Worth
cworth at kemper.freedesktop.org
Wed Apr 26 12:55:26 PDT 2006
test/.gitignore | 1
test/Makefile.am | 36 +++-------------------------
test/leaky-dash.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 73 insertions(+), 32 deletions(-)
New commits:
diff-tree e0a2e1fd14a53e646fb6b1a861fd9ca78aa6b603 (from e4b3cb1e71549af6910665e99d2a0dd57e30cede)
Author: Carl Worth <cworth at cworth.org>
Date: Wed Apr 26 12:51:54 2006 -0700
Add leaky-dash test case demonstrating bug #4863.
Test case for bug #4863:
stroking problems with wide dashed lines
https://bugs.freedesktop.org/show_bug.cgi?id=4863
diff --git a/test/.gitignore b/test/.gitignore
index 5ec8798..67c0431 100644
--- a/test/.gitignore
+++ b/test/.gitignore
@@ -30,6 +30,7 @@ font-face-get-type
get-and-set
gradient-alpha
imagediff
+leaky-dash
leaky-polygon
line-width
linear-gradient
diff --git a/test/Makefile.am b/test/Makefile.am
index 367bb05..8f6cd89 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -25,6 +25,7 @@ filter-nearest-offset \
font-face-get-type \
get-and-set \
gradient-alpha \
+leaky-dash \
leaky-polygon \
line-width \
linear-gradient \
@@ -139,6 +140,7 @@ fill-rule-rgb24-ref.png \
filter-nearest-offset-ref.png \
gradient-alpha-ref.png \
gradient-alpha-rgb24-ref.png \
+leaky-dash-ref.png \
leaky-polygon-ref.png \
linear-gradient-ref.png \
line-width-ref.png \
@@ -301,6 +303,7 @@ filter_nearest_offset_LDADD = $(LDADDS)
ft_font_create_for_ft_face_LDADD = $(LDADDS)
get_and_set_LDADD = $(LDADDS)
gradient_alpha_LDADD = $(LDADDS)
+leaky_dash_LDADD = $(LDADDS)
leaky_polygon_LDADD = $(LDADDS)
line_width_LDADD = $(LDADDS)
linear_gradient_LDADD = $(LDADDS)
diff --git a/test/leaky-dash.c b/test/leaky-dash.c
new file mode 100644
index 0000000..95c5ca7
--- /dev/null
+++ b/test/leaky-dash.c
@@ -0,0 +1,68 @@
+/*
+ * Copyright © 2005 Red Hat, 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
+ * Red Hat, Inc. not be used in advertising or publicity pertaining to
+ * distribution of the software without specific, written prior
+ * permission. Red Hat, Inc. makes no representations about the
+ * suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * RED HAT, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL RED HAT, 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: Carl D. Worth <cworth at cworth.org>
+ */
+
+/* Test case for bug #4863:
+ *
+ * stroking problems with wide dashed lines
+ * https://bugs.freedesktop.org/show_bug.cgi?id=4863
+ */
+
+#include "cairo-test.h"
+
+#define WIDTH 71
+#define HEIGHT 28
+
+cairo_test_t test = {
+ "leaky-dash",
+ "Exercises bug #4863 in which a dashed stroke leaks into half the rectangle being filled",
+ WIDTH, HEIGHT
+};
+
+static cairo_test_status_t
+draw (cairo_t *cr, int width, int height)
+{
+ double dash[2];
+
+ cairo_set_source_rgb (cr, 1.0, 1.0, 1.0); /* white */
+ cairo_paint (cr);
+ cairo_set_source_rgb (cr, 0.0, 0.0, 0.0); /* black */
+
+ cairo_set_line_width (cr, 2);
+ dash[0] = 8.0;
+ dash[1] = 2.0;
+
+ cairo_rectangle (cr, 2.0, 2.0, 67.0, 24.0);
+
+ cairo_set_dash (cr, dash, 2, 9.0);
+ cairo_stroke (cr);
+
+ return CAIRO_TEST_SUCCESS;
+}
+
+int
+main (void)
+{
+ return cairo_test (&test, draw);
+}
diff-tree e4b3cb1e71549af6910665e99d2a0dd57e30cede (from 7110c168f7edadcedaea74a73b7ac6f095165931)
Author: Carl Worth <cworth at cworth.org>
Date: Wed Apr 26 12:49:58 2006 -0700
Remove deleted reference images from Makefile.am
diff --git a/test/Makefile.am b/test/Makefile.am
index e4ca68e..367bb05 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -111,15 +111,10 @@ endif
# way to avoid it? Can I use a wildcard here?
EXTRA_DIST = \
a8-mask-ref.png \
-a8-mask-rgb24-ref.png \
caps-joins-ref.png \
-caps-joins-rgb24-ref.png \
caps-joins-alpha-ref.png \
-caps-joins-alpha-rgb24-ref.png \
caps-sub-paths-ref.png \
-caps-sub-paths-rgb24-ref.png \
clip-all-ref.png \
-clip-all-rgb24-ref.png \
clip-fill-rule-ref.png \
clip-fill-rule-pixel-aligned-ref.png \
clip-nesting-ref.png \
@@ -130,18 +125,11 @@ clip-twice-ref.png \
clip-twice-rgb24-ref.png \
composite-integer-translate-over-ref.png \
composite-integer-translate-over-repeat-ref.png \
-composite-integer-translate-over-repeat-rgb24-ref.png \
-composite-integer-translate-over-rgb24-ref.png \
composite-integer-translate-source-ref.png \
-composite-integer-translate-source-rgb24-ref.png \
create-from-png-ref.png \
-create-from-png-rgb24-ref.png \
create-from-png-stream-ref.png \
-create-from-png-stream-rgb24-ref.png \
dash-caps-joins-ref.png \
-dash-caps-joins-rgb24-ref.png \
dash-offset-negative-ref.png \
-dash-offset-negative-rgb24-ref.png \
dash-zero-length-ref.png \
dash-zero-length-rgb24-ref.png \
fill-and-stroke-ref.png \
@@ -149,15 +137,11 @@ fill-and-stroke-rgb24-ref.png \
fill-rule-ref.png \
fill-rule-rgb24-ref.png \
filter-nearest-offset-ref.png \
-filter-nearest-offset-rgb24-ref.png \
gradient-alpha-ref.png \
gradient-alpha-rgb24-ref.png \
leaky-polygon-ref.png \
-leaky-polygon-rgb24-ref.png \
linear-gradient-ref.png \
-linear-gradient-rgb24-ref.png \
line-width-ref.png \
-line-width-rgb24-ref.png \
mask-ctm-ref.png \
mask-ctm-rgb24-ref.png \
mask-ref.png \
@@ -165,7 +149,6 @@ mask-rgb24-ref.png \
mask-surface-ctm-ref.png \
mask-surface-ctm-rgb24-ref.png \
move-to-show-surface-ref.png \
-move-to-show-surface-rgb24-ref.png \
new-sub-path-ref.png \
new-sub-path-rgb24-ref.png \
nil-surface-ref.png \
@@ -175,53 +158,39 @@ operator-clear-rgb24-ref.png \
operator-source-ref.png \
operator-source-rgb24-ref.png \
paint-ref.png \
-paint-rgb24-ref.png \
paint-source-alpha-ref.png \
-paint-source-alpha-rgb24-ref.png \
paint-with-alpha-ref.png \
-paint-with-alpha-rgb24-ref.png \
path-data-ref.png \
-path-data-rgb24-ref.png \
pixman-rotate-ref.png \
pixman-rotate-rgb24-ref.png \
rectangle-rounding-error-ref.png \
-rectangle-rounding-error-rgb24-ref.png \
rel-path-ref.png \
rel-path-rgb24-ref.png \
romedalen.png \
scale-source-surface-paint-ref.png \
scale-source-surface-paint-rgb24-ref.png \
self-copy-ref.png \
-self-copy-rgb24-ref.png \
self-intersecting-ref.png \
self-intersecting-rgb24-ref.png \
set-source-ref.png \
set-source-rgb24-ref.png \
+show-glyphs-many-ref.png \
show-text-current-point-ref.png \
-show-text-current-point-rgb24-ref.png \
source-clip-ref.png \
-source-clip-rgb24-ref.png \
source-surface-scale-paint-ref.png \
source-surface-scale-paint-rgb24-ref.png \
surface-pattern-ref.png \
-surface-pattern-rgb24-ref.png \
text-antialias-gray-ref.png \
-text-antialias-gray-rgb24-ref.png \
text-antialias-none-ref.png \
-text-antialias-none-rgb24-ref.png \
text-antialias-subpixel-ref.png \
-text-antialias-subpixel-rgb24-ref.png \
text-pattern-ref.png \
text-pattern-rgb24-ref.png \
text-rotate-rgb24-ref.png \
transforms-ref.png \
-transforms-rgb24-ref.png \
translate-show-surface-ref.png \
-translate-show-surface-rgb24-ref.png \
trap-clip-ref.png \
trap-clip-rgb24-ref.png \
unantialiased-shapes-ref.png \
-unantialiased-shapes-rgb24-ref.png \
unbounded-operator-ref.png \
unbounded-operator-rgb24-ref.png
More information about the cairo-commit
mailing list