Make sure stroke bounds are big enough

Our standard 'empty path' in gtk4-node-editor
was getting its pointy corners cut off.
This commit is contained in:
Matthias Clasen
2023-08-21 23:44:48 -04:00
parent acf9612ed8
commit 486674927a
2 changed files with 3 additions and 2 deletions

View File

@@ -3,7 +3,8 @@ Slug: paths
GSK provides a path object that can be used to render more complex
shapes than lines or rounded rectangles. It is comparable to cairos
path API, with some notable differences.
[path API](https://www.cairographics.org/manual/cairo-Paths.html),
with some notable differences.
In general, a path consists of one or more connected **_contours_**,
each of which may have multiple **_segments_**, and may or may not be closed.

View File

@@ -319,7 +319,7 @@ gsk_standard_contour_get_stroke_bounds (const GskContour *contour,
if (self->n_points == 0)
return FALSE;
extra = MAX (stroke->line_width / 2, gsk_stroke_get_join_width (stroke) / 2);
extra = MAX (stroke->line_width, gsk_stroke_get_join_width (stroke));
gsk_bounding_box_init (bounds, &GRAPHENE_POINT_INIT (self->bounds.min.x - extra,
self->bounds.min.y - extra),