Skip to content

Commit b60e7e9

Browse files
treewide: Release 0.3.3 (#820)
* treewide: Bump version to 0.3.3 * canvas: Add background field to canvas context for background-aware drawing (#823) Add background to canvas context Add background to canvas context * background: Update changelog & add documentation * mark: Fix mark styling issues with incomplete dict (#825) * matrix: Add a diag function (#824) * matrix: Add a diag function * matrix: Improve ident * mark: Add missing test case * bezier: Possible fix for div by zero bug --------- Co-authored-by: Derived Cat <hooyuser@outlook.com>
1 parent 2fa7ed9 commit b60e7e9

27 files changed

+116
-37
lines changed

CHANGES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
# 0.3.3
2+
- Circle supports two-point construction, using the distance as radius
23
- Require Typst 0.13.0, port test cases over to Tytanic
34
- Add note about contents `auto-scale` feature
45
- Various performance improvements
56
- Make use of the new `curve` API
7+
- **BREAKING** Matrix `ident` function signature changed
8+
- New `matrix.diag` function
9+
- Added a `background` to the context, set to the canvas background
10+
- Fixed mark styling issues with empty or incomplete style dictionaries
11+
- Fixes a division by zero bug when trying to calculate some intersections
612

713
# 0.3.2
814

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ For information, see the [online manual](https://cetz-package.github.io/docs).
6161

6262
To use this package, simply add the following code to your document:
6363
```
64-
#import "@preview/cetz:0.3.2"
64+
#import "@preview/cetz:0.3.3"
6565
6666
#cetz.canvas({
6767
import cetz.draw: *
@@ -85,7 +85,7 @@ just install
8585
The installed version can be imported by prefixing the package name with `@local`.
8686

8787
```typ
88-
#import "@local/cetz:0.3.2"
88+
#import "@local/cetz:0.3.3"
8989
9090
#cetz.canvas({
9191
import cetz.draw: *

docs/advanced/custom-types.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ A {{dictionary}} that holds the internal state of the canvas such as the element
66
The following fields are considered stable:
77
- length (length): Length of one canvas unit as typst length
88
- transform (matrix): Current 4x4 transformation matrix
9+
- background (none,color,gradient,tiling): The canvas' background
910
- debug (bool): True if the canvas' debug flag is set
1011

11-
1212
## <Type>element</Type>
1313

1414
A function that, when called with a <Type>context</Type>, returns some data that effects the canvas. Can also be an <Type>array</Type> of this type.

docs/getting-started.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sidebar_position: 1
88
This is the minimal starting point in a `.typ` file:
99

1010
```typ
11-
#import "@preview/cetz:0.3.2"
11+
#import "@preview/cetz:0.3.3"
1212
#cetz.canvas({
1313
import cetz.draw: *
1414
...

docs/tutorials/karl.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ In CeTZ, to draw a picture, two imports and a function call is all you need. Kar
2020

2121
```typ
2222
#set page(width: auto, height: auto)
23-
#import "@preview/cetz:0.3.2"
23+
#import "@preview/cetz:0.3.3"
2424
2525
We are working on
2626
#cetz.canvas({

gallery/karls-picture.png

-1.85 KB
Loading

gallery/karls-picture.typ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#import "@preview/cetz:0.3.2"
1+
#import "@preview/cetz:0.3.3"
22
#set page(width: auto, height: auto, margin: .5cm)
33

44
#show math.equation: block.with(fill: white, inset: 1pt)

gallery/paciolis.png

-63 Bytes
Loading

gallery/paciolis.typ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Example by @samuelireson
2-
#import "@preview/cetz:0.3.2": canvas, draw, tree
2+
#import "@preview/cetz:0.3.3": canvas, draw, tree
33

44
#set page(width: auto, height: auto, margin: .5cm)
55

gallery/periodic-table.png

1.7 MB
Loading

0 commit comments

Comments
 (0)