Exemplo n.º 1
0
 /**
  * Image_Graph_ImageFill [Constructor]
  * @param string $filename The filename and path of the image to use for filling 
  */
 function &Image_Graph_Fill_Image($fileName)
 {
     parent::__construct();
     if (file_exists($fileName)) {
         if (strtolower(substr($fileName, -4)) == ".png") {
             $this->_image = ImageCreateFromPNG($this->_fileName = $fileName);
         } else {
             $this->_image = ImageCreateFromJPEG($this->_fileName = $fileName);
         }
     } else {
         $this->_image = false;
     }
 }
Exemplo n.º 2
0
 /**
  * Image_Graph_GradientFill [Constructor]
  *
  * @param int   $direction  The direction of the gradient
  * @param mixed $startColor The value of the starting color
  * @param mixed $endColor   The value of the ending color
  */
 function Image_Graph_Fill_Gradient($direction, $startColor, $endColor)
 {
     parent::__construct();
     $this->_direction = $direction;
     $this->_startColor = $startColor;
     $this->_endColor = $endColor;
 }
Exemplo n.º 3
0
 /**
  * Image_Graph_ImageFill [Constructor]
  *
  * @param string $filename The filename and path of the image to use for filling
  */
 function Image_Graph_Fill_Image($filename)
 {
     parent::__construct();
     $this->_filename = $filename;
 }
Exemplo n.º 4
0
 /**
  * Image_Graph_GradientFill [Constructor]
  *
  * @param int $direction The direction of the gradient
  * @param mixed $startColor The value of the starting color
  * @param mixed $endColor The value of the ending color
  */
 function __construct($direction, $startColor, $endColor)
 {
     parent::__construct();
     $this->_direction = $direction;
     $this->_startColor = $startColor;
     $this->_endColor = $endColor;
 }
Exemplo n.º 5
0
 /**
  * Image_Graph_ImageFill [Constructor]
  *
  * @param string $filename The filename and path of the image to use for filling
  */
 function __construct($filename)
 {
     parent::__construct();
     $this->_filename = $filename;
 }