Package org.apache.fop.pdf
Class PDFGState
java.lang.Object
org.apache.fop.pdf.PDFObject
org.apache.fop.pdf.PDFGState
- All Implemented Interfaces:
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) -
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.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 org.apache.fop.pdf.PDFObject
encode, encodeBinaryToHexString, encodeString, encodeText, formatObject, getChildren, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, output, outputInline, referencePDF, setDocument, setObjectNumber, setObjectNumber, setObjectNumber, setParent, toPDF
-
Field Details
-
GSTATE_LINE_WIDTH
Line width (LW)- See Also:
-
GSTATE_LINE_CAP
Line cap (LC)- See Also:
-
GSTATE_LINE_JOIN
Line join (LJ)- See Also:
-
GSTATE_MITER_LIMIT
Miter limit (ML)- See Also:
-
GSTATE_DASH_PATTERN
Dash pattern (D)- See Also:
-
GSTATE_RENDERING_INTENT
Rendering intent (RI)- See Also:
-
GSTATE_OVERPRINT_STROKE
Overprint for stroke (OP)- See Also:
-
GSTATE_OVERPRINT_FILL
Overprint for fill (op)- See Also:
-
GSTATE_OVERPRINT_MODE
Overprint mode (OPM)- See Also:
-
GSTATE_FONT
Font (Font)- See Also:
-
GSTATE_BLACK_GENERATION
Black generation (BG)- See Also:
-
GSTATE_BLACK_GENERATION2
Black generation with default (BG2)- See Also:
-
GSTATE_UNDERCOLOR_REMOVAL
Undercolor removal function (UCR)- See Also:
-
GSTATE_UNDERCOLOR_REMOVAL2
Undercolor removal function with default (UCR2)- See Also:
-
GSTATE_TRANSFER_FUNCTION
Transfer function (TR)- See Also:
-
GSTATE_TRANSFER_FUNCTION2
Transfer function with default (TR2)- See Also:
-
GSTATE_HALFTONE_DICT
Halftone dictionary or stream (HT)- See Also:
-
GSTATE_HALFTONE_PHASE
Halftone phase (HTP, does not show up anymore in PDF 1.4)- See Also:
-
GSTATE_FLATNESS
Flatness (FL)- See Also:
-
GSTATE_SMOOTHNESS
Smoothness (SM)- See Also:
-
GSTATE_STRIKE_ADJ
Strike adjustment (SA)- See Also:
-
GSTATE_BLEND_MODE
Blend mode (BM, PDF 1.4)- See Also:
-
GSTATE_SOFT_MASK
Soft mask (SMask, PDF 1.4)- See Also:
-
GSTATE_ALPHA_STROKE
Stroking Alpha (CA, PDF 1.4)- See Also:
-
GSTATE_ALPHA_NONSTROKE
Nonstroking Alpha (ca, PDF 1.4)- See Also:
-
GSTATE_ALPHA_SOURCE_FLAG
Alpha Source Flag (AIS, PDF 1.4)- See Also:
-
GSTATE_TEXT_KNOCKOUT
Text Knockout Flag (TK, PDF 1.4)- See Also:
-
DEFAULT
Default GState object
-
-
Constructor Details
-
PDFGState
public PDFGState()
-
-
Method Details
-
getName
Returns the name of this object- Returns:
- the name
-
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
-
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.
-