summaryrefslogtreecommitdiff
path: root/library/src/math
diff options
context:
space:
mode:
authorBirk Tjelmeland <git@birktj.no>2023-04-13 16:05:56 +0200
committerGitHub <noreply@github.com>2023-04-13 16:05:56 +0200
commitd1cd814ef8149cbac6e59c81e074aa59c930eed3 (patch)
tree02b9a8afed4d121b34d89669452f91cda19df8e2 /library/src/math
parent46ce9c94e3f615751989d3cba5aa1599e0ba5913 (diff)
Add support for more complex strokes (#505)
Diffstat (limited to 'library/src/math')
-rw-r--r--library/src/math/frac.rs1
-rw-r--r--library/src/math/root.rs7
2 files changed, 6 insertions, 2 deletions
diff --git a/library/src/math/frac.rs b/library/src/math/frac.rs
index 1712a1fc..7520e10d 100644
--- a/library/src/math/frac.rs
+++ b/library/src/math/frac.rs
@@ -135,6 +135,7 @@ fn layout(
Geometry::Line(Point::with_x(line_width)).stroked(Stroke {
paint: TextElem::fill_in(ctx.styles()),
thickness,
+ ..Stroke::default()
}),
span,
),
diff --git a/library/src/math/root.rs b/library/src/math/root.rs
index 037c6ce7..cc48cd74 100644
--- a/library/src/math/root.rs
+++ b/library/src/math/root.rs
@@ -121,8 +121,11 @@ fn layout(
frame.push(
line_pos,
FrameItem::Shape(
- Geometry::Line(Point::with_x(radicand.width()))
- .stroked(Stroke { paint: TextElem::fill_in(ctx.styles()), thickness }),
+ Geometry::Line(Point::with_x(radicand.width())).stroked(Stroke {
+ paint: TextElem::fill_in(ctx.styles()),
+ thickness,
+ ..Stroke::default()
+ }),
span,
),
);