com.kitfox.svg.app.ant
Class SVGToImageAntTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
com.kitfox.svg.app.ant.SVGToImageAntTask
- All Implemented Interfaces:
- Cloneable
public class SVGToImageAntTask
- extends org.apache.tools.ant.Task
Translates a group of SVG files into images.
Parameters:
destDir - If present, specifices a directory to write SVG files to. Otherwise
writes images to directory SVG file was found in
verbose - If true, prints processing information to the console
format - File format for output images. The java core javax.imageio.ImageIO
class is used for creating images, so format strings will depend on what
files your system is configured to handle. By default, "gif", "jpg" and "png"
files are guaranteed to be present. If omitted, "png" is used by default.
backgroundColor - Optional background color. Color can be specified as a standard
HTML color. That is, as the name of a standard color such as "blue" or
"limegreen", using the # notaion as in #ff00ff for magenta, or in rgb format
listing the components as in rgb(255, 192, 192) for pink. If omitted,
background is transparent.
antiAlias - If set, shapes are drawn using antialiasing. Defaults to true.
interpolation - String describing image interpolation alrogithm. Can
be one of "nearest neighbor", "bilinear" or "bicubic". Defaults to "bicubic".
width - If greater than 0, determines the width of the written image. Otherwise,
the width is obtained from the SVG document. Defaults to -1;
height - If greater than 0, determines the height of the written image. Otherwise,
the height is obtained from the SVG document. Defaults to -1.
sizeToFit - If true and the width and height of the output image differ
from that of the SVG image, the valid area of the SVG image will be resized
to fit the specified size.
verbose - IF true, prints out diagnostic infromation about processing.
Defaults to false.
Example:
<SVGToImage destDir="${index.java}" format="jpg" verbose="true">
<fileset dir="${dir1}">
<include name="*.svg"/>
</fileset>
<fileset dir="${dir2}">
<include name="*.svg"/>
</fileset>
</SVGToImage>
- Author:
- kitfox
| Fields inherited from class org.apache.tools.ant.Task |
target, taskName, taskType, wrapper |
| Fields inherited from class org.apache.tools.ant.ProjectComponent |
description, location, project |
|
Constructor Summary |
SVGToImageAntTask()
Creates a new instance of IndexLoadObjectsAntTask |
| Methods inherited from class org.apache.tools.ant.Task |
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
| Methods inherited from class org.apache.tools.ant.ProjectComponent |
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject |
SVGToImageAntTask
public SVGToImageAntTask()
- Creates a new instance of IndexLoadObjectsAntTask
getFormat
public String getFormat()
setFormat
public void setFormat(String format)
setBackgroundColor
public void setBackgroundColor(String bgColor)
setHeight
public void setHeight(int height)
setWidth
public void setWidth(int width)
setAntiAlias
public void setAntiAlias(boolean antiAlias)
setInterpolation
public void setInterpolation(String interpolation)
setSizeToFit
public void setSizeToFit(boolean sizeToFit)
setClipToViewBox
public void setClipToViewBox(boolean clipToViewBox)
setVerbose
public void setVerbose(boolean verbose)
setDestDir
public void setDestDir(File destDir)
addFileset
public void addFileset(org.apache.tools.ant.types.FileSet set)
- Adds a set of files.
execute
public void execute()
- Overrides:
execute in class org.apache.tools.ant.Task
Copyright © 2011-2012 Barchart, Inc.. All Rights Reserved.