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:
@@ -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.
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user