Diagram
class Diagram: PDFElement
A PDF chord diagram element
Display a single chord diagram
-
The chord to display in a diagram
Declaration
Swift
let chord: ChordDefinition
-
The chord display options
Declaration
Swift
let options: ChordDefinition.DisplayOptions
-
Total amount of columns of the diagram
Declaration
Swift
let columns: Int
-
The width of the grid
Declaration
Swift
let width: CGFloat
-
The height of the grid
Declaration
Swift
let height: CGFloat
-
The horizontal spacing between each grid cell
Declaration
Swift
let xSpacing: CGFloat
-
The vertical spacing between each grid cell
Declaration
Swift
let ySpacing: CGFloat
-
The frets of the chord; adjusted for left-handed if needed
Declaration
Swift
let frets: [Int]
-
The fingers of the chord; adjusted for left-handed if needed
Declaration
Swift
let fingers: [Int]
-
The size of the grid
Declaration
Swift
let gridSize = CGSize(width: 50, height: 60)
-
Init the chord diagram element
Declaration
Swift
init(chord: ChordDefinition, options: ChordDefinition.DisplayOptions)
Parameters
chord
The chord to display in a diagram
options
The chord display options
-
Declaration
Swift
func draw(rect: inout CGRect, calculationOnly: Bool, pageRect: CGRect)
Parameters
rect
The available rectangle
calculationOnly
Bool if only the Bounding Rect should be calculated
pageRect
The page size of the PDF document