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: AppSettings.DiagramDisplayOptions 
- 
                  
                  
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: AppSettings.DiagramDisplayOptions)Parameters
chordThe chord to display in a diagram
optionsThe chord display options
 - 
                  
                  
Declaration
Swift
func draw(rect: inout CGRect, calculationOnly: Bool, pageRect: CGRect)Parameters
rectThe available rectangle
calculationOnlyBool if only the Bounding Rect should be calculated
pageRectThe page size of the PDF document
 
View on GitHub