Package org.apache.fop.afp.goca
Class AbstractGraphicsCoord
- java.lang.Object
-
- org.apache.fop.afp.modca.AbstractAFPObject
-
- org.apache.fop.afp.goca.AbstractGraphicsDrawingOrder
-
- org.apache.fop.afp.goca.AbstractGraphicsCoord
-
- All Implemented Interfaces:
Streamable
,StructuredData
- Direct Known Subclasses:
GraphicsBox
,GraphicsCharacterString
,GraphicsFillet
,GraphicsFullArc
,GraphicsLine
,GraphicsSetArcParameters
,GraphicsSetCurrentPosition
public abstract class AbstractGraphicsCoord extends AbstractGraphicsDrawingOrder
A base class encapsulating the structure of coordinate based GOCA objects
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.fop.afp.modca.AbstractAFPObject
AbstractAFPObject.Category, AbstractAFPObject.Type
-
-
Field Summary
Fields Modifier and Type Field Description protected int[]
coords
array of x/y coordinatesprotected boolean
relative
if true, then uses relative drawing order-
Fields inherited from class org.apache.fop.afp.modca.AbstractAFPObject
LOG, SF_CLASS, SF_HEADER_LENGTH
-
-
Constructor Summary
Constructors Constructor Description AbstractGraphicsCoord(int[] coords)
ConstructorAbstractGraphicsCoord(int[] coords, boolean relative)
ConstructorAbstractGraphicsCoord(int x, int y)
ConstructorAbstractGraphicsCoord(int x1, int y1, int x2, int y2)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addCoords(byte[] data, int fromIndex)
Adds the coordinates to the structured field dataint
getDataLength()
Returns the data length of this structured fieldprotected boolean
isRelative()
Returns true if this is a relative drawing orderjava.lang.String
toString()
void
writeToStream(java.io.OutputStream os)
DataStream objects must implement the writeToStream() method to write its data to the given OutputStream-
Methods inherited from class org.apache.fop.afp.goca.AbstractGraphicsDrawingOrder
getName
-
Methods inherited from class org.apache.fop.afp.modca.AbstractAFPObject
copySF, copySF, truncate, writeChunksToStream, writeObjects
-
-
-
-
Constructor Detail
-
AbstractGraphicsCoord
public AbstractGraphicsCoord(int[] coords)
Constructor- Parameters:
coords
- the x/y coordinates for this object
-
AbstractGraphicsCoord
public AbstractGraphicsCoord(int[] coords, boolean relative)
Constructor- Parameters:
coords
- the x/y coordinates for this objectrelative
- true if relative drawing order
-
AbstractGraphicsCoord
public AbstractGraphicsCoord(int x, int y)
Constructor- Parameters:
x
- the x coordinate for this objecty
- the y coordinate for this object
-
AbstractGraphicsCoord
public AbstractGraphicsCoord(int x1, int y1, int x2, int y2)
Constructor- Parameters:
x1
- the x1 coordinate for this objecty1
- the y1 coordinate for this objectx2
- the x2 coordinate for this objecty2
- the y2 coordinate for this object
-
-
Method Detail
-
getDataLength
public int getDataLength()
Returns the data length of this structured field- Returns:
- the data length of this structured field
-
writeToStream
public void writeToStream(java.io.OutputStream os) throws java.io.IOException
DataStream objects must implement the writeToStream() method to write its data to the given OutputStream- Parameters:
os
- the outputsteam stream- Throws:
java.io.IOException
- an I/O exception of some sort has occurred.
-
addCoords
protected void addCoords(byte[] data, int fromIndex)
Adds the coordinates to the structured field data- Parameters:
data
- the structured field datafromIndex
- the start index
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
isRelative
protected boolean isRelative()
Returns true if this is a relative drawing order- Returns:
- true if this is a relative drawing order
-
-