public abstract class AbstractGraphicsCoord extends AbstractGraphicsDrawingOrder
AbstractAFPObject.Category, AbstractAFPObject.Type
Modifier and Type | Field and Description |
---|---|
protected int[] |
coords
array of x/y coordinates
|
protected boolean |
relative
if true, then uses relative drawing order
|
LOG, SF_CLASS, SF_HEADER_LENGTH
Constructor and Description |
---|
AbstractGraphicsCoord(int[] coords)
Constructor
|
AbstractGraphicsCoord(int[] coords,
boolean relative)
Constructor
|
AbstractGraphicsCoord(int x,
int y)
Constructor
|
AbstractGraphicsCoord(int x1,
int y1,
int x2,
int y2)
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected void |
addCoords(byte[] data,
int fromIndex)
Adds the coordinates to the structured field data
|
int |
getDataLength()
Returns the data length of this structured field
|
protected boolean |
isRelative()
Returns true if this is a relative drawing order
|
String |
toString() |
void |
writeToStream(OutputStream os)
DataStream objects must implement the writeToStream()
method to write its data to the given OutputStream
|
getName
copySF, copySF, truncate, writeChunksToStream, writeObjects
protected int[] coords
protected boolean relative
public AbstractGraphicsCoord(int[] coords)
coords
- the x/y coordinates for this objectpublic AbstractGraphicsCoord(int[] coords, boolean relative)
coords
- the x/y coordinates for this objectrelative
- true if relative drawing orderpublic AbstractGraphicsCoord(int x, int y)
x
- the x coordinate for this objecty
- the y coordinate for this objectpublic AbstractGraphicsCoord(int x1, int y1, int x2, int y2)
x1
- the x1 coordinate for this objecty1
- the y1 coordinate for this objectx2
- the x2 coordinate for this objecty2
- the y2 coordinate for this objectpublic int getDataLength()
public void writeToStream(OutputStream os) throws IOException
os
- the outputsteam streamIOException
- an I/O exception of some sort has occurred.protected void addCoords(byte[] data, int fromIndex)
data
- the structured field datafromIndex
- the start indexprotected boolean isRelative()
Copyright © 2025 Apache Software Foundation. All rights reserved.