The creation of LED digits and letters are extremely simple. The following complete example demonstrates the creation of a LED display
include
"../jpgraph.php";
include "../jpgraph_led.php";
// By default each "LED" circle has a radius of 3 pixels
$led
= new DigitalLED74
();
$led->Stroke(
'0123456789. ABCDEFGHIJKL',
LEDC_GREEN);
The result of running this script can be seen by running the "Examples/ledex1.php" Example in the example directory. As can be seen from the above example the color to be used for the LED digits is specified as the second argument to the DigitalLED74::Stroke() method. Available color for LED digits is given by the table below
Symbolic name | Color |
LEDC_RED | Red |
LEDC_GREEN | Green |
LEDC_BLUE | Blue |
LEDC_YELLOW | Yellow |
GREY | Grey |
All digits, 0-9 |
Capital Letters, A-L |