|
9 | 9 | /// Constant to be used as float rounding error |
10 | 10 | #let float-epsilon = 0.000001 |
11 | 11 |
|
12 | | -#let typst-measure = measure |
13 | | -#let typst-length = length |
14 | | - |
15 | | - |
16 | 12 | /// Multiplies vectors by a transformation matrix. If multiple vectors are given they are returned as an array, if only one vector is given only one will be returned, if a dictionary is given they will be returned in the dictionary with the same keys. |
17 | 13 | /// |
18 | 14 | /// - transform (matrix,function): The $4 \times 4$ transformation matrix or a function that accepts and returns a vector. |
|
200 | 196 | /// - cnt (content): The content to measure. |
201 | 197 | /// -> vector |
202 | 198 | #let measure(ctx, cnt) = { |
203 | | - let size = typst-measure(cnt) |
| 199 | + let size = std.measure(cnt) |
204 | 200 | return ( |
205 | 201 | calc.abs(size.width / ctx.length), |
206 | 202 | calc.abs(size.height / ctx.length) |
|
275 | 271 | let east = radii.at("east", default: auto) |
276 | 272 |
|
277 | 273 | if north != auto or south != auto { |
278 | | - assert(west == auto and east == auto, |
| 274 | + assert(ctx, west == auto and east == auto, |
279 | 275 | message: "Corner radius north/south and west/east are mutually exclusive! Use per corner radii: north-west, .. instead.") |
280 | 276 | } |
281 | 277 | if west != auto or east != auto { |
282 | | - assert(north == auto and south == auto, |
| 278 | + assert(ctx, north == auto and south == auto, |
283 | 279 | message: "Corner radius north/south and west/east are mutually exclusive! Use per corner radii: north-west, .. instead.") |
284 | 280 | } |
285 | 281 |
|
|
0 commit comments