Skip to content

Commit

Permalink
script: Fix compilation
Browse files Browse the repository at this point in the history
Use accessors instead of directly accessing path optimization flags.

Change the conditions for outputting tolerance (was 'when
path->is_rectilinear is FALSE', now is 'whenever the path includes a
curve').

Always output tolerance for strokes, because pen depends on tolerance
(for round caps/joins and for cusps).
  • Loading branch information
Andrea Canciani committed Oct 30, 2010
1 parent e43ae00 commit bb30dae
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/cairo-script-surface.c
Original file line number Diff line number Diff line change
Expand Up @@ -2054,13 +2054,13 @@ _cairo_script_surface_clipper_intersect_clip_path (cairo_surface_clipper_t *clip
if (unlikely (status))
return status;

if (! path->is_rectilinear) {
if (path->has_curve_to) {
status = _emit_tolerance (surface, tolerance, matrix_updated);
if (unlikely (status))
return status;
}

if (! path->maybe_fill_region) {
if (! _cairo_path_fixed_fill_maybe_region (path)) {
status = _emit_antialias (surface, antialias);
if (unlikely (status))
return status;
Expand Down Expand Up @@ -2343,11 +2343,9 @@ _cairo_script_surface_stroke (void *abstract_surface,
if (unlikely (status))
goto BAIL;

if (! path->is_rectilinear) {
status = _emit_tolerance (surface, tolerance, matrix_updated);
if (unlikely (status))
goto BAIL;
}
status = _emit_tolerance (surface, tolerance, matrix_updated);
if (unlikely (status))
goto BAIL;

status = _emit_antialias (surface, antialias);
if (unlikely (status))
Expand Down Expand Up @@ -2414,13 +2412,13 @@ _cairo_script_surface_fill (void *abstract_surface,
goto BAIL;
}

if (! path->is_rectilinear) {
if (path->has_curve_to) {
status = _emit_tolerance (surface, tolerance, matrix_updated);
if (unlikely (status))
goto BAIL;
}

if (! path->maybe_fill_region) {
if (! _cairo_path_fixed_fill_maybe_region (path)) {
status = _emit_antialias (surface, antialias);
if (unlikely (status))
goto BAIL;
Expand Down

0 comments on commit bb30dae

Please sign in to comment.