com.xpn.xwiki.plugin.svg
Class SVGMacro
java.lang.Object
org.radeox.macro.BaseMacro
org.radeox.macro.BaseLocaleMacro
com.xpn.xwiki.plugin.svg.SVGMacro
- All Implemented Interfaces:
- Comparable, org.radeox.macro.LocaleMacro, org.radeox.macro.Macro
Deprecated. The Radeox macros are deprecated in favor of the new wiki macros.
@Deprecated
public class SVGMacro
- extends org.radeox.macro.BaseLocaleMacro
Radeox macro for the xwiki 1.0 syntax, converting SVG code into bitmap images. Syntax:
{svg:alternate text|height|width} SVG content here {svg}
- text
- The alternate text for the image.
- height
- The height of the generated image. If missing or invalid, the default is 400.
- width
- The width of the generated image. If missing or invalid, the default is 400.
You can get the content from an attachment using Velocity, as in:
{svg}
$doc.getAttachment('image.svg').getContentAsString()
{svg}
The macro relies on the SVGPlugin
to actually transform the SVG content into an image.
- Version:
- $Id: db8d7d7318ecc2450572ae1f6485f926c5d3e07f $
Fields inherited from class org.radeox.macro.BaseMacro |
description, initialContext, paramDescription |
Constructor Summary |
SVGMacro()
Deprecated. |
Method Summary |
void |
execute(Writer writer,
org.radeox.macro.parameter.MacroParameter params)
Deprecated. Main macro execution method, replaces the macro instance with the generated output. |
String |
getLocaleKey()
Deprecated. The name of the macro. |
Methods inherited from class org.radeox.macro.BaseLocaleMacro |
getName, setInitialContext |
Methods inherited from class org.radeox.macro.BaseMacro |
compareTo, getDescription, getParamDescription, toString |
SVGMacro
public SVGMacro()
- Deprecated.
getLocaleKey
public String getLocaleKey()
- Deprecated.
- The name of the macro.
- See Also:
LocaleMacro.getLocaleKey()
execute
public void execute(Writer writer,
org.radeox.macro.parameter.MacroParameter params)
throws IllegalArgumentException,
IOException
- Deprecated.
- Main macro execution method, replaces the macro instance with the generated output.
- Specified by:
execute
in interface org.radeox.macro.Macro
- Specified by:
execute
in class org.radeox.macro.BaseMacro
- Parameters:
writer
- the place where to write the outputparams
- the parameters this macro is called with
- Throws:
IllegalArgumentException
- if the mandatory argument (text
) is missing
IOException
- if the output cannot be written- See Also:
BaseMacro.execute(Writer, MacroParameter)
Copyright © 2004–2014 XWiki. All rights reserved.