summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Voynov <37143421+Andrew15-5@users.noreply.github.com>2025-06-09 17:25:33 +0300
committerGitHub <noreply@github.com>2025-06-09 14:25:33 +0000
commit2a3746c51de9231436013a2885a6d7096b0e4028 (patch)
tree6bdc006ec82ddd6ed1819a8b8b3dad491722c08c
parentdf4c08f852ba3342e69caa721067804a7152e166 (diff)
Update docs for gradient.repeat (#6385)
-rw-r--r--crates/typst-library/src/visualize/gradient.rs14
1 files changed, 12 insertions, 2 deletions
diff --git a/crates/typst-library/src/visualize/gradient.rs b/crates/typst-library/src/visualize/gradient.rs
index 45f388cc..5d7859a3 100644
--- a/crates/typst-library/src/visualize/gradient.rs
+++ b/crates/typst-library/src/visualize/gradient.rs
@@ -549,7 +549,7 @@ impl Gradient {
}
/// Repeats this gradient a given number of times, optionally mirroring it
- /// at each repetition.
+ /// at every second repetition.
///
/// ```example
/// #circle(
@@ -564,7 +564,17 @@ impl Gradient {
&self,
/// The number of times to repeat the gradient.
repetitions: Spanned<usize>,
- /// Whether to mirror the gradient at each repetition.
+ /// Whether to mirror the gradient at every second repetition, i.e.,
+ /// the first instance (and all odd ones) stays unchanged.
+ ///
+ /// ```example
+ /// #circle(
+ /// radius: 40pt,
+ /// fill: gradient
+ /// .conic(green, black)
+ /// .repeat(2, mirror: true)
+ /// )
+ /// ```
#[named]
#[default(false)]
mirror: bool,