org.apache.fop.render.afp.modca
Class PresentationTextData
public class PresentationTextData
Presentation text data contains the graphic characters and the control
sequences necessary to position the characters within the object space. The
data consists of: - graphic characters to be presented - control sequences
that position them - modal control sequences that adjust the positions by
small amounts - other functions causing text to be presented with differences
in appearance.
The graphic characters are expected to conform to a coded font representation
so that they can be translated from the code point in the object data to the
character in the coded font. The units of measure for linear displacements
are derived from the PresentationTextDescriptor or from the hierarchical
defaults.
In addition to graphic character code points, Presentation Text data can
contain embedded control sequences. These are strings of two or more bytes
which signal an alternate mode of processing for the content of the current
Presentation Text data.
PresentationTextData() - Default constructor for the PresentationTextData.
|
PresentationTextData(boolean controlInd) - Constructor for the PresentationTextData, the boolean flag indicate
whether the control sequence prefix should be set to indicate the start
of a new control sequence.
|
void | createLineData(int x1, int y1, int x2, int y2, int thickness, int orientation, Color col) - Drawing of lines using the starting and ending coordinates, thickness and
colour arguments.
|
void | createTextData(int fontNumber, int x, int y, int orientation, Color col, int vsci, int ica, byte[] data) - Create the presentation text data for the byte array of data.
|
void | endControlSequence() - A control sequence is a sequence of bytes that specifies a control
function.
|
void | writeDataStream(OutputStream os) - Accessor method to write the AFP datastream for
the text data.
|
PresentationTextData
public PresentationTextData()
Default constructor for the PresentationTextData.
PresentationTextData
public PresentationTextData(boolean controlInd)
Constructor for the PresentationTextData, the boolean flag indicate
whether the control sequence prefix should be set to indicate the start
of a new control sequence.
controlInd
- The control sequence indicator.
createLineData
public void createLineData(int x1,
int y1,
int x2,
int y2,
int thickness,
int orientation,
Color col)
throws MaximumSizeExceededException
Drawing of lines using the starting and ending coordinates, thickness and
colour arguments.
x1
- The starting X coordinate.y1
- The starting Y coordinate.x2
- The ending X coordinate.y2
- The ending Y coordinate.thickness
- The line thickness.orientation
- The orientation of the text data.col
- The text color.
createTextData
public void createTextData(int fontNumber,
int x,
int y,
int orientation,
Color col,
int vsci,
int ica,
byte[] data)
throws MaximumSizeExceededException
Create the presentation text data for the byte array of data.
fontNumber
- The font resource identifier.x
- The x coordinate for the text data.y
- The y coordinate for the text data.orientation
- The orientation of the text data.col
- The text color.vsci
- The variable space character increment.ica
- The inter character adjustment.data
- The text data to be created.
endControlSequence
public void endControlSequence()
throws MaximumSizeExceededException
A control sequence is a sequence of bytes that specifies a control
function. A control sequence consists of a control sequence introducer
and zero or more parameters. The control sequence can extend multiple
presentation text data objects, but must eventually be terminated. This
method terminates the control sequence.
writeDataStream
public void writeDataStream(OutputStream os)
throws IOException
Accessor method to write the AFP datastream for
the text data.
- writeDataStream in interface AbstractAFPObject
os
- The stream to write to
Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.