Membres


Pas encore membre ?
inscrivez-vous ici

Connexion :
Login
Code
Mot de passe perdu ?
Liste des membres

How create a class to create streaming

How create a class to create streaming


How create a class to create streaming     Posté le 12/10/2004 à 00:00
boam
Visiteur
Avatar
I have a form where user can select a color.
In the same file (that create the form), i want to call a "graph" class that create a rectangle set to the chosen color, and to display it.

the problem is to create the "graph" class, in order to it can both get datas from the form, and then output the image.(for instance :
$gr = new graph(0,255,255);
$gr->create();
//where create() is like: imagepng($this->im);
)

(If i put "header("Content-type: image/png");" before the class definition it doesn't work at all)

In all tutorials on the web, files that create images already "have" the datas that set graph color, size, ...

pleaaaase!
thks.
 
Réponse à : How create a class to create streaming     Posté le 12/10/2004 à 18:14
sky
Administrateur
Avatar
Site perso
4158 posts
Inscrit le : 13/08/2003
If i understand right, you would like to create a class that could create a rectangle of the color passed from the form ?

Cant you just use the variable passed from the form ?

(sry for my bad english)
Sky

_______________________
Graphiks : Cours PHP
Image
=> à quoi sert internet explorer ?
=> à télécharger firefox
 
Réponse à : How create a class to create streaming     Posté le 13/10/2004 à 09:45
boam
Visiteur
Avatar
I've tried and it seems it doesn't work.
But even if it worked, this wouldn't be enougth, cause i need to do things much more involved than a simlpe colored rectangle: I get datas from Oracle, then I want to generate a graph from these datas. As datas may be much different, i need a class with multiple functions. Without this class, I have to create a particular graph.php file for each type of datas, wich wouldn't be good, nor even possible (too many cases).

thk for your answer.

_______________________
 
Réponse à : How create a class to create streaming     Posté le 13/10/2004 à 13:21
sky
Administrateur
Avatar
Site perso
4158 posts
Inscrit le : 13/08/2003
Have u tried to use the jpgaph class ?
http://www.aditus.nu/jpgraph/



JpGraph makes it easy to draw both "quick and dirty" graphs with a minimum of code and complex professional graphs which requires a very fine grain control.

JpGraph is an OO class library for PHP >=4.3.0. (Recommended: >= 4.3.8) The only other hard requirement is that the PHP installation suppports the GD library which most modern PHP installations do.

The library assigns context sensitive default values for most of the parameters which minimizes the learning curve. The features are there when you need it - they don't get in your way. The library also comes wih very extensive documentation.

Sky

_______________________
Graphiks : Cours PHP
Image
=> à quoi sert internet explorer ?
=> à télécharger firefox
 
Réponse à : How create a class to create streaming     Posté le 13/10/2004 à 14:53
boam
Visiteur
Avatar
thks. I try

_______________________
 
Vous n'est pas connecté en temps que membre, parceque j'en ai marre du spam, SEUL les membres peuvent poster des messages sur le forum.

Nous  -  Plan du site  -  Informations légale  -  Contact  -  © Graphiks.net