A graphic driver is a well defined interface that let you actually generate a picture by using drawing primitives. Those primitives are used by "drawable" objects that implements the display($driver, $picture) method.
This does create the empty picture on which you'll draw various things. The picture has the size corresponding to the given "zone".
The last 7 methods are simple drawing methods. The coordinates are absolute (ie as expressed in the $rootzone). Take care to convert them if needed.
For the rectangles, you give the lower left corner and the upper right corner.
The (0,0) coordinate is the lower left corner.
This method changes the default width of displayed lines. It returns the previous width so that you can restore it to its previous value once you're finished with the operation needing a special line width.
If $width isn't given, it only returns the actual width.
This method is used to draw texts on the picture.
Horizontal/vertical align : $ALIGN_LEFT, $ALIGN_CENTER, $ALIGN_RIGHT
Orientation : $ORIENTATION_UP, $ORIENTATION_DOWN, $ORIENTATION_RIGHT, $ORIENTATION_LEFT
The text is displayed near (x,y) by follwing the required alignments.
Save the picture in the given filename.
Dump the picture to the standard output.
Those functions don't need to be reimplemented, they are implemented with the other primitives.
Draw a cross.
Colors are simple RGB triplet associated to an alpha channel : [ R, G, B, A ] They are only array references.
Some variables are available for the most common colors :
Font names are simple strings (true type font names). Font size are numbers.
Some variables are available for the most common values :
To install Finance::GeniusTrader, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Finance::GeniusTrader
CPAN shell
perl -MCPAN -e shell install Finance::GeniusTrader
For more information on module installation, please visit the detailed CPAN module installation guide.