Package org.apache.fop.afp.modca
Class ImageObject
- All Implemented Interfaces:
Completable,Startable,Streamable
An IOCA Image Data Object
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.fop.afp.modca.AbstractAFPObject
AbstractAFPObject.Category, AbstractAFPObject.Type -
Field Summary
Fields inherited from class org.apache.fop.afp.modca.AbstractDataObject
factory, objectEnvironmentGroupFields inherited from class org.apache.fop.afp.modca.AbstractNamedAFPObject
nameFields inherited from class org.apache.fop.afp.modca.AbstractTripletStructuredObject
tripletsFields inherited from class org.apache.fop.afp.modca.AbstractAFPObject
LOG, SF_CLASS, SF_HEADER_LENGTH -
Constructor Summary
ConstructorsConstructorDescriptionImageObject(Factory factory, String name) Constructor for the image object with the specified name, the name must be a fixed length of eight characters. -
Method Summary
Modifier and TypeMethodDescriptionReturns the image segment object associated with this image object.voidsetCompression(byte compression) Sets the image compression.voidsetData(byte[] imageData) Set the data of the image.voidsetEncoding(byte encoding) Sets the image encoding.voidsetIDEColorModel(byte colorModel) Deprecated.voidsetIDESize(byte size) Sets the image IDE size.voidsetSubtractive(boolean subtractive) Deprecated.UseIDEStructureParameter.setSubtractive(boolean)instead.voidsetTransparencyMask(byte[] date) voidsetViewport(AFPDataObjectInfo dataObjectInfo) Sets the object view port (area position and size).protected voidHelper method to write the contents of the Object.protected voidwriteEnd(OutputStream os) Helper method to write the end of the Object.protected voidHelper method to write the start of the Object.Methods inherited from class org.apache.fop.afp.modca.AbstractDataObject
getObjectEnvironmentGroup, isComplete, isStarted, setComplete, setStartedMethods inherited from class org.apache.fop.afp.modca.AbstractNamedAFPObject
copySF, getName, getNameBytes, getNameLength, setName, toStringMethods inherited from class org.apache.fop.afp.modca.AbstractTripletStructuredObject
addTriplet, addTriplets, getFullyQualifiedName, getTripletDataLength, getTriplets, hasTriplet, hasTriplets, setComment, setFullyQualifiedName, setFullyQualifiedName, setObjectClassification, writeTripletsMethods inherited from class org.apache.fop.afp.modca.AbstractStructuredObject
writeToStreamMethods inherited from class org.apache.fop.afp.modca.AbstractAFPObject
copySF, truncate, writeChunksToStream, writeObjects
-
Constructor Details
-
ImageObject
Constructor for the image object with the specified name, the name must be a fixed length of eight characters.- Parameters:
factory- the resource managername- The name of the image.
-
-
Method Details
-
getImageSegment
Returns the image segment object associated with this image object.- Returns:
- the image segment
-
setViewport
Sets the object view port (area position and size).- Overrides:
setViewportin classAbstractDataObject- Parameters:
dataObjectInfo- the object area info
-
setEncoding
public void setEncoding(byte encoding) Sets the image encoding.- Parameters:
encoding- The image encoding.
-
setCompression
public void setCompression(byte compression) Sets the image compression.- Parameters:
compression- The image compression.
-
setIDESize
public void setIDESize(byte size) Sets the image IDE size.- Parameters:
size- The IDE size.
-
setIDEColorModel
public void setIDEColorModel(byte colorModel) Deprecated.UseIDEStructureParameter.setColorModel(byte)instead.Sets the image IDE color model.- Parameters:
colorModel- the IDE color model.
-
setSubtractive
public void setSubtractive(boolean subtractive) Deprecated.UseIDEStructureParameter.setSubtractive(boolean)instead.Set either additive or subtractive mode (used for ASFLAG).- Parameters:
subtractive- true for subtractive mode, false for additive mode
-
setData
public void setData(byte[] imageData) Set the data of the image.- Parameters:
imageData- the image data
-
setTransparencyMask
public void setTransparencyMask(byte[] date) -
writeStart
Helper method to write the start of the Object.- Overrides:
writeStartin classAbstractDataObject- Parameters:
os- The stream to write to- Throws:
IOException- throws an I/O exception if one occurred
-
writeContent
Helper method to write the contents of the Object.- Overrides:
writeContentin classAbstractDataObject- Parameters:
os- The stream to write to- Throws:
IOException- throws an I/O exception if one occurred
-
writeEnd
Helper method to write the end of the Object.- Overrides:
writeEndin classAbstractStructuredObject- Parameters:
os- The stream to write to- Throws:
IOException- an I/O exception if one occurred
-
IDEStructureParameter.setColorModel(byte)instead.