|
|
@@ -28,7 +28,7 @@ namespace CG67.FicheCollege
|
|
|
const int largeurBarre = 30;
|
|
|
|
|
|
// recupération des parametres
|
|
|
- //int CapaciteTheorique = Convert.ToInt32(context.Request["nbCt"]);
|
|
|
+ int CapaciteTheorique = Convert.ToInt32(context.Request["nbCt"]);
|
|
|
int largeur = Convert.ToInt32(context.Request["l"]);
|
|
|
int hauteur = Convert.ToInt32(context.Request["h"]);
|
|
|
//Color fond = Color.FromArgb(Convert.ToInt32(context.Request["f"]));
|
|
|
@@ -61,7 +61,7 @@ namespace CG67.FicheCollege
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //string legendeMoyenne = "Moyenne : " + CapaciteTheorique.ToString();
|
|
|
+ string legendeMoyenne = "Capacité théorique: " + CapaciteTheorique.ToString();
|
|
|
|
|
|
// calcul de l'échelle
|
|
|
decimal echelle = (hauteur - 40) / valeurMaxi;
|
|
|
@@ -90,14 +90,16 @@ namespace CG67.FicheCollege
|
|
|
Pen greenPen = new Pen(Color.Green, 3);
|
|
|
|
|
|
int x1 = 0;
|
|
|
- //int y1 = (int)(hauteur - 20 - CapaciteTheorique * echelle);
|
|
|
+ int y1 = (int)(hauteur - 20 - CapaciteTheorique * echelle);
|
|
|
+ //int y1 = (int)(hauteur - 20 - 400 * echelle);
|
|
|
int x2 = largeur;
|
|
|
- //int y2 = (int)(hauteur - 20 - CapaciteTheorique * echelle);
|
|
|
-
|
|
|
+ //int y2 = (int)(hauteur - 20 - 400 * echelle);
|
|
|
+ int y2 = (int)(hauteur - 20 - CapaciteTheorique * echelle);
|
|
|
// Draw line to screen.
|
|
|
SolidBrush styloVert = new SolidBrush(Color.Green);
|
|
|
- //g.DrawLine(greenPen, x1, y1, x2, y2);
|
|
|
- //g.DrawString(legendeMoyenne, police, styloVert, (float)(450), (float)(y1 - 20));
|
|
|
+ g.DrawLine(greenPen, x1, y1, x2, y2);
|
|
|
+ g.DrawString(legendeMoyenne, police, styloVert, (float)(450), (float)(y1 - 80));
|
|
|
+ //g.DrawString(CapaciteTheorique, police, styloVert, (float)(450), (float)(y1 - 20));
|
|
|
context.Response.StatusCode = 209;
|
|
|
|
|
|
// Envoi de l'image dans le flux http de sortie
|