RenderingModeImageModifier

public struct RenderingModeImageModifier: ImageModifier

Modifier for setting the rendering mode of images. Only UI-based images are supported; if a non-UI image is passed in, the modifier will do nothing.

  • The rendering mode to apply to the image.

    Declaration

    Swift

    public let renderingMode: UIImageRenderingMode
  • Initialize a RenderingModeImageModifier

    Declaration

    Swift

    public init(renderingMode: UIImageRenderingMode = .automatic)

    Parameters

    renderingMode

    The rendering mode to apply to the image. Default is .automatic

  • Modify an input Image.

    Note

    See documentation of ImageModifier protocol for more.

    Declaration

    Swift

    public func modify(_ image: Image) -> Image

    Parameters

    image

    Image which will be modified by self

    Return Value

    The modified image.