Skip to content

Commit

Permalink
mass-migrate entrapta vectorlinks to unidoc vectorlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
tayloraswift committed Feb 20, 2024
1 parent 14fabf8 commit 5a15847
Show file tree
Hide file tree
Showing 15 changed files with 98 additions and 96 deletions.
60 changes: 30 additions & 30 deletions Sources/PNG/ColorTargets/PNG.Data.Rectangular (ext).swift
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@ extension PNG.Data.Rectangular
/// Unpacks this image to a pixel array, using a custom deindexing
/// function.
/// - _ : Color.Type
/// A color target type. This type provides the ``(Color).unpack(_:of:deindexer:)``
/// A color target type. This type provides the ``Color/unpack(_:of:deindexer:)``
/// implementation used to unpack the image data.
/// - deindexer : ([(r:Swift.UInt8, g:Swift.UInt8, b:Swift.UInt8, a:Swift.UInt8)]) -> (Swift.Int) -> Color.Aggregate
/// A function which uses the palette entries in the color ``(Layout).format`` to
/// A function which uses the palette entries in the color ``Layout/format`` to
/// generate a dereferencing function. This function is only expected to
/// be invoked if [`layout``(Layout).format`] is an indexed format.
///
Expand All @@ -201,29 +201,29 @@ extension PNG.Data.Rectangular
/// Unpacks this image to a scalar pixel array, using a custom deindexing
/// function.
///
/// For an image with a grayscale-alpha color ``(Layout).format``,
/// For an image with a grayscale-alpha color ``Layout/format``,
/// this function selects the *v* component from pixels of the form (*v*, *a*)
///
/// For an image with an RGB color ``(Layout).format``,
/// For an image with an RGB color ``Layout/format``,
/// this function selects the *r* component from pixels of the form (*r*, *g*, *b*).
///
/// For an image with an RGBA color ``(Layout).format``, this function selects the *r* component from
/// For an image with an RGBA color ``Layout/format``, this function selects the *r* component from
/// pixels of the form (*r*, *g*, *b*, *a*).
///
/// For an image with a BGR color ``(Layout).format``,
/// For an image with a BGR color ``Layout/format``,
/// this function selects the *r* component from pixels of the form (*b*, *g*, *r*).
///
/// For an image with a BGRA color ``(Layout).format``,
/// For an image with a BGRA color ``Layout/format``,
/// this function selects the *r* component from pixels of the form (*b*, *g*, *r*, *a*).
///
/// This function ignores chroma keys, as its scalar color target is not
/// capable of representing transparency. The unpacked components
/// are scaled to fill the range of `T`, according to the color depth
/// computed from the color ``(Layout).format``.
/// computed from the color ``Layout/format``.
/// - _ : T.Type
/// A scalar color target type.
/// - deindexer : ([(r:Swift.UInt8, g:Swift.UInt8, b:Swift.UInt8, a:Swift.UInt8)]) -> (Swift.Int) -> Swift.UInt8
/// A function which uses the palette entries in the color ``(Layout).format`` to
/// A function which uses the palette entries in the color ``Layout/format`` to
/// generate a dereferencing function. This function will only
/// be invoked if [`layout``(Layout).format`] is an indexed format.
///
Expand Down Expand Up @@ -251,7 +251,7 @@ extension PNG.Data.Rectangular
/// - pixels : [Color]
/// A pixel array. Its elements are arranged in row-major order. The
/// first pixel in this array corresponds to the top-left corner of
/// the image. The `Color` type provides the ``(Color).pack(_:as:indexer:)``
/// the image. The `Color` type provides the ``Color/pack(_:as:indexer:)``
/// implementation used to pack the image data.
///
/// The length of this array must match `size.x * size.y`. Passing an
Expand All @@ -264,9 +264,9 @@ extension PNG.Data.Rectangular
/// - metadata : Metadata
/// A metadata structure. The default value is an empty metadata structure.
/// - indexer : ([(r:Swift.UInt8, g:Swift.UInt8, b:Swift.UInt8, a:Swift.UInt8)]) -> (Color.Aggregate) -> Swift.Int
/// A function which uses the palette entries in the color ``(Layout).format`` to
/// A function which uses the palette entries in the color ``Layout/format`` to
/// generate a referencing function. This function is only expected to
/// be invoked if the image color ``(Layout).format`` is an indexed format.
/// be invoked if the image color ``Layout/format`` is an indexed format.
///
/// See the [indexed color tutorial](https://github.com/tayloraswift/swift-png/tree/master/examples#using-indexed-images)
/// for more about the semantics of this function.
Expand All @@ -292,15 +292,15 @@ extension PNG.Data.Rectangular
/// Creates an image from a scalar pixel array, using a custom indexing
/// function.
///
/// For an image with a grayscale-alpha color ``(Layout).format``,
/// For an image with a grayscale-alpha color ``Layout/format``,
/// this function assigns the gray channel to the given scalars, and
/// sets the alpha channel to `T.max`.
///
/// For an image with an RGB or BGR color ``(Layout).format``,
/// For an image with an RGB or BGR color ``Layout/format``,
/// this function assigns all channels to the given scalars, replicating
/// each scalar three times.
///
/// For an image with an RGBA or BGRA color ``(Layout).format``, this
/// For an image with an RGBA or BGRA color ``Layout/format``, this
/// function assigns all opaque channels to the given scalars, replicating
/// each scalar three times, and sets the alpha channel to `T.max`.
///
Expand All @@ -320,9 +320,9 @@ extension PNG.Data.Rectangular
/// - metadata : Metadata
/// A metadata structure. The default value is an empty metadata structure.
/// - indexer : ([(r:Swift.UInt8, g:Swift.UInt8, b:Swift.UInt8, a:Swift.UInt8)]) -> (Swift.UInt8) -> Swift.Int
/// A function which uses the palette entries in the color ``(Layout).format`` to
/// A function which uses the palette entries in the color ``Layout/format`` to
/// generate a referencing function. This function will only
/// be invoked if the image color ``(Layout).format`` is an indexed format.
/// be invoked if the image color ``Layout/format`` is an indexed format.
///
/// See the [indexed color tutorial](https://github.com/tayloraswift/swift-png/tree/master/examples#using-indexed-images)
/// for more about the semantics of this function.
Expand Down Expand Up @@ -350,7 +350,7 @@ extension PNG.Data.Rectangular
/// @ inlinable
/// Unpacks this image to a pixel array.
/// - _ : Color.Type
/// A color target type. This type provides the ``(Color).unpack(_:of:)``
/// A color target type. This type provides the ``Color/unpack(_:of:)``
/// implementation used to unpack the image data.
/// - -> : [Color]
/// A pixel array. Its elements are arranged in row-major order. The
Expand All @@ -371,7 +371,7 @@ extension PNG.Data.Rectangular
/// - pixels : [Color]
/// A pixel array. Its elements are arranged in row-major order. The
/// first pixel in this array corresponds to the top-left corner of
/// the image. The `Color` type provides the ``(Color).pack(_:as:)``
/// the image. The `Color` type provides the ``Color/pack(_:as:)``
/// implementation used to pack the image data.
///
/// The length of this array must match `size.x * size.y`. Passing an
Expand Down Expand Up @@ -403,30 +403,30 @@ extension PNG.Data.Rectangular
/// @ inlinable
/// Unpacks this image to a scalar pixel array.
///
/// For an image with a grayscale-alpha color ``(Layout).format``,
/// For an image with a grayscale-alpha color ``Layout/format``,
/// this function selects the *v* component from pixels of the form (*v*, *a*)
///
/// For an image with an RGB color ``(Layout).format``,
/// For an image with an RGB color ``Layout/format``,
/// this function selects the *r* component from pixels of the form (*r*, *g*, *b*).
///
/// For an image with an indexed color ``(Layout).format``,
/// For an image with an indexed color ``Layout/format``,
/// this function selects the *r* component from palette entries of the
/// form (*r*, *g*, *b*, *a*). The palette entry is chosen by taking the
/// *i*th element in the palette, from pixels of the form (*i*).
///
/// For an image with an RGBA color ``(Layout).format``, this function
/// For an image with an RGBA color ``Layout/format``, this function
/// selects the *r* component from pixels of the form (*r*, *g*, *b*, *a*).
///
/// For an image with a BGR color ``(Layout).format``,
/// For an image with a BGR color ``Layout/format``,
/// this function selects the *r* component from pixels of the form (*b*, *g*, *r*).
///
/// For an image with a BGRA color ``(Layout).format``,
/// For an image with a BGRA color ``Layout/format``,
/// this function selects the *r* component from pixels of the form (*b*, *g*, *r*, *a*).
///
/// This function ignores chroma keys, as its scalar color target is not
/// capable of representing transparency. The unpacked components
/// are scaled to fill the range of `T`, according to the color depth
/// computed from the color ``(Layout).format``.
/// computed from the color ``Layout/format``.
/// - _ : T.Type
/// A scalar color target type.
/// - -> : [T]
Expand All @@ -452,22 +452,22 @@ extension PNG.Data.Rectangular
/// @ inlinable
/// Creates an image from a scalar pixel array.
///
/// For an image with a grayscale-alpha color ``(Layout).format``,
/// For an image with a grayscale-alpha color ``Layout/format``,
/// this function assigns the gray channel to the given scalars, and
/// sets the alpha channel to `T.max`.
///
/// For an image with an indexed color ``(Layout).format``,
/// For an image with an indexed color ``Layout/format``,
/// this function expands the given scalars, each of the form (*v*), to
/// RGBA quadruplets (*v*, *v*, *v*, `T.max`), and assigns the index
/// channel to the index of a matching palette entry. If more than one
/// palette entry matches, the matching entry is chosen arbitrarily.
/// If no palette entries match, the first palette entry is chosen.
///
/// For an image with an RGB or BGR color ``(Layout).format``,
/// For an image with an RGB or BGR color ``Layout/format``,
/// this function assigns all channels to the given scalars, replicating
/// each scalar three times.
///
/// For an image with an RGBA or BGRA color ``(Layout).format``, this
/// For an image with an RGBA or BGRA color ``Layout/format``, this
/// function assigns all opaque channels to the given scalars, replicating
/// each scalar three times, and sets the alpha channel to `T.max`.
///
Expand Down
12 changes: 6 additions & 6 deletions Sources/PNG/ColorTargets/PNG.RGBA.swift
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ extension PNG.RGBA
/// Creates an RGBA color from a grayscale-alpha color.
///
/// This function is equivalent to calling ``init(_:_:)`` with
/// the ``(VA).v`` and ``(VA).a`` components of `va`.
/// the ``VA/v`` and ``VA/a`` components of `va`.
/// - va : VA<T>
/// A grayscale-alpha color.
@inlinable
Expand Down Expand Up @@ -284,13 +284,13 @@ extension PNG.RGBA:PNG.Color
/// computed from the color `format`.
/// - interleaved : [Swift.UInt8]
/// An image data buffer. It is expected to be obtained from the
/// ``(Data.Rectangular).storage`` property of a ``(Data).Rectangular``
/// ``Data.Rectangular/storage`` property of a ``Data/Rectangular``
/// image.
/// - format : Format
/// The color format associated with the given data buffer.
/// It is expected to be obtained from the the
/// [`(Data.Rectangular).layout``(Layout).format`] property of a
/// ``(Data).Rectangular`` image.
/// ``Data/Rectangular`` image.
/// - deindexer : ([(r:Swift.UInt8, g:Swift.UInt8, b:Swift.UInt8, a:Swift.UInt8)]) -> (Swift.Int) -> Aggregate
/// A function which uses the palette entries in the color `format` to
/// generate a dereferencing function. This function is only invoked
Expand Down Expand Up @@ -441,7 +441,7 @@ extension PNG.RGBA:PNG.Color
/// The color format to pack the given pixels as in the returned data buffer.
///
/// When the library uses an implementation of this function to construct
/// a ``(Data).Rectangular`` image, this color format will be stored in
/// a ``Data/Rectangular`` image, this color format will be stored in
/// its [`(Data.Rectangular).layout``(Layout).format`] property.
/// - indexer : ([(r:Swift.UInt8, g:Swift.UInt8, b:Swift.UInt8, a:Swift.UInt8)]) -> (Aggregate) -> Swift.Int
/// A function which uses the palette entries in the color `format` to
Expand All @@ -457,8 +457,8 @@ extension PNG.RGBA:PNG.Color
/// necessarily in the same order within each individual pixel.)
///
/// When the library uses an implementation of this function to construct
/// a ``(Data).Rectangular`` image, this data buffer will be stored in
/// its ``(Data.Rectangular).storage`` property.
/// a ``Data/Rectangular`` image, this data buffer will be stored in
/// its ``Data.Rectangular/storage`` property.
@_specialize(where T == UInt8)
@_specialize(where T == UInt16)
@_specialize(where T == UInt32)
Expand Down
10 changes: 5 additions & 5 deletions Sources/PNG/ColorTargets/PNG.VA.swift
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,13 @@ extension PNG.VA:PNG.Color
/// computed from the color `format`.
/// - interleaved : [Swift.UInt8]
/// An image data buffer. It is expected to be obtained from the
/// ``(Data.Rectangular).storage`` property of a ``(Data).Rectangular``
/// ``Data.Rectangular/storage`` property of a ``Data/Rectangular``
/// image.
/// - format : Format
/// The color format associated with the given data buffer.
/// It is expected to be obtained from the the
/// [`(Data.Rectangular).layout``(Layout).format`] property of a
/// ``(Data).Rectangular`` image.
/// ``Data/Rectangular`` image.
/// - deindexer : ([(r:Swift.UInt8, g:Swift.UInt8, b:Swift.UInt8, a:Swift.UInt8)]) -> (Swift.Int) -> Aggregate
/// A function which uses the palette entries in the color `format` to
/// generate a dereferencing function. This function is only invoked
Expand Down Expand Up @@ -353,7 +353,7 @@ extension PNG.VA:PNG.Color
/// The color format to pack the given pixels as in the returned data buffer.
///
/// When the library uses an implementation of this function to construct
/// a ``(Data).Rectangular`` image, this color format will be stored in
/// a ``Data/Rectangular`` image, this color format will be stored in
/// its [`(Data.Rectangular).layout``(Layout).format`] property.
/// - indexer : ([(r:Swift.UInt8, g:Swift.UInt8, b:Swift.UInt8, a:Swift.UInt8)]) -> (Aggregate) -> Swift.Int
/// A function which uses the palette entries in the color `format` to
Expand All @@ -368,8 +368,8 @@ extension PNG.VA:PNG.Color
/// in the same order as the pixels in the `pixels` array.
///
/// When the library uses an implementation of this function to construct
/// a ``(Data).Rectangular`` image, this data buffer will be stored in
/// its ``(Data.Rectangular).storage`` property.
/// a ``Data/Rectangular`` image, this data buffer will be stored in
/// its ``Data.Rectangular/storage`` property.
@_specialize(where T == UInt8)
@_specialize(where T == UInt16)
@_specialize(where T == UInt32)
Expand Down
10 changes: 5 additions & 5 deletions Sources/PNG/Decoding/PNG.Context.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ extension PNG.Context
/// It is expected that client applications will initialize a decoding
/// context upon encountering the first ``Chunk/IDAT`` chunk in the image.
/// - standard : Standard
/// The PNG standard of the image being decoded. This should be ``(Standard).ios``
/// if the image began with a ``Chunk/CgBI`` chunk, and ``(Standard).common``
/// The PNG standard of the image being decoded. This should be ``Standard/ios``
/// if the image began with a ``Chunk/CgBI`` chunk, and ``Standard/common``
/// otherwise.
/// - header : Header
/// The header of the image being decoded. This is expected to have been
Expand All @@ -50,7 +50,7 @@ extension PNG.Context
/// previously-encountered ancillary chunks, with the exception of
/// ``Chunk/bKGD`` and ``Chunk/tRNS``.
/// - uninitialized : Swift.Bool
/// Specifies if the ``image`` ``(Data.Rectangular).storage`` should
/// Specifies if the ``image`` ``Data.Rectangular/storage`` should
/// be initialized. If `false`, the storage buffer will be initialized
/// to all zeros. This can be safely set to `true` if there is no need
/// to access the image while it is in a partially-decoded state.
Expand Down Expand Up @@ -87,7 +87,7 @@ extension PNG.Context
/// - overdraw : Swift.Bool
/// If `true`, pixels that are not yet available will be filled-in
/// with values from nearby available pixels. This option only has an
/// effect for ``(Layout).interlaced`` images.
/// effect for ``Layout/interlaced`` images.
///
/// The default value is `false`.
/// ## ()
Expand All @@ -110,7 +110,7 @@ extension PNG.Context
/// mutating func PNG.Context.push(ancillary:)
/// throws
/// Parses an ancillary chunk appearing after the last ``Chunk/IDAT``
/// chunk, and adds it to the ``image`` ``(Data.Rectangular).metadata``.
/// chunk, and adds it to the ``image`` ``Data.Rectangular/metadata``.
///
/// This function validates the multiplicity of the given `chunk`, and
/// its chunk ordering with respect to the ``Chunk/IDAT`` chunks. The
Expand Down
6 changes: 3 additions & 3 deletions Sources/PNG/Layout/PNG.Data.Rectangular.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ extension PNG.Data
/// samples. The pixels are arranged in row-major order, where the
/// beginning of the storage array corresponds to the visual top-left
/// corner of the image, regardless of whether the ``layout`` is
/// ``(Layout).interlaced`` or not.
/// ``Layout/interlaced`` or not.
public private(set)
var storage:[UInt8]

Expand Down Expand Up @@ -129,8 +129,8 @@ extension PNG.Data.Rectangular
/// - layout : Layout
/// The new image layout.
///
/// Both the original color ``(Layout).format`` and the new
/// color ``(Layout).format`` must be of the same enumeration case, though the fields
/// Both the original color ``Layout/format`` and the new
/// color ``Layout/format`` must be of the same enumeration case, though the fields
/// may differ. The exceptions are the indexed color formats, which require
/// the lengths of their `palette` payloads to match exactly.
/// - -> : Self
Expand Down
2 changes: 1 addition & 1 deletion Sources/PNG/Lexing/_PNGBytestreamDestination.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import CRC
/// A destination bytestream.
///
/// To implement a custom data destination type, conform it to this protocol by
/// implementing ``(Destination).write(_:)``. It can
/// implementing ``Destination/write(_:)``. It can
/// then be used with the library’s core compression interfaces.
/// # [Stream interface](file-io-destination-interface)
/// # [See also](file-io-protocols, system-file-destination)
Expand Down
2 changes: 1 addition & 1 deletion Sources/PNG/Lexing/_PNGBytestreamSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import CRC
/// A source bytestream.
///
/// To implement a custom data source type, conform it to this protocol by
/// implementing ``(Source).read(count:)``. It can
/// implementing ``Source/read(count:)``. It can
/// then be used with the library’s core decompression interfaces.
/// # [Stream interface](file-io-source-interface)
/// # [See also](file-io-protocols, system-file-source)
Expand Down
Loading

0 comments on commit 5a15847

Please sign in to comment.