|
fop 2.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.pdf.PDFObject
org.apache.fop.pdf.PDFDictionary
org.apache.fop.pdf.PDFResources
public class PDFResources
Class representing a /Resources object. /Resources object contain a list of references to the fonts, patterns, shadings, etc., for the document.
Field Summary | |
---|---|
protected java.util.Map<org.apache.fop.pdf.PDFResources.LazyName,PDFColorSpace> |
colorSpaces
Map of color spaces (key: color space name) |
protected java.util.Set<PDFResourceContext> |
contexts
|
protected java.util.Map<java.lang.String,PDFDictionary> |
fonts
/Font objects keyed by their internal name |
protected java.util.Map<java.lang.String,PDFICCBasedColorSpace> |
iccColorSpaces
Map of ICC color spaces (key: ICC profile description) |
protected java.util.Map<java.lang.String,PDFReference> |
properties
Named properties |
protected java.util.Set<PDFXObject> |
xObjects
Set of XObjects |
Fields inherited from class org.apache.fop.pdf.PDFDictionary |
---|
entries, order |
Fields inherited from class org.apache.fop.pdf.PDFObject |
---|
log |
Constructor Summary | |
---|---|
PDFResources(PDFDocument doc)
create a /Resources object. |
Method Summary | |
---|---|
void |
addColorSpace(PDFColorSpace colorSpace)
Add a ColorSpace dictionary to the resources. |
void |
addContext(PDFResourceContext c)
|
void |
addFont(PDFFont font)
add font object to resources list. |
void |
addFont(java.lang.String name,
PDFDictionary font)
|
void |
addFonts(PDFDocument doc,
FontInfo fontInfo)
Add the fonts in the font info to this PDF document's Font Resources. |
void |
addProperty(java.lang.String name,
PDFReference property)
Add a named property. |
void |
addXObject(PDFXObject xObject)
Add an XObject to the resources. |
void |
createFontsAsObj()
|
void |
getChildren(java.util.Set<PDFObject> children)
|
PDFColorSpace |
getColorSpace(PDFName name)
Returns a color space by name. |
PDFICCBasedColorSpace |
getICCColorSpaceByProfileName(java.lang.String desc)
Returns a ICCBased color space by profile name. |
PDFResources |
getParentResources()
|
PDFReference |
getProperty(java.lang.String name)
Get a named property. |
int |
output(java.io.OutputStream stream)
Write the PDF represention of this object |
void |
setParentResources(PDFResources p)
|
Methods inherited from class org.apache.fop.pdf.PDFDictionary |
---|
containsKey, get, getChildren, keySet, put, put, remove, writeDictionary |
Methods inherited from class org.apache.fop.pdf.PDFObject |
---|
contentEquals, encode, encodeBinaryToHexString, encodeString, encodeText, formatObject, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, outputInline, referencePDF, setDocument, setObjectNumber, setObjectNumber, setObjectNumber, setParent, toPDF, toPDFString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Map<java.lang.String,PDFDictionary> fonts
protected java.util.Set<PDFXObject> xObjects
protected java.util.Map<org.apache.fop.pdf.PDFResources.LazyName,PDFColorSpace> colorSpaces
protected java.util.Map<java.lang.String,PDFICCBasedColorSpace> iccColorSpaces
protected java.util.Map<java.lang.String,PDFReference> properties
protected java.util.Set<PDFResourceContext> contexts
Constructor Detail |
---|
public PDFResources(PDFDocument doc)
Method Detail |
---|
public void addContext(PDFResourceContext c)
public void setParentResources(PDFResources p)
public PDFResources getParentResources()
public void addFont(PDFFont font)
font
- the PDFFont to addpublic void addFont(java.lang.String name, PDFDictionary font)
public void createFontsAsObj()
public void addFonts(PDFDocument doc, FontInfo fontInfo)
doc
- PDF document to add fonts tofontInfo
- font info object to get font information frompublic void addXObject(PDFXObject xObject)
xObject
- the XObject to addpublic void addColorSpace(PDFColorSpace colorSpace)
colorSpace
- the color spacepublic PDFICCBasedColorSpace getICCColorSpaceByProfileName(java.lang.String desc)
desc
- the name of the color space
public PDFColorSpace getColorSpace(PDFName name)
name
- the name of the color space
public void addProperty(java.lang.String name, PDFReference property)
name
- name of propertyproperty
- reference to property valuepublic PDFReference getProperty(java.lang.String name)
name
- name of propertypublic int output(java.io.OutputStream stream) throws java.io.IOException
PDFDictionary
output
in class PDFDictionary
stream
- the stream to write the PDF to
java.io.IOException
- if there is an error writing to the streampublic void getChildren(java.util.Set<PDFObject> children)
getChildren
in class PDFDictionary
|
fop 2.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |