Class PDFGState
java.lang.Object
org.apache.fop.pdf.PDFObject
org.apache.fop.pdf.PDFGState
- All Implemented Interfaces:
CompressedObject, PDFWritable
Class representing a /ExtGState object.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PDFGStateDefault GState objectstatic final StringNonstroking Alpha (ca, PDF 1.4)static final StringAlpha Source Flag (AIS, PDF 1.4)static final StringStroking Alpha (CA, PDF 1.4)static final StringBlack generation (BG)static final StringBlack generation with default (BG2)static final StringBlend mode (BM, PDF 1.4)static final StringDash pattern (D)static final StringFlatness (FL)static final StringFont (Font)static final StringHalftone dictionary or stream (HT)static final StringHalftone phase (HTP, does not show up anymore in PDF 1.4)static final StringLine cap (LC)static final StringLine join (LJ)static final StringLine width (LW)static final StringMiter limit (ML)static final StringOverprint for fill (op)static final StringOverprint mode (OPM)static final StringOverprint for stroke (OP)static final StringRendering intent (RI)static final StringSmoothness (SM)static final StringSoft mask (SMask, PDF 1.4)static final StringStrike adjustment (SA)static final StringText Knockout Flag (TK, PDF 1.4)static final StringTransfer function (TR)static final StringTransfer function with default (TR2)static final StringUndercolor removal function (UCR)static final StringUndercolor removal function with default (UCR2)private intprivate Map -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds all values from a Map to this object.voidAdds all values from another GState object to this one.private voidappendVal(StringBuffer sb, String name) protected booleancontentEquals(PDFObject obj) Check if the other PDFObject has the same content as the current object.getName()Returns the name of this objectvoidsetAlpha(float val, boolean fill) Sets the alpha value.This method returns a String representation of the PDF object.Methods inherited from class PDFObject
encode, encodeBinaryToHexString, encodeString, encodeText, formatObject, getChildren, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, output, outputInline, referencePDF, setDocument, setObjectNumber, setObjectNumber, setObjectNumber, setParent, supportsObjectStream, toPDF
-
Field Details
-
GSTATE_LINE_WIDTH
-
GSTATE_LINE_CAP
-
GSTATE_LINE_JOIN
-
GSTATE_MITER_LIMIT
-
GSTATE_DASH_PATTERN
-
GSTATE_RENDERING_INTENT
-
GSTATE_OVERPRINT_STROKE
-
GSTATE_OVERPRINT_FILL
-
GSTATE_OVERPRINT_MODE
-
GSTATE_FONT
-
GSTATE_BLACK_GENERATION
-
GSTATE_BLACK_GENERATION2
-
GSTATE_UNDERCOLOR_REMOVAL
-
GSTATE_UNDERCOLOR_REMOVAL2
Undercolor removal function with default (UCR2)- See Also:
-
GSTATE_TRANSFER_FUNCTION
-
GSTATE_TRANSFER_FUNCTION2
-
GSTATE_HALFTONE_DICT
-
GSTATE_HALFTONE_PHASE
Halftone phase (HTP, does not show up anymore in PDF 1.4)- See Also:
-
GSTATE_FLATNESS
-
GSTATE_SMOOTHNESS
-
GSTATE_STRIKE_ADJ
-
GSTATE_BLEND_MODE
-
GSTATE_SOFT_MASK
-
GSTATE_ALPHA_STROKE
-
GSTATE_ALPHA_NONSTROKE
-
GSTATE_ALPHA_SOURCE_FLAG
-
GSTATE_TEXT_KNOCKOUT
-
DEFAULT
Default GState object -
values
-
objNum
private int objNum
-
-
Constructor Details
-
PDFGState
public PDFGState()
-
-
Method Details
-
getName
-
setAlpha
public void setAlpha(float val, boolean fill) Sets the alpha value.- Parameters:
val- alpha value (0.0 - 1.0)fill- True if alpha should be set for non-stroking operations, False if for stroking operations
-
addValues
Adds all values from another GState object to this one.- Parameters:
state- source object to copy from
-
addValues
Adds all values from a Map to this object.- Parameters:
vals- source object to copy from
-
toPDFString
This method returns a String representation of the PDF object. The result is normally converted/encoded to a byte array by toPDF(). Only use this method to implement the serialization if the object can be fully represented as text. If the PDF representation of the object contains binary content use toPDF() or output(OutputStream) instead. This applies to any object potentially containing a string object because string object are encrypted and therefore need to be binary.- Overrides:
toPDFStringin classPDFObject- Returns:
- String the String representation
-
appendVal
-
contentEquals
Check if the other PDFObject has the same content as the current object.Note: This function has a contract which is less binding than
Object.equals(Object). Whereas equals would require all values to be identical, this method is not required to check everything. In the case of PDFObjects, this means that the overriding function does not have to check forPDFObject.getObjectID().- Overrides:
contentEqualsin classPDFObject- Parameters:
obj- object to compare to.- Returns:
- true if the other object has the same content.
-