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
Modifier and TypeFieldDescriptionstatic final PDFGState
Default GState objectstatic final String
Nonstroking Alpha (ca, PDF 1.4)static final String
Alpha Source Flag (AIS, PDF 1.4)static final String
Stroking Alpha (CA, PDF 1.4)static final String
Black generation (BG)static final String
Black generation with default (BG2)static final String
Blend mode (BM, PDF 1.4)static final String
Dash pattern (D)static final String
Flatness (FL)static final String
Font (Font)static final String
Halftone dictionary or stream (HT)static final String
Halftone phase (HTP, does not show up anymore in PDF 1.4)static final String
Line cap (LC)static final String
Line join (LJ)static final String
Line width (LW)static final String
Miter limit (ML)static final String
Overprint for fill (op)static final String
Overprint mode (OPM)static final String
Overprint for stroke (OP)static final String
Rendering intent (RI)static final String
Smoothness (SM)static final String
Soft mask (SMask, PDF 1.4)static final String
Strike adjustment (SA)static final String
Text Knockout Flag (TK, PDF 1.4)static final String
Transfer function (TR)static final String
Transfer function with default (TR2)static final String
Undercolor removal function (UCR)static final String
Undercolor removal function with default (UCR2) -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds all values from a Map to this object.void
Adds all values from another GState object to this one.protected boolean
contentEquals
(PDFObject obj) Check if the other PDFObject has the same content as the current object.getName()
Returns the name of this objectvoid
setAlpha
(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:
toPDFString
in 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:
contentEquals
in classPDFObject
- Parameters:
obj
- object to compare to.- Returns:
- true if the other object has the same content.
-