summaryrefslogtreecommitdiff
path: root/crates/typst-library/src/visualize
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2025-01-21 12:10:06 +0100
committerGitHub <noreply@github.com>2025-01-21 11:10:06 +0000
commitb90ad470d60f4a90e3ba2e78aa4746fbe08783ab (patch)
tree3f69c0077258ce8c5c69ddfa53ab8362ca0a4e99 /crates/typst-library/src/visualize
parentc22c47b9c97062309ed841679bb49fc15bb6a398 (diff)
Remove redundant doc comments on standard arguments (#5725)
Diffstat (limited to 'crates/typst-library/src/visualize')
-rw-r--r--crates/typst-library/src/visualize/color.rs19
-rw-r--r--crates/typst-library/src/visualize/gradient.rs4
-rw-r--r--crates/typst-library/src/visualize/image/mod.rs1
-rw-r--r--crates/typst-library/src/visualize/polygon.rs2
-rw-r--r--crates/typst-library/src/visualize/stroke.rs2
-rw-r--r--crates/typst-library/src/visualize/tiling.rs1
6 files changed, 1 insertions, 28 deletions
diff --git a/crates/typst-library/src/visualize/color.rs b/crates/typst-library/src/visualize/color.rs
index 8ff8dbdb..b1431251 100644
--- a/crates/typst-library/src/visualize/color.rs
+++ b/crates/typst-library/src/visualize/color.rs
@@ -248,8 +248,6 @@ impl Color {
/// ```
#[func]
pub fn luma(
- /// The real arguments (the other arguments are just for the docs, this
- /// function is a bit involved, so we parse the arguments manually).
args: &mut Args,
/// The lightness component.
#[external]
@@ -300,8 +298,6 @@ impl Color {
/// ```
#[func]
pub fn oklab(
- /// The real arguments (the other arguments are just for the docs, this
- /// function is a bit involved, so we parse the arguments manually).
args: &mut Args,
/// The lightness component.
#[external]
@@ -358,8 +354,6 @@ impl Color {
/// ```
#[func]
pub fn oklch(
- /// The real arguments (the other arguments are just for the docs, this
- /// function is a bit involved, so we parse the arguments manually).
args: &mut Args,
/// The lightness component.
#[external]
@@ -420,8 +414,6 @@ impl Color {
/// ```
#[func(title = "Linear RGB")]
pub fn linear_rgb(
- /// The real arguments (the other arguments are just for the docs, this
- /// function is a bit involved, so we parse the arguments manually).
args: &mut Args,
/// The red component.
#[external]
@@ -477,8 +469,6 @@ impl Color {
/// ```
#[func(title = "RGB")]
pub fn rgb(
- /// The real arguments (the other arguments are just for the docs, this
- /// function is a bit involved, so we parse the arguments manually).
args: &mut Args,
/// The red component.
#[external]
@@ -555,8 +545,6 @@ impl Color {
/// ```
#[func(title = "CMYK")]
pub fn cmyk(
- /// The real arguments (the other arguments are just for the docs, this
- /// function is a bit involved, so we parse the arguments manually).
args: &mut Args,
/// The cyan component.
#[external]
@@ -614,8 +602,6 @@ impl Color {
/// ```
#[func(title = "HSL")]
pub fn hsl(
- /// The real arguments (the other arguments are just for the docs, this
- /// function is a bit involved, so we parse the arguments manually).
args: &mut Args,
/// The hue angle.
#[external]
@@ -673,8 +659,6 @@ impl Color {
/// ```
#[func(title = "HSV")]
pub fn hsv(
- /// The real arguments (the other arguments are just for the docs, this
- /// function is a bit involved, so we parse the arguments manually).
args: &mut Args,
/// The hue angle.
#[external]
@@ -898,7 +882,6 @@ impl Color {
#[func]
pub fn saturate(
self,
- /// The call span
span: Span,
/// The factor to saturate the color by.
factor: Ratio,
@@ -924,7 +907,6 @@ impl Color {
#[func]
pub fn desaturate(
self,
- /// The call span
span: Span,
/// The factor to desaturate the color by.
factor: Ratio,
@@ -1001,7 +983,6 @@ impl Color {
#[func]
pub fn rotate(
self,
- /// The call span
span: Span,
/// The angle to rotate the hue by.
angle: Angle,
diff --git a/crates/typst-library/src/visualize/gradient.rs b/crates/typst-library/src/visualize/gradient.rs
index e16e5d88..431f07dd 100644
--- a/crates/typst-library/src/visualize/gradient.rs
+++ b/crates/typst-library/src/visualize/gradient.rs
@@ -200,9 +200,7 @@ impl Gradient {
/// ```
#[func(title = "Linear Gradient")]
pub fn linear(
- /// The args of this function.
args: &mut Args,
- /// The call site of this function.
span: Span,
/// The color [stops](#stops) of the gradient.
#[variadic]
@@ -292,7 +290,6 @@ impl Gradient {
/// ```
#[func]
fn radial(
- /// The call site of this function.
span: Span,
/// The color [stops](#stops) of the gradient.
#[variadic]
@@ -407,7 +404,6 @@ impl Gradient {
/// ```
#[func]
pub fn conic(
- /// The call site of this function.
span: Span,
/// The color [stops](#stops) of the gradient.
#[variadic]
diff --git a/crates/typst-library/src/visualize/image/mod.rs b/crates/typst-library/src/visualize/image/mod.rs
index 0f060201..77f8426e 100644
--- a/crates/typst-library/src/visualize/image/mod.rs
+++ b/crates/typst-library/src/visualize/image/mod.rs
@@ -112,7 +112,6 @@ impl ImageElem {
/// ```
#[func(title = "Decode Image")]
pub fn decode(
- /// The call span of this function.
span: Span,
/// The data to decode as an image. Can be a string for SVGs.
data: Readable,
diff --git a/crates/typst-library/src/visualize/polygon.rs b/crates/typst-library/src/visualize/polygon.rs
index 465f2c1a..42b08343 100644
--- a/crates/typst-library/src/visualize/polygon.rs
+++ b/crates/typst-library/src/visualize/polygon.rs
@@ -67,8 +67,8 @@ impl PolygonElem {
/// ```
#[func(title = "Regular Polygon")]
pub fn regular(
- /// The call span of this function.
span: Span,
+
/// How to fill the polygon. See the general
/// [polygon's documentation]($polygon.fill) for more details.
#[named]
diff --git a/crates/typst-library/src/visualize/stroke.rs b/crates/typst-library/src/visualize/stroke.rs
index 97a1535d..a0830cf1 100644
--- a/crates/typst-library/src/visualize/stroke.rs
+++ b/crates/typst-library/src/visualize/stroke.rs
@@ -97,8 +97,6 @@ impl Stroke {
/// ```
#[func(constructor)]
pub fn construct(
- /// The real arguments (the other arguments are just for the docs, this
- /// function is a bit involved, so we parse the arguments manually).
args: &mut Args,
/// The color or gradient to use for the stroke.
diff --git a/crates/typst-library/src/visualize/tiling.rs b/crates/typst-library/src/visualize/tiling.rs
index d699d3b6..98a71f92 100644
--- a/crates/typst-library/src/visualize/tiling.rs
+++ b/crates/typst-library/src/visualize/tiling.rs
@@ -138,7 +138,6 @@ impl Tiling {
#[func(constructor)]
pub fn construct(
engine: &mut Engine,
- /// The callsite span.
span: Span,
/// The bounding box of each cell of the tiling.
#[named]