https://github.com/dbrgn/gd-progressbar
A progressbar class for PHP using GDLib
https://github.com/dbrgn/gd-progressbar
Last synced: 11 months ago
JSON representation
A progressbar class for PHP using GDLib
- Host: GitHub
- URL: https://github.com/dbrgn/gd-progressbar
- Owner: dbrgn
- Created: 2011-09-03T21:21:25.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2012-12-28T12:09:07.000Z (over 13 years ago)
- Last Synced: 2025-07-26T20:36:57.460Z (12 months ago)
- Language: PHP
- Homepage:
- Size: 97.7 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
gd-progressbar
==============
This is a simple PHP class that I created some time ago. It does nothing fancy, just creating a
simple GD based progress bar. Probably there are many other classes like this out there :)
Usage
-----
Constructor:
function __construct($curVal, $maxVal=100, $width=500, $height=20, $absVal=false, $suffix='')
Methods:
public function setValue($curVal, $maxVal=100)
public function setSize($width, $height)
public function setSuffix($suffix)
public function setAbsVal($absVal)
public function setBackgroundColor($r, $g, $b)
public function setBorderColor($r, $g, $b)
public function setProgressColor($r, $g, $b)
public function setFontColor($r, $g, $b)
public function draw()
For further information, see source documentation.
Examples
--------
```php
draw();
?>
```

```php
setValue(275, 900);
$p->draw();
?>
```

```php
setAbsVal(true);
$p->setSuffix('days');
$p->setProgressColor(100, 150, 200);
$p->setFontColor(220, 220, 255);
$p->setBackgroundColor(220, 220, 255);
$p->draw();
?>
```

License
-------
LGPLv3 http://www.gnu.org/licenses/lgpl.html