Lines
public struct Lines : Hashable
Encapsulates the parameters of the vertical and horizontal major and minor lines.
-
Default set, where all the major and minor line parameters are set to their
.default
.Declaration
Swift
public static let `default`: Grid.Lines
-
The parameters of the vertical major lines of the grid.
Declaration
Swift
public var verticalMajor: MajorLineParameters
-
The parameters of the horizontal major lines of the grid.
Declaration
Swift
public var horizontalMajor: MajorLineParameters
-
The parameters of the vertical minor lines of the grid.
Declaration
Swift
public var verticalMinor: Grid.MinorLineParameters?
-
The parameters of the horizontal minor lines of the grid.
Declaration
Swift
public var horizontalMinor: Grid.MinorLineParameters?
-
If
true
, draws the horizontal major lines only after the vertical major lines are drawn. Otherwise draws the horizontal major lines and only then draws vertical major lines.Important
Major lines are always drawn after minor lines.Declaration
Swift
public var drawVerticalMajorLinesFirst: Bool
-
If
true
, draws the horizontal minor lines only after the vertical minor lines are drawn. Otherwise draws the horizontal minor lines and only then draws vertical minor lines.Important
Major lines are always drawn after minor lines.Declaration
Swift
public var drawVerticalMinorLinesFirst: Bool
-
init(verticalMajor:horizontalMajor:verticalMinor:horizontalMinor:drawVerticalMajorLinesFirst:drawVerticalMinorLinesFirst:)
Creates a new set of the line parameters for each type of the line.
Declaration
Swift
public init(verticalMajor: MajorLineParameters = .default, horizontalMajor: MajorLineParameters = .default, verticalMinor: MinorLineParameters? = .default, horizontalMinor: MinorLineParameters? = .default, drawVerticalMajorLinesFirst: Bool = false, drawVerticalMinorLinesFirst: Bool = false)
Parameters
verticalMajor
The parameters of the vertical major lines of the grid. Default line width is 0.5, line spacing is 10, line color is 80% gray.
horizontalMajor
The parameters of the horizontal major lines of the grid. Default line width is 0.5, line spacing is 10, line color is 80% gray.
verticalMinor
The parameters of the vertical minor lines of the grid. If specified
nil
, no vertical minor lines will be drawn. Default line width is 0.25, line color is 80% gray and the default number of minor segments per one major segment is 2.horizontalMinor
The parameters of the horizontal minor lines of the grid. If specified
nil
, no horizontal minor lines will be drawn. Default line width is 0.25, line color is 80% gray and the default number of minor segments per one major segment is 2.drawVerticalMajorLinesFirst
If
true
, draws the horizontal major lines only after the vertical major lines are drawn. Otherwise draws the horizontal major lines and only then draws vertical major lines. Default isfalse
.drawVerticalMinorLinesFirst
If
true
, draws the horizontal minor lines only after the vertical minor lines are drawn. Otherwise draws the horizontal minor lines and only then draws vertical minor lines. Default isfalse
.