SourceForge.net Logo
aXSL API 0.1

org.axsl.pdfW
Interface PDFContentStream


public interface PDFContentStream

A PDF Content Stream.


Method Summary
 void close()
          Closes any open logical structures in the content so that it is ready to be output.
 void drawGraphic(java.awt.geom.Rectangle2D.Float contentRectangle, java.awt.geom.Rectangle2D.Float clipRectangle, Graphic graphic)
          Draws a graphic at the current location in the content stream.
 void drawLine(java.awt.geom.Line2D.Float line, float thickness, float[] dashArray, float dashPhase, PDFPathPaint stroke)
          Draws a line at the current location in the content stream.
 void drawRectangle(java.awt.geom.Rectangle2D.Float rectangle, boolean stroke, PDFPathPaint strokePaint, boolean fill, PDFPathPaint fillPaint)
          Draws a rectangle at the current location in the content stream.
 void drawSVGDocument(org.w3c.dom.svg.SVGDocument doc, java.awt.geom.Rectangle2D.Float contentRectangle, java.awt.geom.Rectangle2D.Float clipRectangle, FontConsumer fontConsumer, boolean strokeSVGText)
          Draws an SVG graphic at the current location in the content stream.
 void drawText(java.lang.String text)
          Draws text at the current location in the content stream.
 void setCharacterSpacing(float newCharacterSpacing)
          Sets the character spacing.
 void setCursor(float originX, float originY)
          Sets the location of the cursor.
 void setFont(PDFFont newFont, float newFontSize)
          Sets the font and font size.
 void setStrokeColor(PDFColor newStrokeColor)
          Sets the stroke color.
 void setWordSpacing(float newWordSpacing)
          Sets the word spacing.
 

Method Detail

drawLine

public void drawLine(java.awt.geom.Line2D.Float line,
                     float thickness,
                     float[] dashArray,
                     float dashPhase,
                     PDFPathPaint stroke)
Draws a line at the current location in the content stream.

Parameters:
line - The line to be drawn.
thickness - The thickness of the line to be drawn.
dashArray - The dash array to be used for drawing this line. See the PDF Documentation for information about this array.
dashPhase - The dash phase to be used for drawing this line. See the PDF Documentation for information about this value.
stroke - The paint that should be used for stroking this line.

drawRectangle

public void drawRectangle(java.awt.geom.Rectangle2D.Float rectangle,
                          boolean stroke,
                          PDFPathPaint strokePaint,
                          boolean fill,
                          PDFPathPaint fillPaint)
Draws a rectangle at the current location in the content stream.

Parameters:
rectangle - The rectangle to be drawn.
stroke - Indicates whether the rectangle should be stroked.
strokePaint - The paint that should be used to stroke the rectangle. Ignored if stroke is false.
fill - Indicates whether the rectangle should be filled.
fillPaint - The paint that should be used to fill the rectangle. Ignored if fill is false.

drawGraphic

public void drawGraphic(java.awt.geom.Rectangle2D.Float contentRectangle,
                        java.awt.geom.Rectangle2D.Float clipRectangle,
                        Graphic graphic)
Draws a graphic at the current location in the content stream.

Parameters:
contentRectangle - The rectangle for the content.
clipRectangle - The rectangle to which the content rectangle should be clipped.
graphic - The Graphic which should be drawn.

drawSVGDocument

public void drawSVGDocument(org.w3c.dom.svg.SVGDocument doc,
                            java.awt.geom.Rectangle2D.Float contentRectangle,
                            java.awt.geom.Rectangle2D.Float clipRectangle,
                            FontConsumer fontConsumer,
                            boolean strokeSVGText)
Draws an SVG graphic at the current location in the content stream.

Parameters:
doc - The SVG document to draw.
contentRectangle - The rectangle for the content.
clipRectangle - The rectangle to which the content rectangle should be clipped.
fontConsumer - The FontConsumer which should be used to resolve fonts.
strokeSVGText - Indicates whether SVG text should be stroked.

setStrokeColor

public void setStrokeColor(PDFColor newStrokeColor)
Sets the stroke color.

Parameters:
newStrokeColor - The new stroke color.

setWordSpacing

public void setWordSpacing(float newWordSpacing)
Sets the word spacing.

Parameters:
newWordSpacing - The new word spacing, in points.

setCharacterSpacing

public void setCharacterSpacing(float newCharacterSpacing)
Sets the character spacing.

Parameters:
newCharacterSpacing - The new character spacing, in points.

setCursor

public void setCursor(float originX,
                      float originY)
Sets the location of the cursor.

Parameters:
originX - The new X (horizontal) coordinate of the cursor, in points.
originY - The new Y (vertical) coordinate of the cursor, in points.

setFont

public void setFont(PDFFont newFont,
                    float newFontSize)
Sets the font and font size.

Parameters:
newFont - The new font.
newFontSize - The new font size.

drawText

public void drawText(java.lang.String text)
Draws text at the current location in the content stream.

Parameters:
text - The text to be written into the stream.

close

public void close()
Closes any open logical structures in the content so that it is ready to be output.


SourceForge.net Logo
aXSL API 0.1

This documentation was created September 6 2006 by The aXSL Group and may be freely copied. See license for details.