/** * 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">'; }
/** * 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>'; }
/** * 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>'; }