ukeGeeks.chordBrush Class
First places a Canvas element within a DOM element, then draws a chord diagram on it.
Methods
_drawFretboard
-
ctx
-
pos
-
fretBox
Parameters:
-
ctx
CanvasContextValid Canvas Context Handle
-
pos
XYPosObjectObject with two properties: x & y ints, position in pixels
-
fretBox
Settings
Returns:
_drawX
-
ctx
-
centerPos
-
fretBox
-
strokeColor
Plots an "X" centered at POSITION
Parameters:
-
ctx
CanvasContextValid Canvas Context handle
-
centerPos
XyPositionJsonJSON with two properties: x & y ints, position in pixels, format {x:
, y: } -
fretBox
JSONSee Settings.fretBox
-
strokeColor
StringValid CSS hex color (shorthand not recommended)
Returns:
_getFretRange
-
dots
Returns first & last frets, 0 if none found.
Parameters:
-
dots
arrayArray of ukeGeeks.data.dot objects
Returns:
_mutedStrings
-
ctx
-
fretBox
-
muted
-
strokeColor
TODO: Loop over the muted array, dropping X's whenever a string position is TRUE
Parameters:
-
ctx
CanvasContextValid Canvas Context handle
-
fretBox
JSONSee Settings.fretBox
-
muted
BoolIs this string "muted"?
-
strokeColor
StringValid CSS hex color (shorthand not recommended)
Returns:
init
()
Void
Again this is a constructor replacement
Returns:
plot
-
chordBox
-
chord
-
fretBox
-
fontSettings
-
colorSettings
Puts a new Canvas within ChordBox and draws the chord diagram on it.
Parameters:
-
chordBox
DOMElementHandle to the DOM element where the chord is to be drawn.
-
chord
ExpandedChordChord Diagram to be drawn.
-
fretBox
JSONAppropriate ukeGeeks.settings.fretBox -- either "fretBox" or "inlineFretBox"
-
fontSettings
JSON(optional) Defaults to settings.fonts
-
colorSettings
JSON(optional) Defaults to settings.colors
Returns:
Properties
_public
Object
attach public members to this object