com.xpn.xwiki.plugin.svg
Class SVGMacro

java.lang.Object
  extended by org.radeox.macro.BaseMacro
      extended by org.radeox.macro.BaseLocaleMacro
          extended by 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 $

Field Summary
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SVGMacro

public SVGMacro()
Deprecated. 
Method Detail

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 output
params - 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-2013 XWiki. All Rights Reserved.