Location: PHPKode > scripts > Mi Barra > mi-barra/clase_mibarra.php

		Version v1.0.1

		Object Oriented Progress Bar - v1.0.1
		Barra de progreso Orientada a Objetos - v1.0.1

		v1.0 - PSRN - 10/05/2004 - Initial Version
		v1.0.1 - PSRN - 14/05/2004 - 1 Minor Bug in "Save" method.
		                           - Some comments added.

		By Pablo Niklas <hide@address.com>

		License: GNU.-

		Thanx to phpclasses.org for having posted this little class, and its administrator
		for having added some useful detailed descriptions about this class.

class MiBarra {

		//Pxs between the text and the borders
		var $espacio=8;

		var $im;
		var $anchobarra;
		var $porciento;

		var $font="/usr/X11R6/lib/X11/fonts/Type1/agateb.pfb";

		var $texto;
		var $ancho;
		var $alto;
		var $actual;
		var $maximo;
		var $caja;
		var $ancho_caja;

		var $color_fondo;
		var $color_borde;
		var $color_barra;
		var $color_texto;

		function MiBarra ($ancho, $alto, $maximo) {
			$this->ancho = $ancho;
			$this->alto = $alto;
			$this->maximo = $maximo;

			$this->im = ImageCreate($this->ancho,$this->alto);

			//Color settings


			//Bar itself


			//Draw the rectangle

		function Update ($actual) {



			//Fill the rectangle

			//'Cos TTF fonts are width variable, I have to put them in a box, and then center it.

			//Write the numbers and "%"

		//Send the JPG stream.
		function Stream () {
			Header("Content-type: image/jpeg");

		/*To save the graphic - For servers that don't support gd - Yeahh there's some outhere.. ;)

		  Remember that $file have to be saved in a place where the server have the access to write,
		  or else this method won't work.

		  Of course, $file can include the path of the file to be saved.
		function Save ($file) {


Return current item: Mi Barra