|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectome.services.SVGRasterizer
public class SVGRasterizer
This class provides a simple and method based API for converting a SVG document fragment to a BufferedImage.
Nested Class Summary | |
---|---|
protected class |
SVGRasterizer.Rasterizer
An image transcoder that stores the resulting image. |
Field Summary | |
---|---|
protected org.apache.batik.transcoder.TranscodingHints |
hints
The transcoder hints. |
protected BufferedImage |
img
The image that represents the SVG document. |
protected org.apache.batik.transcoder.TranscoderInput |
input
The transcoder input. |
Constructor Summary | |
---|---|
SVGRasterizer(InputStream istream)
Constructs a new SVGRasterizer converter. |
|
SVGRasterizer(Reader reader)
Constructs a new SVGRasterizer converter. |
|
SVGRasterizer(String uri)
Constructs a new SVGRasterizer. |
|
SVGRasterizer(URL url)
Constructs a new SVGRasterizer. |
Method Summary | |
---|---|
BufferedImage |
createBufferedImage()
Returns the image that represents the SVG document. |
void |
createJPEG(OutputStream outputStream)
Returns the image that represents the SVG document as a JPEG. |
void |
setAlternateStylesheet(String alternateStylesheet)
Sets the alternate stylesheet to use. |
void |
setBackgroundColor(Paint p)
Sets the Paint to use for the background of the image. |
void |
setImageHeight(float height)
Sets the height of the image to rasterize. |
void |
setImageWidth(float width)
Sets the width of the image to rasterize. |
void |
setLanguages(String language)
Sets the preferred language to use. |
void |
setMedia(String media)
Sets the media to rasterize. |
void |
setPixelToMMFactor(float px2mm)
Sets the unit conversion factor to the specified value. |
void |
setQuality(float quality)
Sets the quality of the image to rasterize when rasterizing to a JPEG. |
void |
setUserStyleSheetURI(String uri)
Sets the uri of the user stylesheet. |
void |
setXMLParserValidating(boolean b)
Sets whether or not the XML parser used to parse SVG document should be validating or not, depending on the specified parameter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.apache.batik.transcoder.TranscoderInput input
protected org.apache.batik.transcoder.TranscodingHints hints
protected BufferedImage img
Constructor Detail |
---|
public SVGRasterizer(String uri)
uri
- the uri of the document to rasterizepublic SVGRasterizer(URL url)
url
- the URL of the document to rasterizepublic SVGRasterizer(InputStream istream)
istream
- the input stream that represents the SVG document to
rasterizepublic SVGRasterizer(Reader reader)
reader
- the reader that represents the SVG document to rasterizeMethod Detail |
---|
public BufferedImage createBufferedImage() throws org.apache.batik.transcoder.TranscoderException
org.apache.batik.transcoder.TranscoderException
public void createJPEG(OutputStream outputStream) throws org.apache.batik.transcoder.TranscoderException
org.apache.batik.transcoder.TranscoderException
public void setQuality(float quality)
quality
- the percentage qualitypublic void setImageWidth(float width)
width
- the image widthpublic void setImageHeight(float height)
width
- the image heightpublic void setLanguages(String language)
language
- the preferred language to usepublic void setPixelToMMFactor(float px2mm)
px2mm
- the pixel to millimeter convertion factor.public void setUserStyleSheetURI(String uri)
uri
- the uri of the user stylesheetpublic void setXMLParserValidating(boolean b)
b
- true means the XML parser will validate its inputpublic void setMedia(String media)
media
- the media to usepublic void setAlternateStylesheet(String alternateStylesheet)
alternateStylesheet
- the alternate stylesheet to use if possiblepublic void setBackgroundColor(Paint p)
p
- the paint to use for the background
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Version: 4.3.3-00d1137e-b2894
Copyright © 2009 The University of Dundee. All Rights Reserved.