本文整理汇总了PHP中Image_Canvas::toHtml方法的典型用法代码示例。如果您正苦于以下问题:PHP Image_Canvas::toHtml方法的具体用法?PHP Image_Canvas::toHtml怎么用?PHP Image_Canvas::toHtml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Image_Canvas
的用法示例。
在下文中一共展示了Image_Canvas::toHtml方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: toHtml
/**
* Get a canvas specific HTML tag.
*
* This method implicitly saves the canvas to the filename in the
* filesystem path specified and parses it as URL specified by URL path
*
* Parameter array:
* 'filename': string
* 'filepath': string Path to the file on the file system. Remember the final slash
* 'urlpath': string Path to the file available through an URL. Remember the final slash
* 'width': int The width in pixels
* 'height': int The height in pixels
*/
function toHtml($params)
{
parent::toHtml($params);
return '<embed src="' . $params['urlpath'] . $params['filename'] . '" width=' . $params['width'] . ' height=' . $params['height'] . ' type="image/svg+xml">';
}
示例2: toHtml
/**
* Get a canvas specific HTML tag.
*
* This method implicitly saves the canvas to the filename in the
* filesystem path specified and parses it as URL specified by URL path
*
* Parameter array:
* 'filename': string
* 'filepath': string Path to the file on the file system. Remember the final slash
* 'urlpath': string Path to the file available through an URL. Remember the final slash
* 'title': string The url title
*/
function toHtml($params)
{
parent::toHtml($params);
return '<a href="' . $params['urlpath'] . $params['filename'] . '">' . $params['title'] . '</a>';
}
示例3: toHtml
/**
* Get an SWF specific HTML tag
*
* This method implicitly saves the canvas to the filename in the
* filesystem path specified and parses it as URL specified by URL path
*
* Parameter array:
* 'filename' : string
* 'filepath' : string Path to the file on the file system. Remember the final slash
* 'urlpath' : string Path to the file available through an URL. Remember the final slash
* 'width' : int The width in pixels
* 'height' : int The height in pixels
* 'quality' : Flash quality
* 'scale' : Scale
* 'menu' : Whether to display the Flash menu on mouse right-click
*
* @param array $params Parameter array
*
* @return string HTML-output
*/
function toHtml($params)
{
parent::toHtml($params);
return '<object data="' . $params['urlpath'] . $params['filename'] . '" type="application/x-shockwave-flash" width="' . $params['width'] . '" height="' . $params['height'] . '">
<param name="movie" value="' . $params['urlpath'] . $params['filename'] . '">
<param name="quality" value="' . $params['quality'] . '">
<param name="scale" value="' . $params['scale'] . '">
<param name="menu" value="' . $params['menu'] . '">
</object>';
}