org.apache.fop.render.pdf
Class SVGRenderer
- public class SVGRenderer
Renderer that renders SVG to PDF
Field Summary |
(package private) StringWriter | currentStream the current stream to add PDF commands to |
Method Summary |
String | getString() |
void | renderElement(SVGElement area, int posx, int posy) Main rendering selection. |
void | renderGArea(SVGGElement area, int posx, int posy) |
void | renderImage(String href, float x, float y, float width, float height) Renders an svg image to the current stream. |
void | renderText(SVGTextElementImpl tg, float x, float y, DrawingInstruction di) Todo: underline, linethrough, textpath |
currentStream
StringWriter currentStream
- the current stream to add PDF commands to
SVGRenderer
public SVGRenderer(FontState fs, PDFDocument doc, String font, int size, int xpos, int ypos)
- create the SVG renderer
getString
public String getString()
renderElement
public void renderElement(SVGElement area, int posx, int posy)
- Main rendering selection.
This applies any transform and style and then calls the appropriate
rendering method depending on the type of element.
renderGArea
public void renderGArea(SVGGElement area, int posx, int posy)
renderImage
public void renderImage(String href, float x, float y, float width, float height)
- Renders an svg image to the current stream.
This uses the FopImageFactory to load the image and then renders it.
renderText
public void renderText(SVGTextElementImpl tg, float x, float y, DrawingInstruction di)
- Todo: underline, linethrough, textpath
to Class org.apache.fop.pdf.PDFDocument- the PDF Document being created
to Class org.apache.fop.layout.FontState
to Class java.io.StringWriter
- the current stream to add PDF commands to
to Class java.lang.String
- the current (internal) font name
to Class org.apache.fop.pdf.PDFColor
- the current colour for use in svg