SerifParameters

public struct SerifParameters : Hashable

Represents the properties of a grid’s serifs. Serifs are short lines that can be placed on the edges of a grid and serve to put labels near them.

  • Default parameters, where the frequency is 5, the width of the serifs is 0.5 and the color of the serifs is 50% gray.

    Declaration

    Swift

    public static let `default`: Grid.SerifParameters
  • The nubmber of major lines per one serif. Must be positive.

    Declaration

    Swift

    public var frequency: Int
  • The thickness of the serifs.

    Declaration

    Swift

    public var width: Float
  • The length of the serifs.

    Declaration

    Swift

    public var length: Float
  • The color of the serifs.

    Declaration

    Swift

    public var color: Color
  • Creates a new serif parameter set.

    Declaration

    Swift

    public init(frequency: Int = 5,
                width: Float = 0.5,
                length: Float = 5,
                color: Color = Color(gray: 0.5)!)

    Parameters

    frequency

    The nubmber of major lines per one serif. Must be positive. Default value is 5.

    width

    The width of the serifs. Default value is 0.5.

    length

    The length of the serifs. Default value is 5.

    color

    The color of the serifs. Default is 50% gray.