|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DviProcessor
This interface describes a callback handler for DVI instructions. This refers to an abstract machine which translates the DVI file into some kind of printed representation.
| Method Summary | |
|---|---|
void |
bop(int off,
int[] c,
int p)
A DVI bop instruction has been encountered. |
void |
down(int off,
int a)
A DVI down instruction has been encountered. |
void |
eop(int off)
A DVI eop instruction has been encountered. |
void |
fnt(int off,
int k)
A DVI fnt instruction has been encountered. |
void |
fntDef(int off,
int k,
int c,
int s,
int d,
java.lang.String n)
A DVI fntDef instruction has been encountered. |
void |
nop(int off)
A DVI nop instruction has been encountered. |
void |
pop(int off)
A DVI pop instruction has been encountered. |
void |
post(int off,
int bop,
int num,
int den,
int mag,
int l,
int u,
int sp,
int tp)
A DVI post instruction has been encountered. |
void |
postPost(int off,
int bop,
int id)
Invoke the callback on a POST_POST instruction. |
void |
pre(int off,
int id,
int num,
int den,
int mag,
java.lang.String comment)
A DVI pre instruction has been encountered. |
void |
push(int off)
A DVI push instruction has been encountered. |
void |
putChar(int off,
int c)
A DVI put_char instruction has been encountered. |
void |
putRule(int off,
int a,
int b)
A DVI put_rule instruction has been encountered. |
void |
right(int off,
int b)
A DVI right instruction has been encountered. |
void |
setChar(int off,
int c)
A DVI set_char instruction has been encountered. |
void |
setRule(int off,
int a,
int b)
A DVI set_rule instruction has been encountered. |
void |
undef(int off,
int opcode,
java.io.InputStream stream)
A DVI undefined instruction has been encountered. |
void |
w(int off,
int b)
A DVI w instruction has been encountered. |
void |
w0(int off)
A DVI w0 instruction has been encountered. |
void |
x(int off,
int b)
A DVI x instruction has been encountered. |
void |
x0(int ptr)
A DVI x0 instruction has been encountered. |
void |
xxx(int off,
byte[] x)
A DVI xxx instruction has been encountered. |
void |
y(int off,
int a)
A DVI y instruction has been encountered. |
void |
y0(int ptr)
A DVI y0 instruction has been encountered. |
void |
z(int off,
int b)
A DVI z instruction has been encountered. |
void |
z0(int ptr)
A DVI z0 instruction has been encountered. |
| Method Detail |
|---|
void bop(int off,
int[] c,
int p)
off - the current byte position in the input streamc - the array of page number indicators. The array has length 10.
It is initialized from the count registers 0 to 9 at the time the page
is shipped out.p - the pointer to the previous bop instruction or -1
for the first page
void down(int off,
int a)
v ← v + 〈a〉
off - the current byte position in the input streama - the number of DVI units to move down. If negative then the
current position moves upwards.void eop(int off)
off - the current byte position in the input stream
void fnt(int off,
int k)
f ← 〈k〉
off - the current byte position in the input streamk - the new font number; this number is not negative
void fntDef(int off,
int k,
int c,
int s,
int d,
java.lang.String n)
off - the current byte position in the input streamk - the number of the fontc - length of the font areas - length of the font named - the font arean - the name of the fontvoid nop(int off)
off - the current byte position in the input streamvoid pop(int off)
The registers h, b, w, x, y, z are popped from the stack.
off - the current byte position in the input stream
void post(int off,
int bop,
int num,
int den,
int mag,
int l,
int u,
int sp,
int tp)
off - the current byte position in the input streambop - the index of the last BOP instructionnum - the numeratorden - the denominatormag - the magnificationl - the maximum page heightu - the maximum page widthsp - stack depthtp - number of pages
void postPost(int off,
int bop,
int id)
off - the offset in the file of this instructionbop - the index of the last BOP instructionid - the id of this DVI version. Usually this is 2.
void pre(int off,
int id,
int num,
int den,
int mag,
java.lang.String comment)
off - the current byte position in the input streamid - the id of this DVI version. Usually this is 2.num - the numeratorden - the denominatormag - the magnification in permillecomment - the comment stringvoid push(int off)
off - the current byte position in the input stream
void putChar(int off,
int c)
off - the current byte positionc - the number of the character to set
void putRule(int off,
int a,
int b)
off - the current byte position in the input streama - the widthb - the height
void right(int off,
int b)
h ← h + 〈b〉
The argument b is added to the horizontal position h. If b is positive then the horizontal position is moved rightward by the given number of DVI units. If b is negative this means a movement leftwards.
off - the current byte position in the input streamb - the distance to move in DVI units
void setChar(int off,
int c)
off - the current byte positionc - the number of the character to set
void setRule(int off,
int a,
int b)
off - the current byte positiona - the widthb - the height
void undef(int off,
int opcode,
java.io.InputStream stream)
off - the current byte positionopcode - the opcode encounteredstream - the input stream to read further bytes from
void w(int off,
int b)
The register w is assigned from the parameter of this instruction. Afterwards the register w is added to the horizontal position h.
off - the current byte position in the input streamb - the distance to add in DVI unitsvoid w0(int off)
h ← h + w
The register w is added to the horizontal position h.
off - the current byte position in the input stream
void x(int off,
int b)
x ← 〈b〉
h ← h + x
off - the current byte position in the input streamb - the distance to move in DVI unitsvoid x0(int ptr)
h ← h + x
The register x is added to the horizontal position h.
ptr - the current byte position in the input stream
void xxx(int off,
byte[] x)
off - the current byte position in the input streamx - the array of bytes carrying the content
void y(int off,
int a)
y ← 〈a〉
v ← v + y
off - the current byte position in the input streama - the distance to movevoid y0(int ptr)
Set v ← v + y; thus the current position is moved down y DVI units.
ptr - the current byte position in the input stream
void z(int off,
int b)
z ← 〈a〉
v ← v + z
off - the current byte position in the input streamb - the distance to movevoid z0(int ptr)
v ← v + z
ptr - the current byte position in the input stream
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||