diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-04-08 17:08:30 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-04-09 12:02:35 +0200 |
| commit | 29eb13ca6214461a4b0deb63d589cd39ad6d41c2 (patch) | |
| tree | c86797d440cfcc801c87a3c64f479e39f2c068b1 /tests/typ/graphics | |
| parent | 712c00ecb72b67da2c0788e5d3eb4dcc6366b2a7 (diff) | |
Sum color and length into stroke
Diffstat (limited to 'tests/typ/graphics')
| -rw-r--r-- | tests/typ/graphics/line.typ | 2 | ||||
| -rw-r--r-- | tests/typ/graphics/shape-circle.typ | 2 | ||||
| -rw-r--r-- | tests/typ/graphics/shape-ellipse.typ | 2 | ||||
| -rw-r--r-- | tests/typ/graphics/shape-fill-stroke.typ | 24 | ||||
| -rw-r--r-- | tests/typ/graphics/shape-rect.typ | 3 |
5 files changed, 23 insertions, 10 deletions
diff --git a/tests/typ/graphics/line.typ b/tests/typ/graphics/line.typ index 050ce05c..97dcb5cf 100644 --- a/tests/typ/graphics/line.typ +++ b/tests/typ/graphics/line.typ @@ -37,7 +37,7 @@ ] ] -#align(center, grid(columns: (1fr,) * 3, ..((star(20pt, thickness: .5pt),) * 9))) +#align(center, grid(columns: (1fr,) * 3, ..((star(20pt, stroke: 0.5pt),) * 9))) --- // Test errors. diff --git a/tests/typ/graphics/shape-circle.typ b/tests/typ/graphics/shape-circle.typ index 4b978e86..dc1e3f24 100644 --- a/tests/typ/graphics/shape-circle.typ +++ b/tests/typ/graphics/shape-circle.typ @@ -9,7 +9,7 @@ // Test auto sizing. Auto-sized circle. \ -#circle(fill: rgb("eb5278"), stroke: black, thickness: 2pt, +#circle(fill: rgb("eb5278"), stroke: 2pt + black, align(center + horizon)[But, soft!] ) diff --git a/tests/typ/graphics/shape-ellipse.typ b/tests/typ/graphics/shape-ellipse.typ index 154144c4..995eabb9 100644 --- a/tests/typ/graphics/shape-ellipse.typ +++ b/tests/typ/graphics/shape-ellipse.typ @@ -17,7 +17,7 @@ Rect in ellipse in fixed rect. \ ) Auto-sized ellipse. \ -#ellipse(fill: conifer, stroke: forest, thickness: 3pt, padding: 3pt)[ +#ellipse(fill: conifer, stroke: 3pt + forest, padding: 3pt)[ #set text(8pt) But, soft! what light through yonder window breaks? ] diff --git a/tests/typ/graphics/shape-fill-stroke.typ b/tests/typ/graphics/shape-fill-stroke.typ index dd5b9ee8..c09cb065 100644 --- a/tests/typ/graphics/shape-fill-stroke.typ +++ b/tests/typ/graphics/shape-fill-stroke.typ @@ -6,15 +6,15 @@ variant(stroke: none), variant(), variant(fill: none), - variant(thickness: 2pt), + variant(stroke: 2pt), variant(stroke: eastern), - variant(stroke: eastern, thickness: 2pt), + variant(stroke: eastern + 2pt), variant(fill: eastern), variant(fill: eastern, stroke: none), - variant(fill: forest, stroke: none, thickness: 2pt), + variant(fill: forest, stroke: none), variant(fill: forest, stroke: conifer), - variant(fill: forest, stroke: black, thickness: 2pt), - variant(fill: forest, stroke: conifer, thickness: 2pt), + variant(fill: forest, stroke: black + 2pt), + variant(fill: forest, stroke: conifer + 2pt), ) { (align(horizon)[{i + 1}.], item, []) } @@ -24,3 +24,17 @@ gutter: 5pt, ..items, ) + +--- +// Test stroke folding. +#let sq = square.with(size: 10pt) + +#set square(stroke: none) +#sq() +#set square(stroke: auto) +#sq() +#sq(fill: teal) +#sq(stroke: 2pt) +#sq(stroke: blue) +#sq(fill: teal, stroke: blue) +#sq(fill: teal, stroke: 2pt + blue) diff --git a/tests/typ/graphics/shape-rect.typ b/tests/typ/graphics/shape-rect.typ index add39b80..e035fc91 100644 --- a/tests/typ/graphics/shape-rect.typ +++ b/tests/typ/graphics/shape-rect.typ @@ -14,8 +14,7 @@ #block(rect( height: 15pt, fill: rgb("46b3c2"), - stroke: rgb("234994"), - thickness: 2pt, + stroke: 2pt + rgb("234994"), )) // Fixed width, text height. |
