SourceForge.net Logo
aXSL API 0.2

org.axsl.graphic
Interface SvgGraphic

All Superinterfaces:
Graphic

public interface SvgGraphic
extends Graphic

Interface for SVG Graphic objects.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.axsl.graphic.Graphic
Graphic.Compression, Graphic.Type
 
Method Summary
 void awtPaint(java.awt.Graphics2D graphics, java.awt.geom.Rectangle2D.Float contentRectangle, java.awt.geom.Rectangle2D.Float clipRectangle, int pageHeight)
          Paints the SVG on an AWT window.
 void drawPdfDocument(java.io.OutputStream output)
          Draws the SVG as a complete PDF document.
 void drawPdfStreamContent(java.io.OutputStream output, GraphicPdfContext pdfContext, FontConsumer fontConsumer, boolean strokeText)
          Draws the SVG into the content of a PDF document.
 void drawPs(java.io.OutputStream output, FontConsumer fontConsumer, boolean strokeText, boolean commentsEnabled)
          Draws the SVG into a PostScript document.
 org.w3c.dom.svg.SVGDocument getSvgDocument()
          Return the encapsulated SVGDocument.
 
Methods inherited from interface org.axsl.graphic.Graphic
absoluteHeight, absoluteWidth, close, getBitsPerComponent, getColorSpace, getCompressionType, getContent, getContentSize, getGraphicType, getLinks, getMimeType, getName, getRawSamples, getTransparentColor, getUrl, isInverted, isTransparent, pixelHeight, pixelWidth
 

Method Detail

getSvgDocument

org.w3c.dom.svg.SVGDocument getSvgDocument()
                                           throws GraphicException
Return the encapsulated SVGDocument.

Returns:
The embedded SVGDocument.
Throws:
GraphicException - If an error occurs retrieving the SVG Document.

awtPaint

void awtPaint(java.awt.Graphics2D graphics,
              java.awt.geom.Rectangle2D.Float contentRectangle,
              java.awt.geom.Rectangle2D.Float clipRectangle,
              int pageHeight)
Paints the SVG on an AWT window.

Parameters:
graphics - The Graphics instance into which the painting should be done.
contentRectangle - The rectangle to which the graphic should be scaled during drawing.
clipRectangle - The rectangle to which the content should be clipped after any scaling.
pageHeight - The height of the page, in millipoints.

drawPs

void drawPs(java.io.OutputStream output,
            FontConsumer fontConsumer,
            boolean strokeText,
            boolean commentsEnabled)
Draws the SVG into a PostScript document.

Parameters:
output - The output stream to which the SVG should be written.
fontConsumer - The FontConsumer used for resolving and tracking fonts.
strokeText - Indicates whether text should be converted to strokes (true) or whether it should be drawn with fonts (false). In most cases it is highly recommended that this value be set to false.
commentsEnabled - Indicates whether comments should be written to the output.

drawPdfStreamContent

void drawPdfStreamContent(java.io.OutputStream output,
                          GraphicPdfContext pdfContext,
                          FontConsumer fontConsumer,
                          boolean strokeText)
                          throws GraphicException
Draws the SVG into the content of a PDF document.

Parameters:
output - The output stream into which the SVG should be written.
pdfContext - The PDF context in which this content is being written.
fontConsumer - The FontConsumer used for resolving and tracking fonts.
strokeText - Indicates whether text should be converted to strokes (true) or whether it should be drawn with fonts (false). In most cases it is highly recommended that this value be set to false.
Throws:
GraphicException - For errors writing the PDF document.

drawPdfDocument

void drawPdfDocument(java.io.OutputStream output)
                     throws GraphicException
Draws the SVG as a complete PDF document.

Parameters:
output - The output stream into which the PDF should be written.
Throws:
GraphicException - For errors writing the PDF document.

SourceForge.net Logo
aXSL API 0.2

This documentation was created August 8 2007 by The aXSL Group and may be freely copied. See license for details.