mirror of
https://github.com/typst/typst
synced 2025-08-12 14:17:55 +08:00
Simplify links in docs (#6732)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
This commit is contained in:
parent
8f1e446546
commit
59812bfb69
@ -17,8 +17,7 @@ use crate::foundations::{
|
|||||||
/// Represents a date, a time, or a combination of both.
|
/// Represents a date, a time, or a combination of both.
|
||||||
///
|
///
|
||||||
/// Can be created by either specifying a custom datetime using this type's
|
/// Can be created by either specifying a custom datetime using this type's
|
||||||
/// constructor function or getting the current date with
|
/// constructor function or getting the current date with [`datetime.today`].
|
||||||
/// [`datetime.today`]($datetime.today).
|
|
||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
/// ```example
|
/// ```example
|
||||||
|
@ -41,8 +41,8 @@ use crate::foundations::{Repr, Str, cast, func, repr, scope, ty};
|
|||||||
/// constant decimal values instead (e.g. `{decimal("3.14")}`).
|
/// constant decimal values instead (e.g. `{decimal("3.14")}`).
|
||||||
///
|
///
|
||||||
/// The precision of a `float` to `decimal` cast can be slightly improved by
|
/// The precision of a `float` to `decimal` cast can be slightly improved by
|
||||||
/// rounding the result to 15 digits with [`calc.round`]($calc.round), but there
|
/// rounding the result to 15 digits with [`calc.round`], but there are still no
|
||||||
/// are still no precision guarantees for that kind of conversion.
|
/// precision guarantees for that kind of conversion.
|
||||||
///
|
///
|
||||||
/// # Operations
|
/// # Operations
|
||||||
/// Basic arithmetic operations are supported on two decimals and on pairs of
|
/// Basic arithmetic operations are supported on two decimals and on pairs of
|
||||||
|
@ -59,9 +59,9 @@ use crate::foundations::{
|
|||||||
///
|
///
|
||||||
/// # Function scopes
|
/// # Function scopes
|
||||||
/// Functions can hold related definitions in their own scope, similar to a
|
/// Functions can hold related definitions in their own scope, similar to a
|
||||||
/// [module]($scripting/#modules). Examples of this are
|
/// [module]($scripting/#modules). Examples of this are [`assert.eq`] or
|
||||||
/// [`assert.eq`]($assert.eq) or [`list.item`]($list.item). However, this
|
/// [`list.item`]. However, this feature is currently only available for
|
||||||
/// feature is currently only available for built-in functions.
|
/// built-in functions.
|
||||||
///
|
///
|
||||||
/// # Defining functions
|
/// # Defining functions
|
||||||
/// You can define your own function with a [let binding]($scripting/#bindings)
|
/// You can define your own function with a [let binding]($scripting/#bindings)
|
||||||
|
@ -154,8 +154,8 @@ pub fn panic(
|
|||||||
/// Fails with an error if the condition is not fulfilled. Does not
|
/// Fails with an error if the condition is not fulfilled. Does not
|
||||||
/// produce any output in the document.
|
/// produce any output in the document.
|
||||||
///
|
///
|
||||||
/// If you wish to test equality between two values, see
|
/// If you wish to test equality between two values, see [`assert.eq`] and
|
||||||
/// [`assert.eq`]($assert.eq) and [`assert.ne`]($assert.ne).
|
/// [`assert.ne`].
|
||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
/// ```typ
|
/// ```typ
|
||||||
|
@ -141,7 +141,7 @@ use crate::foundations::{Array, Context, LocatableSelector, Value, func};
|
|||||||
///
|
///
|
||||||
/// In case you need to query a document when exporting for a specific target,
|
/// In case you need to query a document when exporting for a specific target,
|
||||||
/// you can use the `--target` argument. Valid values are `paged`, and `html`
|
/// you can use the `--target` argument. Valid values are `paged`, and `html`
|
||||||
/// (if the [`html`]($html) feature is enabled).
|
/// (if the [`html`] feature is enabled).
|
||||||
#[func(contextual)]
|
#[func(contextual)]
|
||||||
pub fn query(
|
pub fn query(
|
||||||
engine: &mut Engine,
|
engine: &mut Engine,
|
||||||
|
@ -62,8 +62,8 @@ use crate::visualize::{Paint, Stroke};
|
|||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
/// The example below demonstrates the different track sizing options. It also
|
/// The example below demonstrates the different track sizing options. It also
|
||||||
/// shows how you can use [`grid.cell`]($grid.cell) to make an individual cell
|
/// shows how you can use [`grid.cell`] to make an individual cell span two grid
|
||||||
/// span two grid tracks.
|
/// tracks.
|
||||||
///
|
///
|
||||||
/// ```example
|
/// ```example
|
||||||
/// // We use `rect` to emphasize the
|
/// // We use `rect` to emphasize the
|
||||||
@ -111,15 +111,14 @@ use crate::visualize::{Paint, Stroke};
|
|||||||
/// stroke
|
/// stroke
|
||||||
///
|
///
|
||||||
/// If you need to override one of the above options for a single cell, you can
|
/// If you need to override one of the above options for a single cell, you can
|
||||||
/// use the [`grid.cell`]($grid.cell) element. Likewise, you can override
|
/// use the [`grid.cell`] element. Likewise, you can override individual grid
|
||||||
/// individual grid lines with the [`grid.hline`]($grid.hline) and
|
/// lines with the [`grid.hline`] and [`grid.vline`] elements.
|
||||||
/// [`grid.vline`]($grid.vline) elements.
|
|
||||||
///
|
///
|
||||||
/// Alternatively, if you need the appearance options to depend on a cell's
|
/// Alternatively, if you need the appearance options to depend on a cell's
|
||||||
/// position (column and row), you may specify a function to `fill` or `align`
|
/// position (column and row), you may specify a function to `fill` or `align`
|
||||||
/// of the form `(column, row) => value`. You may also use a show rule on
|
/// of the form `(column, row) => value`. You may also use a show rule on
|
||||||
/// [`grid.cell`]($grid.cell) - see that element's examples or the examples
|
/// [`grid.cell`] - see that element's examples or the examples below for more
|
||||||
/// below for more information.
|
/// information.
|
||||||
///
|
///
|
||||||
/// Locating most of your styling in set and show rules is recommended, as it
|
/// Locating most of your styling in set and show rules is recommended, as it
|
||||||
/// keeps the grid's or table's actual usages clean and easy to read. It also
|
/// keeps the grid's or table's actual usages clean and easy to read. It also
|
||||||
@ -202,8 +201,8 @@ pub struct GridElem {
|
|||||||
/// The function receives the cells' column and row indices, starting from
|
/// The function receives the cells' column and row indices, starting from
|
||||||
/// zero. If set to `{auto}`, the outer alignment is used.
|
/// zero. If set to `{auto}`, the outer alignment is used.
|
||||||
///
|
///
|
||||||
/// You can find an example for this argument at the
|
/// You can find an example for this argument at the [`table.align`]
|
||||||
/// [`table.align`]($table.align) parameter.
|
/// parameter.
|
||||||
pub align: Celled<Smart<Alignment>>,
|
pub align: Celled<Smart<Alignment>>,
|
||||||
|
|
||||||
/// How to [stroke]($stroke) the cells.
|
/// How to [stroke]($stroke) the cells.
|
||||||
@ -214,8 +213,7 @@ pub struct GridElem {
|
|||||||
/// If it is necessary to place lines which can cross spacing between cells
|
/// If it is necessary to place lines which can cross spacing between cells
|
||||||
/// produced by the `gutter` option, or to override the stroke between
|
/// produced by the `gutter` option, or to override the stroke between
|
||||||
/// multiple specific cells, consider specifying one or more of
|
/// multiple specific cells, consider specifying one or more of
|
||||||
/// [`grid.hline`]($grid.hline) and [`grid.vline`]($grid.vline) alongside
|
/// [`grid.hline`] and [`grid.vline`] alongside your grid cells.
|
||||||
/// your grid cells.
|
|
||||||
///
|
///
|
||||||
/// ```example
|
/// ```example
|
||||||
/// #set page(height: 13em, width: 26em)
|
/// #set page(height: 13em, width: 26em)
|
||||||
@ -288,14 +286,13 @@ pub struct GridElem {
|
|||||||
|
|
||||||
/// How much to pad the cells' content.
|
/// How much to pad the cells' content.
|
||||||
///
|
///
|
||||||
/// You can find an example for this argument at the
|
/// You can find an example for this argument at the [`table.inset`]
|
||||||
/// [`table.inset`]($table.inset) parameter.
|
/// parameter.
|
||||||
#[fold]
|
#[fold]
|
||||||
pub inset: Celled<Sides<Option<Rel<Length>>>>,
|
pub inset: Celled<Sides<Option<Rel<Length>>>>,
|
||||||
|
|
||||||
/// The contents of the grid cells, plus any extra grid lines specified
|
/// The contents of the grid cells, plus any extra grid lines specified with
|
||||||
/// with the [`grid.hline`]($grid.hline) and [`grid.vline`]($grid.vline)
|
/// the [`grid.hline`] and [`grid.vline`] elements.
|
||||||
/// elements.
|
|
||||||
///
|
///
|
||||||
/// The cells are populated in row-major order.
|
/// The cells are populated in row-major order.
|
||||||
#[variadic]
|
#[variadic]
|
||||||
@ -445,8 +442,8 @@ impl TryFrom<Content> for GridItem {
|
|||||||
/// A repeatable grid header.
|
/// A repeatable grid header.
|
||||||
///
|
///
|
||||||
/// If `repeat` is set to `true`, the header will be repeated across pages. For
|
/// If `repeat` is set to `true`, the header will be repeated across pages. For
|
||||||
/// an example, refer to the [`table.header`]($table.header) element and the
|
/// an example, refer to the [`table.header`] element and the [`grid.stroke`]
|
||||||
/// [`grid.stroke`]($grid.stroke) parameter.
|
/// parameter.
|
||||||
#[elem(name = "header", title = "Grid Header")]
|
#[elem(name = "header", title = "Grid Header")]
|
||||||
pub struct GridHeader {
|
pub struct GridHeader {
|
||||||
/// Whether this header should be repeated across pages.
|
/// Whether this header should be repeated across pages.
|
||||||
@ -471,8 +468,8 @@ pub struct GridHeader {
|
|||||||
|
|
||||||
/// A repeatable grid footer.
|
/// A repeatable grid footer.
|
||||||
///
|
///
|
||||||
/// Just like the [`grid.header`]($grid.header) element, the footer can repeat
|
/// Just like the [`grid.header`] element, the footer can repeat itself on every
|
||||||
/// itself on every page of the table.
|
/// page of the table.
|
||||||
///
|
///
|
||||||
/// No other grid cells may be placed after the footer.
|
/// No other grid cells may be placed after the footer.
|
||||||
#[elem(name = "footer", title = "Grid Footer")]
|
#[elem(name = "footer", title = "Grid Footer")]
|
||||||
@ -492,8 +489,7 @@ pub struct GridFooter {
|
|||||||
/// `stroke` field. Can cross spacing between cells created through the grid's
|
/// `stroke` field. Can cross spacing between cells created through the grid's
|
||||||
/// `column-gutter` option.
|
/// `column-gutter` option.
|
||||||
///
|
///
|
||||||
/// An example for this function can be found at the
|
/// An example for this function can be found at the [`table.hline`] element.
|
||||||
/// [`table.hline`]($table.hline) element.
|
|
||||||
#[elem(name = "hline", title = "Grid Horizontal Line")]
|
#[elem(name = "hline", title = "Grid Horizontal Line")]
|
||||||
pub struct GridHLine {
|
pub struct GridHLine {
|
||||||
/// The row above which the horizontal line is placed (zero-indexed).
|
/// The row above which the horizontal line is placed (zero-indexed).
|
||||||
@ -638,8 +634,8 @@ pub struct GridVLine {
|
|||||||
///
|
///
|
||||||
/// You may also apply a show rule on `grid.cell` to style all cells at once,
|
/// You may also apply a show rule on `grid.cell` to style all cells at once,
|
||||||
/// which allows you, for example, to apply styles based on a cell's position.
|
/// which allows you, for example, to apply styles based on a cell's position.
|
||||||
/// Refer to the examples of the [`table.cell`]($table.cell) element to learn
|
/// Refer to the examples of the [`table.cell`] element to learn more about
|
||||||
/// more about this.
|
/// this.
|
||||||
#[elem(name = "cell", title = "Grid Cell")]
|
#[elem(name = "cell", title = "Grid Cell")]
|
||||||
pub struct GridCell {
|
pub struct GridCell {
|
||||||
/// The cell's body.
|
/// The cell's body.
|
||||||
|
@ -405,7 +405,7 @@ impl LocalName for PageElem {
|
|||||||
///
|
///
|
||||||
/// Pagination tries to avoid single lines of text at the top or bottom of a
|
/// Pagination tries to avoid single lines of text at the top or bottom of a
|
||||||
/// page (these are called _widows_ and _orphans_). You can adjust the
|
/// page (these are called _widows_ and _orphans_). You can adjust the
|
||||||
/// [`text.costs`]($text.costs) parameter to disable this behavior.
|
/// [`text.costs`] parameter to disable this behavior.
|
||||||
#[elem(title = "Page Break")]
|
#[elem(title = "Page Break")]
|
||||||
pub struct PagebreakElem {
|
pub struct PagebreakElem {
|
||||||
/// If `{true}`, the page break is skipped if the current page is already
|
/// If `{true}`, the page break is skipped if the current page is already
|
||||||
|
@ -19,8 +19,7 @@ use crate::layout::{Alignment, Em, Length, Rel};
|
|||||||
/// [`alignment`]($place.alignment), the offsets `dx` and `dy` will set the
|
/// [`alignment`]($place.alignment), the offsets `dx` and `dy` will set the
|
||||||
/// position of the element's top left corner relatively to the top left corner
|
/// position of the element's top left corner relatively to the top left corner
|
||||||
/// of the text area. For absolute positioning on the full page including
|
/// of the text area. For absolute positioning on the full page including
|
||||||
/// margins, you can use `place` in [`page.foreground`]($page.foreground) or
|
/// margins, you can use `place` in [`page.foreground`] or [`page.background`].
|
||||||
/// [`page.background`]($page.background).
|
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
/// ```example
|
/// ```example
|
||||||
|
@ -41,8 +41,8 @@ use crate::model::{ListItemLike, ListLike, Numbering, NumberingPattern};
|
|||||||
/// + Don't forget step two
|
/// + Don't forget step two
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// You can also use [`enum.item`]($enum.item) to programmatically customize the
|
/// You can also use [`enum.item`] to programmatically customize the number of
|
||||||
/// number of each item in the enumeration:
|
/// each item in the enumeration:
|
||||||
///
|
///
|
||||||
/// ```example
|
/// ```example
|
||||||
/// #enum(
|
/// #enum(
|
||||||
|
@ -23,10 +23,10 @@ use crate::visualize::{LineElem, Stroke};
|
|||||||
/// and can break across multiple pages.
|
/// and can break across multiple pages.
|
||||||
///
|
///
|
||||||
/// To customize the appearance of the entry in the footnote listing, see
|
/// To customize the appearance of the entry in the footnote listing, see
|
||||||
/// [`footnote.entry`]($footnote.entry). The footnote itself is realized as a
|
/// [`footnote.entry`]. The footnote itself is realized as a normal superscript,
|
||||||
/// normal superscript, so you can use a set rule on the [`super`] function to
|
/// so you can use a set rule on the [`super`] function to customize it. You can
|
||||||
/// customize it. You can also apply a show rule to customize only the footnote
|
/// also apply a show rule to customize only the footnote marker (superscript
|
||||||
/// marker (superscript number) in the running text.
|
/// number) in the running text.
|
||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
/// ```example
|
/// ```example
|
||||||
|
@ -382,7 +382,7 @@ impl OutlineEntry {
|
|||||||
/// If the outline's indent is a fixed value or a function, the prefixes are
|
/// If the outline's indent is a fixed value or a function, the prefixes are
|
||||||
/// indented, but the inner contents are simply offset from the prefix by
|
/// indented, but the inner contents are simply offset from the prefix by
|
||||||
/// the specified `gap`, rather than aligning outline-wide. For a visual
|
/// the specified `gap`, rather than aligning outline-wide. For a visual
|
||||||
/// explanation, see [`outline.indent`]($outline.indent).
|
/// explanation, see [`outline.indent`].
|
||||||
#[func(contextual)]
|
#[func(contextual)]
|
||||||
pub fn indented(
|
pub fn indented(
|
||||||
&self,
|
&self,
|
||||||
|
@ -83,7 +83,7 @@ use crate::text::TextElem;
|
|||||||
/// When you only ever need to reference pages of a figure/table/heading/etc. in
|
/// When you only ever need to reference pages of a figure/table/heading/etc. in
|
||||||
/// a document, the default `form` field value can be changed to `{"page"}` with
|
/// a document, the default `form` field value can be changed to `{"page"}` with
|
||||||
/// a set rule. If you prefer a short "p." supplement over "page", the
|
/// a set rule. If you prefer a short "p." supplement over "page", the
|
||||||
/// [`page.supplement`]($page.supplement) field can be used for changing this:
|
/// [`page.supplement`] field can be used for changing this:
|
||||||
///
|
///
|
||||||
/// ```example
|
/// ```example
|
||||||
/// #set page(
|
/// #set page(
|
||||||
|
@ -36,8 +36,8 @@ use crate::visualize::{Paint, Stroke};
|
|||||||
/// in the document flow.
|
/// in the document flow.
|
||||||
///
|
///
|
||||||
/// Note that, to override a particular cell's properties or apply show rules on
|
/// Note that, to override a particular cell's properties or apply show rules on
|
||||||
/// table cells, you can use the [`table.cell`]($table.cell) element. See its
|
/// table cells, you can use the [`table.cell`] element. See its documentation
|
||||||
/// documentation for more information.
|
/// for more information.
|
||||||
///
|
///
|
||||||
/// Although the `table` and the `grid` share most properties, set and show
|
/// Although the `table` and the `grid` share most properties, set and show
|
||||||
/// rules on one of them do not affect the other.
|
/// rules on one of them do not affect the other.
|
||||||
@ -69,8 +69,8 @@ use crate::visualize::{Paint, Stroke};
|
|||||||
/// )
|
/// )
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// Much like with grids, you can use [`table.cell`]($table.cell) to customize
|
/// Much like with grids, you can use [`table.cell`] to customize the appearance
|
||||||
/// the appearance and the position of each cell.
|
/// and the position of each cell.
|
||||||
///
|
///
|
||||||
/// ```example
|
/// ```example
|
||||||
/// >>> #set page(width: auto)
|
/// >>> #set page(width: auto)
|
||||||
@ -190,8 +190,7 @@ pub struct TableElem {
|
|||||||
/// If it is necessary to place lines which can cross spacing between cells
|
/// If it is necessary to place lines which can cross spacing between cells
|
||||||
/// produced by the `gutter` option, or to override the stroke between
|
/// produced by the `gutter` option, or to override the stroke between
|
||||||
/// multiple specific cells, consider specifying one or more of
|
/// multiple specific cells, consider specifying one or more of
|
||||||
/// [`table.hline`]($table.hline) and [`table.vline`]($table.vline)
|
/// [`table.hline`] and [`table.vline`] alongside your table cells.
|
||||||
/// alongside your table cells.
|
|
||||||
///
|
///
|
||||||
/// See the [grid documentation]($grid.stroke) for more information on
|
/// See the [grid documentation]($grid.stroke) for more information on
|
||||||
/// strokes.
|
/// strokes.
|
||||||
@ -223,8 +222,7 @@ pub struct TableElem {
|
|||||||
pub inset: Celled<Sides<Option<Rel<Length>>>>,
|
pub inset: Celled<Sides<Option<Rel<Length>>>>,
|
||||||
|
|
||||||
/// The contents of the table cells, plus any extra table lines specified
|
/// The contents of the table cells, plus any extra table lines specified
|
||||||
/// with the [`table.hline`]($table.hline) and
|
/// with the [`table.hline`] and [`table.vline`] elements.
|
||||||
/// [`table.vline`]($table.vline) elements.
|
|
||||||
#[variadic]
|
#[variadic]
|
||||||
pub children: Vec<TableChild>,
|
pub children: Vec<TableChild>,
|
||||||
}
|
}
|
||||||
@ -433,10 +431,10 @@ pub struct TableHeader {
|
|||||||
|
|
||||||
/// A repeatable table footer.
|
/// A repeatable table footer.
|
||||||
///
|
///
|
||||||
/// Just like the [`table.header`]($table.header) element, the footer can repeat
|
/// Just like the [`table.header`] element, the footer can repeat itself on
|
||||||
/// itself on every page of the table. This is useful for improving legibility
|
/// every page of the table. This is useful for improving legibility by adding
|
||||||
/// by adding the column labels in both the header and footer of a large table,
|
/// the column labels in both the header and footer of a large table, totals, or
|
||||||
/// totals, or other information that should be visible on every page.
|
/// other information that should be visible on every page.
|
||||||
///
|
///
|
||||||
/// No other table cells may be placed after the footer.
|
/// No other table cells may be placed after the footer.
|
||||||
#[elem(name = "footer", title = "Table Footer")]
|
#[elem(name = "footer", title = "Table Footer")]
|
||||||
@ -514,22 +512,22 @@ pub struct TableHLine {
|
|||||||
pub position: OuterVAlignment,
|
pub position: OuterVAlignment,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A vertical line in the table. See the docs for [`grid.vline`]($grid.vline)
|
/// A vertical line in the table. See the docs for [`grid.vline`] for more
|
||||||
/// for more information regarding how to use this element's fields.
|
/// information regarding how to use this element's fields.
|
||||||
///
|
///
|
||||||
/// Overrides any per-cell stroke, including stroke specified through the
|
/// Overrides any per-cell stroke, including stroke specified through the
|
||||||
/// table's `stroke` field. Can cross spacing between cells created through the
|
/// table's `stroke` field. Can cross spacing between cells created through the
|
||||||
/// table's [`row-gutter`]($table.row-gutter) option.
|
/// table's [`row-gutter`]($table.row-gutter) option.
|
||||||
///
|
///
|
||||||
/// Similar to [`table.hline`]($table.hline), use this function if you want to
|
/// Similar to [`table.hline`], use this function if you want to manually place
|
||||||
/// manually place a vertical line at a specific position in a single table and
|
/// a vertical line at a specific position in a single table and use the
|
||||||
/// use the [table's `stroke`]($table.stroke) field or [`table.cell`'s
|
/// [table's `stroke`]($table.stroke) field or [`table.cell`'s
|
||||||
/// `stroke`]($table.cell.stroke) field instead if the line you want to place is
|
/// `stroke`]($table.cell.stroke) field instead if the line you want to place is
|
||||||
/// part of all your tables' designs.
|
/// part of all your tables' designs.
|
||||||
#[elem(name = "vline", title = "Table Vertical Line")]
|
#[elem(name = "vline", title = "Table Vertical Line")]
|
||||||
pub struct TableVLine {
|
pub struct TableVLine {
|
||||||
/// The column before which the vertical line is placed (zero-indexed).
|
/// The column before which the vertical line is placed (zero-indexed).
|
||||||
/// Functions identically to the `x` field in [`grid.vline`]($grid.vline).
|
/// Functions identically to the `x` field in [`grid.vline`].
|
||||||
pub x: Smart<usize>,
|
pub x: Smart<usize>,
|
||||||
|
|
||||||
/// The row at which the vertical line starts (zero-indexed, inclusive).
|
/// The row at which the vertical line starts (zero-indexed, inclusive).
|
||||||
@ -653,11 +651,11 @@ pub struct TableCell {
|
|||||||
pub body: Content,
|
pub body: Content,
|
||||||
|
|
||||||
/// The cell's column (zero-indexed).
|
/// The cell's column (zero-indexed).
|
||||||
/// Functions identically to the `x` field in [`grid.cell`]($grid.cell).
|
/// Functions identically to the `x` field in [`grid.cell`].
|
||||||
pub x: Smart<usize>,
|
pub x: Smart<usize>,
|
||||||
|
|
||||||
/// The cell's row (zero-indexed).
|
/// The cell's row (zero-indexed).
|
||||||
/// Functions identically to the `y` field in [`grid.cell`]($grid.cell).
|
/// Functions identically to the `y` field in [`grid.cell`].
|
||||||
pub y: Smart<usize>,
|
pub y: Smart<usize>,
|
||||||
|
|
||||||
/// The amount of columns spanned by this cell.
|
/// The amount of columns spanned by this cell.
|
||||||
|
@ -168,12 +168,11 @@ use crate::visualize::{Color, ColorSpace, WeightedColor};
|
|||||||
/// consider the following:
|
/// consider the following:
|
||||||
/// - SVG gradients are currently inefficiently encoded. This will be improved
|
/// - SVG gradients are currently inefficiently encoded. This will be improved
|
||||||
/// in the future.
|
/// in the future.
|
||||||
/// - PDF gradients in the [`color.oklab`]($color.oklab), [`color.hsv`]($color.hsv),
|
/// - PDF gradients in the [`color.oklab`], [`color.hsv`], [`color.hsl`], and
|
||||||
/// [`color.hsl`]($color.hsl), and [`color.oklch`]($color.oklch) color spaces
|
/// [`color.oklch`] color spaces are stored as a list of [`color.rgb`] colors
|
||||||
/// are stored as a list of [`color.rgb`]($color.rgb) colors with extra stops
|
/// with extra stops in between. This avoids needing to encode these color
|
||||||
/// in between. This avoids needing to encode these color spaces in your PDF
|
/// spaces in your PDF file, but it does add extra stops to your gradient,
|
||||||
/// file, but it does add extra stops to your gradient, which can increase
|
/// which can increase the file size.
|
||||||
/// the file size.
|
|
||||||
#[ty(scope, cast)]
|
#[ty(scope, cast)]
|
||||||
#[derive(Clone, PartialEq, Eq, Hash)]
|
#[derive(Clone, PartialEq, Eq, Hash)]
|
||||||
pub enum Gradient {
|
pub enum Gradient {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user