mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-02 01:28:18 +02:00
Rename has_sub_path to has_initial_sub_path
has_initial_sub_path more accurately describes the condition we want to track. This flag is used to indicate when an initial sub_path needs capping but has no associated slope and thus no associated faces.
This commit is contained in:
parent
9f3fb4f753
commit
78ae474d96
1 changed files with 8 additions and 8 deletions
|
|
@ -51,7 +51,7 @@ typedef struct cairo_stroker {
|
|||
cairo_point_t current_point;
|
||||
cairo_point_t first_point;
|
||||
|
||||
cairo_bool_t has_sub_path;
|
||||
cairo_bool_t has_initial_sub_path;
|
||||
|
||||
cairo_bool_t has_current_face;
|
||||
cairo_stroke_face_t current_face;
|
||||
|
|
@ -167,7 +167,7 @@ _cairo_stroker_init (cairo_stroker_t *stroker,
|
|||
|
||||
stroker->has_current_face = FALSE;
|
||||
stroker->has_first_face = FALSE;
|
||||
stroker->has_sub_path = FALSE;
|
||||
stroker->has_initial_sub_path = FALSE;
|
||||
|
||||
if (stroker->style->dash)
|
||||
_cairo_stroker_start_dash (stroker);
|
||||
|
|
@ -466,7 +466,7 @@ _cairo_stroker_add_caps (cairo_stroker_t *stroker)
|
|||
{
|
||||
cairo_status_t status;
|
||||
/* check for a degenerative sub_path */
|
||||
if (stroker->has_sub_path
|
||||
if (stroker->has_initial_sub_path
|
||||
&& !stroker->has_first_face
|
||||
&& !stroker->has_current_face
|
||||
&& stroker->style->line_cap == CAIRO_LINE_JOIN_ROUND)
|
||||
|
|
@ -611,7 +611,7 @@ _cairo_stroker_move_to (void *closure, cairo_point_t *point)
|
|||
|
||||
stroker->has_first_face = FALSE;
|
||||
stroker->has_current_face = FALSE;
|
||||
stroker->has_sub_path = FALSE;
|
||||
stroker->has_initial_sub_path = FALSE;
|
||||
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
@ -636,7 +636,7 @@ _cairo_stroker_line_to (void *closure, cairo_point_t *point)
|
|||
cairo_point_t *p2 = point;
|
||||
cairo_slope_t slope;
|
||||
|
||||
stroker->has_sub_path = TRUE;
|
||||
stroker->has_initial_sub_path = TRUE;
|
||||
|
||||
if (p1->x == p2->x && p1->y == p2->y)
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
|
|
@ -683,7 +683,7 @@ _cairo_stroker_line_to_dashed (void *closure, cairo_point_t *point)
|
|||
cairo_point_t *p2 = point;
|
||||
cairo_slope_t slope;
|
||||
|
||||
stroker->has_sub_path = stroker->dash_on;
|
||||
stroker->has_initial_sub_path = stroker->dash_on;
|
||||
|
||||
if (p1->x == p2->x && p1->y == p2->y)
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
|
|
@ -744,7 +744,7 @@ _cairo_stroker_line_to_dashed (void *closure, cairo_point_t *point)
|
|||
return status;
|
||||
}
|
||||
}
|
||||
stroker->has_sub_path = TRUE;
|
||||
stroker->has_initial_sub_path = TRUE;
|
||||
}
|
||||
if (remain) {
|
||||
/*
|
||||
|
|
@ -945,7 +945,7 @@ _cairo_stroker_close_path (void *closure)
|
|||
return status;
|
||||
}
|
||||
|
||||
stroker->has_sub_path = FALSE;
|
||||
stroker->has_initial_sub_path = FALSE;
|
||||
stroker->has_first_face = FALSE;
|
||||
stroker->has_current_face = FALSE;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue