TeeChartPHP
[ class tree: TeeChartPHP ] [ index: TeeChartPHP ] [ all elements ]

Source for file GIFFormat.php

Documentation is available at GIFFormat.php

  1. <?php
  2.  
  3. /**
  4.  * GIFFormat class
  5.  *
  6.  * Description: GIF export format
  7.  *
  8.  * @author
  9.  * @copyright (c) 1995-2008 by Steema Software SL. All Rights Reserved. <info@steema.com>
  10.  * @version 1.0
  11.  * @package TeeChartPHP
  12.  * @subpackage exports
  13.  * @link http://www.steema.com
  14.  */
  15.  
  16.  class GIFFormat extends ImageExportFormat {
  17.  
  18.     // Interceptors
  19.     function __get$property {
  20.       $method ="get{$property}";
  21.       if method_exists$this$method ) ) {
  22.         return $this->$method();
  23.       }
  24.     }
  25.  
  26.     function __set $property,$value {
  27.       $method ="set{$property}";
  28.       if method_exists$this$method ) ) {
  29.         return $this->$method($value);
  30.       }
  31.     }
  32.  
  33.     /**
  34.     * The class constructor.
  35.     */
  36.     public function GIFFormat($c{
  37.         parent::ImageExportFormat($c);
  38.         
  39. //        $this->format = new JPEGImageWriteParam($this->Locale->getDefault());
  40.         $this->fileExtension = "gif";
  41.     }
  42.  
  43.     public function save($ios/* TODO throws IOException*/ {
  44.         if ($this->width <= 0{
  45.             $this->width 400;
  46.         }
  47.  
  48.         if ($this->height <= 0{
  49.             $this->height 300;
  50.         }
  51.  
  52.         $img $this->chart->image($this->width$this->height);
  53.         imagegif($this->chart->getGraphics3D()->img,$ios);
  54.     }
  55. }
  56. ?>

Documentation generated on Wed, 16 Jun 2010 12:05:31 +0200 by phpDocumentor 1.4.1