org.freehep.graphicsio.pdf
Class PDFPaintDelayQueue

java.lang.Object
  extended by org.freehep.graphicsio.pdf.PDFPaintDelayQueue

public class PDFPaintDelayQueue
extends java.lang.Object

Delay Paint objects (gradient/texture, not color) for writing pattern/shading/function dictionaries to the pdf file when the pageStream is complete.
TODO: - reuse pattern dictionaries if possible - cyclic function not working yet (ps calculation)

Version:
$Id: PDFPaintDelayQueue.java 10270 2007-01-09 18:18:57Z duns $
Author:
Simon Fischer

Constructor Summary
PDFPaintDelayQueue(PDFWriter pdf, PDFImageDelayQueue imageDelayQueue)
          Don't forget to call setPageMatrix().
 
Method Summary
protected  void addCyclicFunction(java.lang.String functionRef, double[] c0, double[] c1, double[] dom)
          Writes a type 4 (PostScript calculator) function that describes a triangle function to the pdf file.
 int addPatterns()
          Adds all names to the dictionary which should be the value of the resources dicionrary's /Pattern entry.
 PDFName delayPaint(java.awt.Paint paint, java.awt.geom.AffineTransform transform, java.lang.String writeAs)
           
 void processAll()
          Creates a stream for every delayed image.
 void setPageMatrix(java.awt.geom.AffineTransform t)
          Call this method in order to inform this class about the transformation that is necessary to map the pattern's coordinate space to the default coordinate system of the parent's content stream (in our case the flipping of the page).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PDFPaintDelayQueue

public PDFPaintDelayQueue(PDFWriter pdf,
                          PDFImageDelayQueue imageDelayQueue)
Don't forget to call setPageMatrix().

Method Detail

setPageMatrix

public void setPageMatrix(java.awt.geom.AffineTransform t)
Call this method in order to inform this class about the transformation that is necessary to map the pattern's coordinate space to the default coordinate system of the parent's content stream (in our case the flipping of the page).


delayPaint

public PDFName delayPaint(java.awt.Paint paint,
                          java.awt.geom.AffineTransform transform,
                          java.lang.String writeAs)

processAll

public void processAll()
                throws java.io.IOException
Creates a stream for every delayed image.

Throws:
java.io.IOException

addPatterns

public int addPatterns()
                throws java.io.IOException
Adds all names to the dictionary which should be the value of the resources dicionrary's /Pattern entry.

Throws:
java.io.IOException

addCyclicFunction

protected void addCyclicFunction(java.lang.String functionRef,
                                 double[] c0,
                                 double[] c1,
                                 double[] dom)
                          throws java.io.IOException
Writes a type 4 (PostScript calculator) function that describes a triangle function to the pdf file.

Throws:
java.io.IOException


Copyright © 2000-2007 FreeHEP. All Rights Reserved.