public class ExtGState extends Dictionary
This class represents an External Graphics State (ExtGState) object. An ExtGState is an extension of the individual operators which sets a graphics state, q, Q, cm, w, J, j, M, d, ri, i and gs. The gs operand points to a named ExtGState resource which contains a dictionary whose contents specify the values of one or more graphics state parameters. All the entries in this dictionary are summarized in the following table. An ExtGSate dictionary does not need to specify all entries and the results of gs operations are cumulative.
| Key | Type | Desription |
| Type | name | (Optional) The type of PDF object that this dictionary describes; must beExtGState for a graphics state parameter dictionary. |
| LW | number | (Optional; PDF 1.3) The line width |
| integer |
(Optional; PDF 1.3) The line cap style. |
|
| LJ | integer | (Optional; PDF 1.3) The line join styl. |
| ML | number | (Optional; PDF 1.3) The miter limit. |
| D | array | (Optional; PDF 1.3) The line dash pattern, expressed as an array of the form [dashArray dashPhase], where dashArray is itself an array and dashPhase is an integer |
| RI | name | (Optional; PDF 1.3) The name of the rendering intent. |
| OP | boolean | (Optional) A flag specifying whether to apply overprint. In PDF 1.2 and earlier, there is a single overprint parameter that applies to all painting operations. Beginning with PDF 1.3, there are two separate overprint parameters: one for stroking and one for all other painting operations. Specifying an OP entry sets both parameters unless there is also an op entry in the same graphics state parameter dictionary, in which case the OP entry sets only the overprint parameter for stroking. |
| op | boolean | (Optional; PDF 1.3) A flag specifying whether to apply overprint for painting operations other than stroking. If this entry is absent, the OP entry, if any, sets this parameter. |
| OPM | integer | (Optional; PDF 1.3) The overprint mode |
| Font | array | (Optional; PDF 1.3) An array of the form [font size], where font is an indirect reference to a font dictionary and size is a number expressed in text space units. These two objects correspond to the operands of the Tf operator; however, the first operand is an indirect object reference instead of a resource name. |
| BG | function | (Optional) The black-generation function, which maps the interval [0.0 1.0] to the interval [0.0 1.0] |
| BG2 | function or name | (Optional; PDF 1.3) Same as BG except that the value may also be the name Default, denoting the black-generation function that was in effect at the start of the page. If both BG and BG2 are present in the same graphics state parameter dictionary, BG2 takes precedence. |
| UCR | function | (Optional) The undercolor-removal function, which maps the interval [0.0 1.0] to the interval [?1.0 1.0] (see Section 6.2.3, "Conversion from DeviceRGB to DeviceCMYK"). |
| UCR2 | function or name | (Optional; PDF 1.3) Same as UCR except that the value may also be the name Default, denoting the undercolor-removal function that was in effect at the start of the page. If both UCR and UCR2 are present in the same graphics state parameter dictionary, UCR2 takes precedence. |
| TR | function, array, or name | (Optional) The transfer function, which maps the interval [0.0 1.0] to the interval [0.0 1.0] (see Section 6.3, "Transfer Functions"). The value is either a single function (which applies to all process colorants) or an array of four functions (which apply to the process colorants individually). The name Identity may be used to represent the identity function. |
| TR2 | function, array, or name | (Optional; PDF 1.3) Same as TR except that the value may also be the name Default, denoting the transfer function that was in effect at the start of the page. If both TR and TR2 are present in the same graphics state parameter dictionary, TR2 takes precedence. |
| HT | dictionary, stream, or name | (Optional) The halftone dictionary or stream (see Section 6.4, "Halftones") or the name Default, denoting the halftone that was in effect at the start of the page. |
| FL | number | (Optional; PDF 1.3) The flatness tolerance |
| SM | number | (Optional; PDF 1.3) The smoothness tolerance |
| SA | boolean | (Optional) A flag specifying whether to apply automatic stroke adjustment (see Section 6.5.4, "Automatic Stroke Adjustment"). |
| BM | name or array | (Optional; PDF 1.4) The current blend mode to be used in the transparent imaging model. |
| SMask | dictionary or name | (Optional; PDF 1.4) The current soft mask, specifying the mask shape or mask opacity values to be used in the transparent imaging model |
| CA | number | (Optional; PDF 1.4) The current stroking alpha constant, specifying the constant shape or constant opacity value to be used for stroking operations in the transparent imaging model. |
| ca | number | (Optional; PDF 1.4) Same as CA, but for nonstroking operations. |
An ExtGState object is is referenced by a named resource of
the type ExtGSate. The Resources class method getExtGState() will try and
return an ExtGState object of the specified name. If successful
the ExtGState object should be concatenated with the current
GraphicsState object.
Note: many of the external graphics state parameters have not
yet been been implemented in the context of the content parser.
The GraphicsSate object and other relevant rendering pipeline
classes can be updated as needed.
| Modifier and Type | Field and Description |
|---|---|
static Name |
AIS_KEY |
static Name |
BM_KEY |
static Name |
BM_MULTIPLY_VALUE |
static Name |
BM_SCREEN_VALUE |
static Name |
ca_KEY |
static Name |
CA_KEY |
static Name |
D_KEY |
static Name |
LC_KEY |
static Name |
LJ_KEY |
static Name |
LW_KEY |
static Name |
ML_KEY |
static Name |
op_KEY |
static Name |
OP_KEY |
static Name |
OPM_KEY |
static Name |
SMASK_KEY |
entries, FORM_TYPE_KEY, inited, isDeleted, isNew, LENGTH_KEY, library, SUBTYPE_KEY, TYPE_KEY| Constructor and Description |
|---|
ExtGState(Library library,
java.util.HashMap graphicsState)
Creates a a new Graphics State object.
|
| Modifier and Type | Method and Description |
|---|---|
Name |
getBlendingMode()
Gets the blending mode assigned to the GS.
|
java.lang.Number |
getLineCapStyle()
Gets the line cap style specified by the external graphics state.
|
java.util.List |
getLineDashPattern()
Gets the line dash pattern specified by the external graphics state.
|
java.lang.Number |
getLineJoinStyle()
Gets the line join style specified by the external graphics state.
|
java.lang.Number |
getLineWidth()
Gets the line width specified by the external graphics state.
|
java.lang.Number |
getNonStrokingAlphConstant()
Gets the non-stroking alpha constant specified by the external graphics state.
|
java.lang.Boolean |
getOverprint()
An optional flag specifying whether to apply overprint.
|
java.lang.Boolean |
getOverprintFill()
An optional flag specifying whether to apply overprint for
painting operations other than stroking.
|
int |
getOverprintMode()
The overprint mode
|
SoftMask |
getSMask() |
java.lang.Number |
getStrokingAlphConstant()
Gets the stroking alpha constant specified by the external graphics state.
|
boolean |
ignoreBlending() |
getEntries, getFloat, getInt, getLibrary, getNumber, getObject, getPObjectReference, init, isDeleted, isNew, setDeleted, setNew, setPObjectReference, toStringpublic static final Name SMASK_KEY
public static final Name LW_KEY
public static final Name LC_KEY
public static final Name LJ_KEY
public static final Name ML_KEY
public static final Name CA_KEY
public static final Name ca_KEY
public static final Name BM_KEY
public static final Name OP_KEY
public static final Name op_KEY
public static final Name OPM_KEY
public static final Name D_KEY
public static final Name AIS_KEY
public static final Name BM_MULTIPLY_VALUE
public static final Name BM_SCREEN_VALUE
public ExtGState(Library library, java.util.HashMap graphicsState)
library - document object librarygraphicsState - dictionary containing entries from teh graphcis
state parameters dictionary.public boolean ignoreBlending()
public java.lang.Number getLineWidth()
public java.lang.Number getLineCapStyle()
public Name getBlendingMode()
public java.lang.Number getLineJoinStyle()
public java.util.List getLineDashPattern()
public java.lang.Number getStrokingAlphConstant()
public java.lang.Number getNonStrokingAlphConstant()
public java.lang.Boolean getOverprint()
public java.lang.Boolean getOverprintFill()
public int getOverprintMode()
public SoftMask getSMask()