de.dante.dviware.type
Class DviPostamble

java.lang.Object
  extended byde.dante.dviware.type.AbstractDviCode
      extended byde.dante.dviware.type.DviPostamble
All Implemented Interfaces:
DviCode

public class DviPostamble
extends AbstractDviCode

This class represents the DVI instruction post and the contents up to the terminating post_post.

Version:
$Revision: 1.4 $
Author:
Gerd Neugebauer

Field Summary
 
Fields inherited from interface de.dante.dviware.type.DviCode
POP, PUSH, W0, X0, Y0, Z0
 
Constructor Summary
DviPostamble(int mag)
          Creates a new object.
 
Method Summary
 java.lang.String getName()
          Getter for the name f the DVI instruction.
 int mapFont(Font fnt, java.util.List list)
          Determine the font index and insert a font definition into the output list if required.
 void recognizePage(FixedDimen height, FixedDimen depth, FixedDimen width, int stacksize)
          See a page and remember everything needed to be written out at the end.
 void setBop(int bopPointer)
          Setter for the bop index.
 void setOffset(int pointer)
          Setter for the offset of the last bop instruction.
 int write(java.io.OutputStream stream)
          Write the code to the output stream.
 
Methods inherited from class de.dante.dviware.type.AbstractDviCode
opcode, opcodeSigned, variant, write2, write3, write4
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DviPostamble

public DviPostamble(int mag)
Creates a new object.

Parameters:
mag - the magnification factor in permille
Method Detail

getName

public java.lang.String getName()
Description copied from interface: DviCode
Getter for the name f the DVI instruction.

Returns:
the name of the DVI instruction
See Also:
DviCode.getName()

mapFont

public int mapFont(Font fnt,
                   java.util.List list)
Determine the font index and insert a font definition into the output list if required. As a side effect the font is remembered for writing the postamble.

Parameters:
fnt - the font to resolve
list - the list to add the font definition to
Returns:
the index in the font table to use

recognizePage

public void recognizePage(FixedDimen height,
                          FixedDimen depth,
                          FixedDimen width,
                          int stacksize)
See a page and remember everything needed to be written out at the end.

Parameters:
height - the height of the page
depth - the depth of the page
width - the width of the page
stacksize - the stack size needed to process the push and pop operations of the current page

setBop

public void setBop(int bopPointer)
Setter for the bop index.

Parameters:
bopPointer - the pointer to the last BOP

setOffset

public void setOffset(int pointer)
Setter for the offset of the last bop instruction.

Parameters:
pointer - the offset for the last bop instruction

write

public int write(java.io.OutputStream stream)
          throws java.io.IOException
Description copied from interface: DviCode
Write the code to the output stream.

Parameters:
stream - the target stream
Returns:
the number of bytes actually written
Throws:
java.io.IOException - in case of an error
See Also:
DviCode.write(java.io.OutputStream)