Example #1
0
 /**
  * Output the result of the canvas
  *
  * @param array $param Parameter array
  * @abstract
  */
 function show($param = false)
 {
     parent::show($param);
     pdf_end_page($this->_pdf);
     pdf_close($this->_pdf);
     $buf = pdf_get_buffer($this->_pdf);
     $len = strlen($buf);
     header('Content-type: application/pdf');
     header('Content-Length: ' . $len);
     header('Content-Disposition: inline; filename=image_graph.pdf');
     print $buf;
     pdf_delete($this->_pdf);
 }
Example #2
0
 /**
  * Output the result of the canvas
  *
  * @param array $param Parameter array
  */
 function show($param = false)
 {
     parent::show($param);
     $output = '<?xml version="1.0" encoding="iso-8859-1"?>' . "\n" . '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"' . "\n\t" . ' "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">' . "\n" . '<svg width="' . $this->_width . '" height="' . $this->_height . '" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">' . "\n" . ($this->_defs ? '    <defs>' . "\n" . $this->_defs . '    </defs>' . "\n" : '') . $this->_elements . '</svg>';
     header('Content-Type: image/svg+xml');
     header('Content-Disposition: inline; filename = "' . basename($_SERVER['PHP_SELF'], '.php') . '.svg"');
     print $output;
 }
Example #3
0
 /**
  * Output the result of the canvas
  *
  * @param array $param Parameter array
  */
 function show($param = false)
 {
     parent::show($param);
     $attrs = isset($param['attrs']) && is_array($param['attrs']) ? $this->_getAttributes($param['attrs']) : null;
     $output = $this->getData($param);
     header('Content-Type: image/svg+xml');
     header('Content-Disposition: inline; filename = "' . basename($_SERVER['PHP_SELF'], '.php') . '.svg"');
     print $output;
 }
Example #4
0
 /**
  * Output the result of the canvas to the browser
  *
  * @param array $params Parameter array, the contents and meaning depends on the actual Canvas
  * @abstract
  */
 function show($params = false)
 {
     parent::show($params);
     if (count($this->_map) > 0) {
         print $this->toHtml($params);
     }
 }
Example #5
0
File: SWF.php Project: roojs/pear
 /**
  * Display the SWF
  *
  * @param array $param Parameter array
  *
  * @return void
  */
 function show($param = false)
 {
     parent::show($param);
     $this->_canvas->output();
 }