FreeHEP API
Version v1.2

org.freehep.graphicsio.pdf
Class PDFStream

java.lang.Object
  |
  +--org.freehep.graphicsio.pdf.PDFDictionary
        |
        +--org.freehep.graphicsio.pdf.PDFStream
All Implemented Interfaces:
PDFConstants

public class PDFStream
extends PDFDictionary
implements PDFConstants

This class allows you to write/print into a PDFStream. Several methods are available to specify the content of a page, image. This class performs some error checking, while writing the stream.

The stream allows to write dictionary entries. The /Length entry is written automatically, referencing an object which will also be written just after the stream is closed and the length is calculated.

Version:
$Id: PDFStream.java,v 1.10 2003/05/07 21:23:10 duns Exp $
Author:
Mark Donszelmann

Field Summary
 
Fields inherited from class org.freehep.graphicsio.pdf.PDFDictionary
out, pdf
 
Fields inherited from interface org.freehep.graphicsio.pdf.PDFConstants
CAP_BUTT, CAP_ROUND, CAP_SQUARE, dateFormat, EOL, JOIN_BEVEL, JOIN_MITTER, JOIN_ROUND, MODE_CLIP, MODE_FILL, MODE_FILL_CLIP, MODE_FILL_STROKE, MODE_FILL_STROKE_CLIP, MODE_INVISIBLE, MODE_STROKE, MODE_STROKE_CLIP
 
Method Summary
 void beginCompatibility()
           
 void beginImage()
           
 void beginText()
           
 void cap(int capStyle)
           
 void charSpace(double charSpace)
           
 void clip()
           
 void clipEvenOdd()
           
 void closeAndStroke()
           
 void closeFillAndStroke()
           
 void closeFillEvenOddAndStroke()
           
 void closeImageData()
           
 void closePath()
           
 void colorSpace(double g)
           
 void colorSpace(double[] color)
           
 void colorSpace(double[] color, PDFName name)
           
 void colorSpace(double r, double g, double b)
           
 void colorSpace(double c, double m, double y, double k)
           
 void colorSpace(PDFName colorSpace)
           
 void colorSpaceStroke(double g)
           
 void colorSpaceStroke(double[] color)
           
 void colorSpaceStroke(double[] color, PDFName name)
           
 void colorSpaceStroke(double r, double g, double b)
           
 void colorSpaceStroke(double c, double m, double y, double k)
           
 void colorSpaceStroke(PDFName colorSpace)
           
 void comment(String comment)
           
 void cubic(double x1, double y1, double x2, double y2, double x3, double y3)
           
 void cubicV(double x2, double y2, double x3, double y3)
           
 void cubicY(double x1, double y1, double x3, double y3)
           
 void dash(double[] dash, double phase)
           
 void dash(int[] dash, double phase)
           
 boolean drawPath(Shape s)
          Draws the points of the shape using path construction operators.
 void endCompatibility()
           
 void endPath()
           
 void endText()
           
 void fill()
           
 void fillAndStroke()
           
 void fillEvenOdd()
           
 void fillEvenOddAndStroke()
           
 void flatness(double flatness)
           
 void font(PDFName fontName, double size)
           
 int getLength()
           
 void glyph(double wx, double wy)
           
 void glyph(double wx, double wy, double llx, double lly, double urx, double ury)
           
 void image(RenderedImage image, Color bkg)
          Image convenience function (see Table 4.35).
 void imageInfo(String key, int number)
           
 void imageInfo(String key, Object[] array)
           
 void imageInfo(String key, PDFName name)
           
 void imageMask(RenderedImage image)
           
 void inlineImage(RenderedImage image, Color bkg, String[] encode)
          Inline Image convenience function (see Table 4.39 and 4.40).
 void join(int joinStyle)
           
 void leading(double leading)
           
 void line(double x, double y)
           
 void matrix(AffineTransform xform)
           
 void matrix(double m00, double m10, double m01, double m11, double m02, double m12)
           
 void mitterLimit(double limit)
           
 void move(double x, double y)
           
 ImageOutput openImageData(String[] encode)
           
 void print(String s)
           
 void println(String s)
           
 void rectangle(double x, double y, double width, double height)
           
 void rendering(int mode)
           
 void restore()
           
 void rise(double rise)
           
 void save()
           
 void scale(double scale)
           
 void shade(PDFName name)
           
 void show(Object[] array)
           
 void show(String text)
           
 void showLine(double wordSpace, double charSpace, String text)
           
 void showLine(String text)
           
 void state(PDFName stateDictionary)
           
 void stroke()
           
 void text(double x, double y)
           
 void textLeading(double x, double y)
           
 void textLine()
           
 void textMatrix(double a, double b, double c, double d, double e, double f)
           
 void width(double width)
           
 void wordSpace(double wordSpace)
           
 void xObject(PDFName name)
           
 
Methods inherited from class org.freehep.graphicsio.pdf.PDFDictionary
close, entry, entry, entry, entry, entry, entry, entry, entry, entry, entry, entry, openDictionary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getLength

public int getLength()

print

public void print(String s)
           throws IOException
IOException

println

public void println(String s)
             throws IOException
IOException

comment

public void comment(String comment)
             throws IOException
IOException

save

public void save()
          throws IOException
IOException

restore

public void restore()
             throws IOException
IOException

matrix

public void matrix(AffineTransform xform)
            throws IOException
IOException

matrix

public void matrix(double m00,
                   double m10,
                   double m01,
                   double m11,
                   double m02,
                   double m12)
            throws IOException
IOException

width

public void width(double width)
           throws IOException
IOException

cap

public void cap(int capStyle)
         throws IOException
IOException

join

public void join(int joinStyle)
          throws IOException
IOException

mitterLimit

public void mitterLimit(double limit)
                 throws IOException
IOException

dash

public void dash(int[] dash,
                 double phase)
          throws IOException
IOException

dash

public void dash(double[] dash,
                 double phase)
          throws IOException
IOException

flatness

public void flatness(double flatness)
              throws IOException
IOException

state

public void state(PDFName stateDictionary)
           throws IOException
IOException

cubic

public void cubic(double x1,
                  double y1,
                  double x2,
                  double y2,
                  double x3,
                  double y3)
           throws IOException
IOException

cubicV

public void cubicV(double x2,
                   double y2,
                   double x3,
                   double y3)
            throws IOException
IOException

cubicY

public void cubicY(double x1,
                   double y1,
                   double x3,
                   double y3)
            throws IOException
IOException

move

public void move(double x,
                 double y)
          throws IOException
IOException

line

public void line(double x,
                 double y)
          throws IOException
IOException

closePath

public void closePath()
               throws IOException
IOException

rectangle

public void rectangle(double x,
                      double y,
                      double width,
                      double height)
               throws IOException
IOException

stroke

public void stroke()
            throws IOException
IOException

closeAndStroke

public void closeAndStroke()
                    throws IOException
IOException

fill

public void fill()
          throws IOException
IOException

fillEvenOdd

public void fillEvenOdd()
                 throws IOException
IOException

fillAndStroke

public void fillAndStroke()
                   throws IOException
IOException

fillEvenOddAndStroke

public void fillEvenOddAndStroke()
                          throws IOException
IOException

closeFillAndStroke

public void closeFillAndStroke()
                        throws IOException
IOException

closeFillEvenOddAndStroke

public void closeFillEvenOddAndStroke()
                               throws IOException
IOException

endPath

public void endPath()
             throws IOException
IOException

clip

public void clip()
          throws IOException
IOException

clipEvenOdd

public void clipEvenOdd()
                 throws IOException
IOException

beginText

public void beginText()
               throws IOException
IOException

endText

public void endText()
             throws IOException
IOException

charSpace

public void charSpace(double charSpace)
               throws IOException
IOException

wordSpace

public void wordSpace(double wordSpace)
               throws IOException
IOException

scale

public void scale(double scale)
           throws IOException
IOException

leading

public void leading(double leading)
             throws IOException
IOException

font

public void font(PDFName fontName,
                 double size)
          throws IOException
IOException

rendering

public void rendering(int mode)
               throws IOException
IOException

rise

public void rise(double rise)
          throws IOException
IOException

text

public void text(double x,
                 double y)
          throws IOException
IOException

textLeading

public void textLeading(double x,
                        double y)
                 throws IOException
IOException

textMatrix

public void textMatrix(double a,
                       double b,
                       double c,
                       double d,
                       double e,
                       double f)
                throws IOException
IOException

textLine

public void textLine()
              throws IOException
IOException

show

public void show(String text)
          throws IOException
IOException

showLine

public void showLine(String text)
              throws IOException
IOException

showLine

public void showLine(double wordSpace,
                     double charSpace,
                     String text)
              throws IOException
IOException

show

public void show(Object[] array)
          throws IOException
IOException

glyph

public void glyph(double wx,
                  double wy)
           throws IOException
IOException

glyph

public void glyph(double wx,
                  double wy,
                  double llx,
                  double lly,
                  double urx,
                  double ury)
           throws IOException
IOException

colorSpace

public void colorSpace(PDFName colorSpace)
                throws IOException
IOException

colorSpaceStroke

public void colorSpaceStroke(PDFName colorSpace)
                      throws IOException
IOException

colorSpace

public void colorSpace(double[] color)
                throws IOException
IOException

colorSpaceStroke

public void colorSpaceStroke(double[] color)
                      throws IOException
IOException

colorSpace

public void colorSpace(double[] color,
                       PDFName name)
                throws IOException
IOException

colorSpaceStroke

public void colorSpaceStroke(double[] color,
                             PDFName name)
                      throws IOException
IOException

colorSpace

public void colorSpace(double g)
                throws IOException
IOException

colorSpaceStroke

public void colorSpaceStroke(double g)
                      throws IOException
IOException

colorSpace

public void colorSpace(double r,
                       double g,
                       double b)
                throws IOException
IOException

colorSpaceStroke

public void colorSpaceStroke(double r,
                             double g,
                             double b)
                      throws IOException
IOException

colorSpace

public void colorSpace(double c,
                       double m,
                       double y,
                       double k)
                throws IOException
IOException

colorSpaceStroke

public void colorSpaceStroke(double c,
                             double m,
                             double y,
                             double k)
                      throws IOException
IOException

shade

public void shade(PDFName name)
           throws IOException
IOException

image

public void image(RenderedImage image,
                  Color bkg)
           throws IOException
Image convenience function (see Table 4.35). Ouputs the data of the image using "DeviceRGB" colorspace, and the requested encodings

IOException

imageMask

public void imageMask(RenderedImage image)
               throws IOException
IOException

inlineImage

public void inlineImage(RenderedImage image,
                        Color bkg,
                        String[] encode)
                 throws IOException
Inline Image convenience function (see Table 4.39 and 4.40). Ouputs the data of the image using "DeviceRGB" colorspace, and the requested encodings

IOException

beginImage

public void beginImage()
                throws IOException
IOException

imageInfo

public void imageInfo(String key,
                      int number)
               throws IOException
IOException

imageInfo

public void imageInfo(String key,
                      PDFName name)
               throws IOException
IOException

imageInfo

public void imageInfo(String key,
                      Object[] array)
               throws IOException
IOException

openImageData

public ImageOutput openImageData(String[] encode)
                          throws IOException
IOException

closeImageData

public void closeImageData()
                    throws IOException
IOException

drawPath

public boolean drawPath(Shape s)
                 throws IOException
Draws the points of the shape using path construction operators. The path is neither stroked nor filled.

Returns:
true if even-odd winding rule should be used, false if non-zero winding rule should be used.
IOException

xObject

public void xObject(PDFName name)
             throws IOException
IOException

beginCompatibility

public void beginCompatibility()
                        throws IOException
IOException

endCompatibility

public void endCompatibility()
                      throws IOException
IOException

FreeHEP API
Version v1.2

Copyright © 2000-2003 FreeHEP, All Rights Reserved.