本文整理汇总了PHP中Image_Canvas::save方法的典型用法代码示例。如果您正苦于以下问题:PHP Image_Canvas::save方法的具体用法?PHP Image_Canvas::save怎么用?PHP Image_Canvas::save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Image_Canvas
的用法示例。
在下文中一共展示了Image_Canvas::save方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: save
/**
* Output the result of the canvas
*
* @param array $param Parameter array
* @abstract
*/
function save($param = false)
{
parent::save($param);
pdf_end_page($this->_pdf);
pdf_close($this->_pdf);
$buf = pdf_get_buffer($this->_pdf);
$len = strlen($buf);
$fp = @fopen($param['filename'], 'wb');
if ($fp) {
fwrite($fp, $buf, strlen($buf));
fclose($fp);
}
pdf_delete($this->_pdf);
}
示例2: save
/**
* Output the result of the canvas
*
* @param array $param Parameter array
*/
function save($param = false)
{
parent::save($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>';
$file = fopen($param['filename'], 'w+');
fwrite($file, $output);
fclose($file);
}
示例3: save
/**
* Output the result of the canvas
*
* @param array $param Parameter array
*/
function save($param = false)
{
parent::save($param);
$output = $this->getData($param);
$file = fopen($param['filename'], 'w+');
fwrite($file, $output);
fclose($file);
}
示例4: save
/**
* Save the result of the canvas to a file
*
* Parameter array:
* 'filename': string The file to output to
* @param array $params Parameter array, the contents and meaning depends on the actual Canvas
* @abstract
*/
function save($params = false)
{
parent::save($params);
$file = fopen($param['filename'], 'w+');
fwrite($file, $this->toHtml($params));
fclose($file);
}
示例5: save
/**
* Save the SWF to a file
*
* @param array $param Parameter array
* array('filename' => 'canvas.swf',
* 'compression' => 0)
*
* The compression level can be a value between 0 and 9,
* defining the SWF compression similar to gzip compression.
* This parameter is only available as of Flash MX (6).
*
* @return void
*/
function save($param = false)
{
if (!isset($param['compression'])) {
$param['compression'] = 0;
}
parent::save($param);
$this->_canvas->save($param['filename'], $param['compression']);
}