mirror of
https://github.com/typst/typst
synced 2025-06-15 16:46:24 +08:00
Update docs for gradient.repeat (#6385)
This commit is contained in:
parent
df4c08f852
commit
2a3746c51d
@ -549,7 +549,7 @@ impl Gradient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Repeats this gradient a given number of times, optionally mirroring it
|
/// Repeats this gradient a given number of times, optionally mirroring it
|
||||||
/// at each repetition.
|
/// at every second repetition.
|
||||||
///
|
///
|
||||||
/// ```example
|
/// ```example
|
||||||
/// #circle(
|
/// #circle(
|
||||||
@ -564,7 +564,17 @@ impl Gradient {
|
|||||||
&self,
|
&self,
|
||||||
/// The number of times to repeat the gradient.
|
/// The number of times to repeat the gradient.
|
||||||
repetitions: Spanned<usize>,
|
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]
|
#[named]
|
||||||
#[default(false)]
|
#[default(false)]
|
||||||
mirror: bool,
|
mirror: bool,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user