mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 04:08:13 +02:00
Mark a couple of items that are now complete.
Add test case that fills and strokes the same shapes, (in preparation for testing cairo_fill_preserve patch).
This commit is contained in:
parent
ea82928aa7
commit
aef8f9b1a0
6 changed files with 89 additions and 7 deletions
11
ChangeLog
11
ChangeLog
|
|
@ -1,3 +1,14 @@
|
|||
2005-04-18 Carl Worth <cworth@cworth.org>
|
||||
|
||||
* ROADMAP: Mark a couple of items that are now complete.
|
||||
|
||||
* test/.cvsignore:
|
||||
* test/Makefile.am:
|
||||
* test/fill-and-stroke-ref.png:
|
||||
* test/fill-and-stroke.c: (draw), (main): Add test case that fills
|
||||
and strokes the same shapes, (in preparation for testing
|
||||
cairo_fill_preserve patch).
|
||||
|
||||
2005-04-14 Carl Worth <cworth@cworth.org>
|
||||
|
||||
* TODO: Update API Shakeup chart to indicate that cairo_set_source
|
||||
|
|
|
|||
14
ROADMAP
14
ROADMAP
|
|
@ -17,8 +17,8 @@ Implementation work
|
|||
Difficulty: hard
|
||||
Status: otaylor has drafted a plan or two on the list
|
||||
|
||||
API Issues (more detail in TOO
|
||||
------------------------------
|
||||
API Issues (more detail in TODO file)
|
||||
-------------------------------------
|
||||
|
||||
A1. Add cairo_paint
|
||||
Difficulty: moderate or moderate to minor
|
||||
|
|
@ -36,12 +36,12 @@ API Issues (more detail in TOO
|
|||
Status: cworth sent API proposal to the list
|
||||
(still some unresolved API issues)
|
||||
|
||||
A4. Make set_source consistent
|
||||
✓A4. Make set_source consistent
|
||||
Difficulty: easy
|
||||
Dependencies: needs [A2,A3] to avoid losing functionality,
|
||||
(but we may just live with that as we've now got
|
||||
a circular dependency)
|
||||
Status: cworth has patch basically complete
|
||||
Status: Done.
|
||||
|
||||
A5. Add cairo_clip/fill/stroke_preserve
|
||||
Difficulty: easy
|
||||
|
|
@ -56,7 +56,7 @@ API Issues (more detail in TOO
|
|||
|
||||
Difficulty: trivial
|
||||
Dependencies: eliminating cairo_show_surface depends on [A1]
|
||||
Status: just waiting for a less inconvient time to break
|
||||
Status: just waiting for a less inconvenient time to break
|
||||
compatibility
|
||||
|
||||
A7. cairo_surface_mark_dirty
|
||||
|
|
@ -66,9 +66,9 @@ API Issues (more detail in TOO
|
|||
|
||||
Performance work
|
||||
----------------
|
||||
P1. Make pixel-aligned rectangle compositing fast
|
||||
✓P1. Make pixel-aligned rectangle compositing fast
|
||||
Difficulty: moderate to easy
|
||||
Status: none
|
||||
Status: Done.
|
||||
|
||||
P2. Generate better trapezoids to go easier on the rasterizer
|
||||
Difficulty: moderate to hard
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ Makefile.in
|
|||
clip-twice
|
||||
coverage
|
||||
create-for-png
|
||||
fill-and-stroke
|
||||
fill-rule
|
||||
get-and-set
|
||||
gradient-alpha
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ TESTS = \
|
|||
clip-twice \
|
||||
coverage \
|
||||
create-for-png \
|
||||
fill-and-stroke \
|
||||
fill-rule \
|
||||
get-and-set \
|
||||
gradient-alpha \
|
||||
|
|
@ -27,6 +28,7 @@ user-data
|
|||
# way to avoid it? Can I use a wildcard here?
|
||||
EXTRA_DIST = \
|
||||
create-for-png-ref.png \
|
||||
fill-and-stroke-ref.png \
|
||||
fill-rule-ref.png \
|
||||
gradient-alpha-ref.png \
|
||||
leaky-polygon-ref.png \
|
||||
|
|
@ -91,6 +93,7 @@ LDADDS = libcairotest.la $(top_builddir)/src/libcairo.la
|
|||
clip_twice_LDADD = $(LDADDS)
|
||||
coverage_LDADD = $(LDADDS)
|
||||
create_for_png_LDADD = $(LDADDS)
|
||||
fill_and_stroke_LDADD = $(LDADDS)
|
||||
fill_rule_LDADD = $(LDADDS)
|
||||
get_and_set_LDADD = $(LDADDS)
|
||||
gradient_alpha_LDADD = $(LDADDS)
|
||||
|
|
|
|||
BIN
test/fill-and-stroke-ref.png
Normal file
BIN
test/fill-and-stroke-ref.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 279 B |
67
test/fill-and-stroke.c
Normal file
67
test/fill-and-stroke.c
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
* 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@cworth.org>
|
||||
*/
|
||||
|
||||
#include "cairo-test.h"
|
||||
|
||||
#define PAD 2
|
||||
#define SIZE 10
|
||||
|
||||
cairo_test_t test = {
|
||||
"fill-and-stroke",
|
||||
"Tests calls to various set_source functions",
|
||||
2 * SIZE + 4 * PAD, SIZE + 2 * PAD
|
||||
};
|
||||
|
||||
static cairo_test_status_t
|
||||
draw (cairo_t *cr, int width, int height)
|
||||
{
|
||||
cairo_rectangle (cr, PAD, PAD, SIZE, SIZE);
|
||||
cairo_save (cr);
|
||||
cairo_set_source_rgb (cr, 0, 0, 1);
|
||||
cairo_fill (cr);
|
||||
cairo_restore (cr);
|
||||
cairo_set_source_rgb (cr, 1, 0, 0);
|
||||
cairo_stroke (cr);
|
||||
|
||||
cairo_translate (cr, SIZE + 2 * PAD, 0);
|
||||
|
||||
cairo_arc (cr,
|
||||
PAD + SIZE / 2, PAD + SIZE / 2,
|
||||
SIZE / 2,
|
||||
0, 2 * M_PI);
|
||||
cairo_save (cr);
|
||||
cairo_fill (cr);
|
||||
cairo_restore (cr);
|
||||
cairo_set_source_rgb (cr, 0, 0, 1);
|
||||
cairo_stroke (cr);
|
||||
|
||||
return CAIRO_TEST_SUCCESS;
|
||||
}
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
return cairo_test (&test, draw);
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue