org.extex.backend.documentWriter.postscript.converter
Class Ps

java.lang.Object
  extended by org.extex.backend.documentWriter.postscript.converter.Ps

public class Ps
extends java.lang.Object

This utility class provides some routines for writing PostScript code.

Version:
$Revision: 6447 $
Author:
Gerd Neugebauer

Constructor Summary
Ps()
          Creates a new object.
 
Method Summary
protected  void drawBox(java.io.PrintStream out, Node node, FixedDimen x, FixedDimen y)
          Draw a little box showing the dimensions of the node.
protected  void drawGrayBox(java.io.PrintStream out, Node node, FixedDimen x, FixedDimen y)
          Draw a little box showing the dimensions of the node.
 void eop(java.io.PrintStream out)
          Produce a eop hook invocation.
 void putText(java.io.PrintStream out, java.lang.CharSequence text, Dimen x)
          Put some text at a certain position given by x coordinate only.
 void putText(java.io.PrintStream out, java.lang.CharSequence text, Dimen x, Dimen y)
          Put some text at a certain position.
 void rule(java.io.PrintStream out, FixedDimen width, FixedDimen height, FixedDimen x, FixedDimen y)
          Produce a filled rectangle.
 void setgray(java.io.PrintStream out, GrayscaleColor gray)
          Produce a PS setgray instruction.
 void setrgb(java.io.PrintStream out, RgbColor rgb)
          Produce a PS setrgbcolor instruction.
 void writeDict(java.io.PrintStream out)
          Write the dictionary of collected code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ps

public Ps()
Creates a new object.

Method Detail

drawBox

protected void drawBox(java.io.PrintStream out,
                       Node node,
                       FixedDimen x,
                       FixedDimen y)
Draw a little box showing the dimensions of the node.

Parameters:
out - the target string buffer
node - the node to draw
x - the x coordinate
y - the y coordinate

drawGrayBox

protected void drawGrayBox(java.io.PrintStream out,
                           Node node,
                           FixedDimen x,
                           FixedDimen y)
Draw a little box showing the dimensions of the node.

Parameters:
out - the target string buffer
node - the node to draw
x - the x coordinate
y - the y coordinate

eop

public void eop(java.io.PrintStream out)
Produce a eop hook invocation.

Parameters:
out - the output stream

putText

public void putText(java.io.PrintStream out,
                    java.lang.CharSequence text,
                    Dimen x,
                    Dimen y)
Put some text at a certain position.

Parameters:
out - the output stream
text - the text
x - the x coordinate
y - the y coordinate

putText

public void putText(java.io.PrintStream out,
                    java.lang.CharSequence text,
                    Dimen x)
Put some text at a certain position given by x coordinate only.

Parameters:
out - the output stream
text - the text
x - the x coordinate

rule

public void rule(java.io.PrintStream out,
                 FixedDimen width,
                 FixedDimen height,
                 FixedDimen x,
                 FixedDimen y)
Produce a filled rectangle.

Parameters:
out - the output stream
width - the width of the rule
height - the height of the rule
x - the x coordinate
y - the y coordinate

setgray

public void setgray(java.io.PrintStream out,
                    GrayscaleColor gray)
Produce a PS setgray instruction.

Parameters:
out - the output stream
gray - the color

setrgb

public void setrgb(java.io.PrintStream out,
                   RgbColor rgb)
Produce a PS setrgbcolor instruction.

Parameters:
out - the output stream
rgb - the color

writeDict

public void writeDict(java.io.PrintStream out)
               throws java.io.IOException
Write the dictionary of collected code.

Parameters:
out - the output stream
Throws:
java.io.IOException - in case of an I/O error