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:
-
ctxCanvasContextValid Canvas Context Handle
-
posXYPosObjectObject with two properties: x & y ints, position in pixels
-
fretBoxSettings
Returns:
_drawX
-
ctx -
centerPos -
fretBox -
strokeColor
Plots an "X" centered at POSITION
Parameters:
-
ctxCanvasContextValid Canvas Context handle
-
centerPosXyPositionJsonJSON with two properties: x & y ints, position in pixels, format {x:
, y: } -
fretBoxJSONSee Settings.fretBox
-
strokeColorStringValid CSS hex color (shorthand not recommended)
Returns:
_getFretRange
-
dots
Returns first & last frets, 0 if none found.
Parameters:
-
dotsarrayArray 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:
-
ctxCanvasContextValid Canvas Context handle
-
fretBoxJSONSee Settings.fretBox
-
mutedBoolIs this string "muted"?
-
strokeColorStringValid 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:
-
chordBoxDOMElementHandle to the DOM element where the chord is to be drawn.
-
chordExpandedChordChord Diagram to be drawn.
-
fretBoxJSONAppropriate ukeGeeks.settings.fretBox -- either "fretBox" or "inlineFretBox"
-
fontSettingsJSON(optional) Defaults to settings.fonts
-
colorSettingsJSON(optional) Defaults to settings.colors
Returns:
Properties
_public
Object
attach public members to this object
