Switch from old tessellator to new tessellator

This commit is contained in:
Carl Worth 2006-09-20 10:47:58 -07:00
parent 0f7c488906
commit 4cd871b6f3
6 changed files with 19 additions and 11 deletions

View file

@ -170,6 +170,7 @@ libcairo_la_SOURCES = \
cairo-arc-private.h \
cairo-array.c \
cairo-base85-stream.c \
cairo-bentley-ottmann.c \
cairo-cache.c \
cairo-cache-private.h \
cairo-clip.c \
@ -201,6 +202,8 @@ libcairo_la_SOURCES = \
cairo-region.c \
cairo-scaled-font.c \
cairo-scaled-font-test.h \
cairo-skiplist.c \
cairo-skiplist-private.h \
cairo-slope.c \
cairo-spline.c \
cairo-stroke-style.c \

View file

@ -194,9 +194,9 @@ _cairo_path_fixed_fill_to_traps (cairo_path_fixed_t *path,
if (status)
goto BAIL;
status = _cairo_traps_tessellate_polygon (filler.traps,
&filler.polygon,
fill_rule);
status = _cairo_bentley_ottmann_tessellate_polygon (filler.traps,
&filler.polygon,
fill_rule);
if (status)
goto BAIL;

View file

@ -418,7 +418,7 @@ _cairo_stroker_add_cap (cairo_stroker_t *stroker, cairo_stroke_face_t *f)
_cairo_polygon_line_to (&polygon, &f->ccw);
_cairo_polygon_close (&polygon);
status = _cairo_traps_tessellate_polygon (stroker->traps, &polygon, CAIRO_FILL_RULE_WINDING);
status = _cairo_bentley_ottmann_tessellate_polygon (stroker->traps, &polygon, CAIRO_FILL_RULE_WINDING);
_cairo_polygon_fini (&polygon);
return status;

View file

@ -448,7 +448,7 @@ _cairo_pen_stroke_spline (cairo_pen_t *pen,
return status;
_cairo_polygon_close (&polygon);
_cairo_traps_tessellate_polygon (traps, &polygon, CAIRO_FILL_RULE_WINDING);
_cairo_bentley_ottmann_tessellate_polygon (traps, &polygon, CAIRO_FILL_RULE_WINDING);
_cairo_polygon_fini (&polygon);
return CAIRO_STATUS_SUCCESS;

View file

@ -46,11 +46,6 @@ static cairo_status_t
_cairo_traps_add_trap (cairo_traps_t *traps, cairo_fixed_t top, cairo_fixed_t bottom,
cairo_line_t *left, cairo_line_t *right);
static cairo_status_t
_cairo_traps_add_trap_from_points (cairo_traps_t *traps, cairo_fixed_t top, cairo_fixed_t bottom,
cairo_point_t left_p1, cairo_point_t left_p2,
cairo_point_t right_p1, cairo_point_t right_p2);
static int
_compare_point_fixed_by_y (const void *av, const void *bv);
@ -178,7 +173,7 @@ _cairo_traps_add_trap (cairo_traps_t *traps, cairo_fixed_t top, cairo_fixed_t bo
return traps->status;
}
static cairo_status_t
cairo_status_t
_cairo_traps_add_trap_from_points (cairo_traps_t *traps, cairo_fixed_t top, cairo_fixed_t bottom,
cairo_point_t left_p1, cairo_point_t left_p2,
cairo_point_t right_p1, cairo_point_t right_p2)

View file

@ -2236,6 +2236,16 @@ _cairo_traps_tessellate_polygon (cairo_traps_t *traps,
cairo_polygon_t *poly,
cairo_fill_rule_t fill_rule);
cairo_status_t
_cairo_traps_add_trap_from_points (cairo_traps_t *traps, cairo_fixed_t top, cairo_fixed_t bottom,
cairo_point_t left_p1, cairo_point_t left_p2,
cairo_point_t right_p1, cairo_point_t right_p2);
cairo_status_t
_cairo_bentley_ottmann_tessellate_polygon (cairo_traps_t *traps,
cairo_polygon_t *polygon,
cairo_fill_rule_t fill_rule);
cairo_private int
_cairo_traps_contain (cairo_traps_t *traps, double x, double y);