summaryrefslogtreecommitdiff
path: root/crates/typst-library/src/visualize/gradient.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/typst-library/src/visualize/gradient.rs')
-rw-r--r--crates/typst-library/src/visualize/gradient.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/crates/typst-library/src/visualize/gradient.rs b/crates/typst-library/src/visualize/gradient.rs
index d6530dd0..1a723a9f 100644
--- a/crates/typst-library/src/visualize/gradient.rs
+++ b/crates/typst-library/src/visualize/gradient.rs
@@ -70,6 +70,9 @@ use crate::visualize::{Color, ColorSpace, WeightedColor};
/// the offsets when defining a gradient. In this case, Typst will space all
/// stops evenly.
///
+/// Typst predefines color maps that you can use as stops. See the
+/// [`color`]($color/#predefined-color-maps) documentation for more details.
+///
/// # Relativeness
/// The location of the `{0%}` and `{100%}` stops depends on the dimensions
/// of a container. This container can either be the shape that it is being
@@ -157,10 +160,6 @@ use crate::visualize::{Color, ColorSpace, WeightedColor};
/// )
/// ```
///
-/// # Presets
-/// Typst predefines color maps that you can use with your gradients. See the
-/// [`color`]($color/#predefined-color-maps) documentation for more details.
-///
/// # Note on file sizes
///
/// Gradients can be quite large, especially if they have many stops. This is
@@ -288,7 +287,7 @@ impl Gradient {
/// )),
/// )
/// ```
- #[func]
+ #[func(title = "Radial Gradient")]
fn radial(
span: Span,
/// The color [stops](#stops) of the gradient.
@@ -402,7 +401,7 @@ impl Gradient {
/// )),
/// )
/// ```
- #[func]
+ #[func(title = "Conic Gradient")]
pub fn conic(
span: Span,
/// The color [stops](#stops) of the gradient.