Skip to content

Commit 7b61c8f

Browse files
Fix Returning Invalid Stroke Objects (#1059)
When passing `none` to a `stroke:` style, cetz did create an invalid stroke object. ref #1058
2 parents 0425739 + 05b5949 commit 7b61c8f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
outsides the `perspective` environment! (#1033)
2525
- Fixed a bug when passing a coordinate to the `angle:` argument of
2626
`content` and a transformation matrix ≠ id.
27+
- Fixed a bug with cetz creating invalid stroke objects for `stroke: none` (#1059).
2728

2829
# 0.4.2
2930
- The `tree` element now has a `anchor:` argument to position the tree (#929)

src/util.typ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@
359359
/// -> dictionary
360360
#let resolve-stroke(stroke) = {
361361
if stroke == none {
362-
return (paint: none, thickness: 0pt, join: none, cap: none, miter-limit: 4)
362+
return (paint: auto, thickness: 0pt, join: auto, cap: auto, miter-limit: 4)
363363
}
364364

365365
if type(stroke) in (std.color, std.length) {

0 commit comments

Comments
 (0)