ChordSvgExporter
in package
implements
ChordSvgExporterInterface
Transforms a chord into an SVG image.
Interfaces, Classes, Traits and Enums
- ChordSvgExporterInterface
- Transforms a chord into an SVG image.
Table of Contents
- $barreHeight : int
- Height of the barre bar.
- $barreRadius : int
- Border radius of the barre bar.
- $cellOverflow : array<string|int, int>
- Height of overflow indication after of before the requested number of frets.
- $cellSize : array<string|int, int>
- Size of a single cell in the grid.
- $markMargin : int
- Margin between the grid and string marks.
- $markSize : array<string|int, int>
- Size of a string mark.
- $noteRadius : int
- Radius of the circle depicting a note.
- $offsetIndicatorMargin : int
- Margin between the grid and fret offset number.
- $offsetIndicatorSize : array<string|int, int>
- Space reserved for the fret offset number.
- toSvg() : string
- Transforms the chord into an SVG image.
- toRoman() : string
- Converts the given number to roman numerals.
Properties
$barreHeight
Height of the barre bar.
private
int
$barreHeight
= 10
$barreRadius
Border radius of the barre bar.
private
int
$barreRadius
= 6
$cellOverflow
Height of overflow indication after of before the requested number of frets.
private
array<string|int, int>
$cellOverflow
= ['top' => 8, 'bottom' => 10]
$cellSize
Size of a single cell in the grid.
private
array<string|int, int>
$cellSize
= ['width' => 18, 'height' => 20]
$markMargin
Margin between the grid and string marks.
private
int
$markMargin
= 5
$markSize
Size of a string mark.
private
array<string|int, int>
$markSize
= ['width' => 12, 'height' => 12]
$noteRadius
Radius of the circle depicting a note.
private
int
$noteRadius
= 7
$offsetIndicatorMargin
Margin between the grid and fret offset number.
private
int
$offsetIndicatorMargin
= 10
$offsetIndicatorSize
Space reserved for the fret offset number.
private
array<string|int, int>
$offsetIndicatorSize
= ['width' => 20, 'height' => 18]
Methods
toSvg()
Transforms the chord into an SVG image.
public
toSvg(Chord $chord) : string
Parameters
- $chord : Chord
-
chord to transform
Tags
Return values
string —SVG source
toRoman()
Converts the given number to roman numerals.
private
static toRoman(int $integer) : string
Parameters
- $integer : int
-
number to convert
Return values
string —nubmer in roman numerals