Class PDExtendedGraphicsState
java.lang.Object
org.apache.pdfbox.pdmodel.graphics.PDExtendedGraphicsState
- All Implemented Interfaces:
COSObjectable
This class represents the graphics state dictionary that is stored in the PDF document.
The PDGraphicsStateValue holds the current runtime values as a stream is being executed.
- Version:
- $Revision: 1.5 $
- Author:
- Ben Litchfield
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Rendering intent constants, see PDF Reference 1.5 Section 4.5.4 Rendering Intents.static final String
Rendering intent constants, see PDF Reference 1.5 Section 4.5.4 Rendering Intents.static final String
Rendering intent constants, see PDF Reference 1.5 Section 4.5.4 Rendering Intents.static final String
Rendering intent constants, see PDF Reference 1.5 Section 4.5.4 Rendering Intents. -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor, creates blank graphics state.PDExtendedGraphicsState
(COSDictionary dictionary) Create a graphics state from an existing dictionary. -
Method Summary
Modifier and TypeMethodDescriptionvoid
This will implement the gs operator.boolean
This will get the alpha source flag.boolean
This will get the automatic stroke adjustment flag.This will get the underlying dictionary that this class acts on.Convert this standard java object to a COS object.This will get the flatness tolerance.This will get the font setting of the graphics state.int
This will get the line cap style.This will get the dash pattern.int
This will get the line join style.This will get the line width.This will get the miter limit.This will get the non stroking alpha constant.boolean
This will get the overprint control for non stroking operations.This will get the overprint control mode.This will get the rendering intent.This will get the smothness tolerance.This will get the stroking alpha constant.boolean
This will get the overprint control.boolean
This will get the text knockout flag.void
setAlphaSourceFlag
(boolean alpha) This will get the alpha source flag.void
setAutomaticStrokeAdjustment
(boolean sa) This will get the automatic stroke adjustment flag.void
setFlatnessTolerance
(Float flatness) This will get the flatness tolerance.void
This will set the font setting for this graphics state.void
setLineCapStyle
(int style) This will set the line cap style for the graphics state.void
setLineDashPattern
(PDLineDashPattern dashPattern) This will set the dash pattern for the graphics state.void
setLineJoinStyle
(int style) This will set the line join style.void
setLineWidth
(Float width) This will set the line width.void
setMiterLimit
(Float miterLimit) This will set the miter limit for the graphics state.void
setNonStrokingAlphaConstant
(Float alpha) This will get the non stroking alpha constant.void
setNonStrokingOverprintControl
(boolean op) This will get the overprint control(OP).void
setOverprintMode
(Float overprintMode) This will get the overprint mode(OPM).void
This will set the rendering intent for the graphics state.void
setSmoothnessTolerance
(Float smoothness) This will get the smoothness tolerance.void
setStrokingAlphaConstant
(Float alpha) This will get the stroking alpha constant.void
setStrokingOverprintControl
(boolean op) This will get the overprint control(OP).void
setTextKnockoutFlag
(boolean tk) This will get the text knockout flag.
-
Field Details
-
RENDERING_INTENT_ABSOLUTE_COLORIMETRIC
Rendering intent constants, see PDF Reference 1.5 Section 4.5.4 Rendering Intents.- See Also:
-
RENDERING_INTENT_RELATIVE_COLORIMETRIC
Rendering intent constants, see PDF Reference 1.5 Section 4.5.4 Rendering Intents.- See Also:
-
RENDERING_INTENT_SATURATION
Rendering intent constants, see PDF Reference 1.5 Section 4.5.4 Rendering Intents.- See Also:
-
RENDERING_INTENT_PERCEPTUAL
Rendering intent constants, see PDF Reference 1.5 Section 4.5.4 Rendering Intents.- See Also:
-
-
Constructor Details
-
PDExtendedGraphicsState
public PDExtendedGraphicsState()Default constructor, creates blank graphics state. -
PDExtendedGraphicsState
Create a graphics state from an existing dictionary.- Parameters:
dictionary
- The existing graphics state.
-
-
Method Details
-
copyIntoGraphicsState
This will implement the gs operator.- Parameters:
gs
- The state to copy this dictionaries values into.- Throws:
IOException
- If there is an error copying font information.
-
getCOSDictionary
This will get the underlying dictionary that this class acts on.- Returns:
- The underlying dictionary for this class.
-
getCOSObject
Convert this standard java object to a COS object.- Specified by:
getCOSObject
in interfaceCOSObjectable
- Returns:
- The cos object that matches this Java object.
-
getLineWidth
This will get the line width. This will return null if there is no line width- Returns:
- null or the LW value of the dictionary.
-
setLineWidth
This will set the line width.- Parameters:
width
- The line width for the object.
-
getLineCapStyle
public int getLineCapStyle()This will get the line cap style.- Returns:
- null or the LC value of the dictionary.
-
setLineCapStyle
public void setLineCapStyle(int style) This will set the line cap style for the graphics state.- Parameters:
style
- The new line cap style to set.
-
getLineJoinStyle
public int getLineJoinStyle()This will get the line join style.- Returns:
- null or the LJ value in the dictionary.
-
setLineJoinStyle
public void setLineJoinStyle(int style) This will set the line join style.- Parameters:
style
- The new line join style.
-
getMiterLimit
This will get the miter limit.- Returns:
- null or the ML value in the dictionary.
-
setMiterLimit
This will set the miter limit for the graphics state.- Parameters:
miterLimit
- The new miter limit value
-
getLineDashPattern
This will get the dash pattern.- Returns:
- null or the D value in the dictionary.
-
setLineDashPattern
This will set the dash pattern for the graphics state.- Parameters:
dashPattern
- The dash pattern
-
getRenderingIntent
This will get the rendering intent.- Returns:
- null or the RI value in the dictionary.
-
setRenderingIntent
This will set the rendering intent for the graphics state.- Parameters:
ri
- The new rendering intent
-
getStrokingOverprintControl
public boolean getStrokingOverprintControl()This will get the overprint control.- Returns:
- The overprint control or null if one has not been set.
-
setStrokingOverprintControl
public void setStrokingOverprintControl(boolean op) This will get the overprint control(OP).- Parameters:
op
- The overprint control.
-
getNonStrokingOverprintControl
public boolean getNonStrokingOverprintControl()This will get the overprint control for non stroking operations. If this value is null then the regular overprint control value will be returned.- Returns:
- The overprint control or null if one has not been set.
-
setNonStrokingOverprintControl
public void setNonStrokingOverprintControl(boolean op) This will get the overprint control(OP).- Parameters:
op
- The overprint control.
-
getOverprintMode
This will get the overprint control mode.- Returns:
- The overprint control mode or null if one has not been set.
-
setOverprintMode
This will get the overprint mode(OPM).- Parameters:
overprintMode
- The overprint mode
-
getFontSetting
This will get the font setting of the graphics state.- Returns:
- The font setting.
-
setFontSetting
This will set the font setting for this graphics state.- Parameters:
fs
- The new font setting.
-
getFlatnessTolerance
This will get the flatness tolerance.- Returns:
- The flatness tolerance or null if one has not been set.
-
setFlatnessTolerance
This will get the flatness tolerance.- Parameters:
flatness
- The new flatness tolerance
-
getSmoothnessTolerance
This will get the smothness tolerance.- Returns:
- The smothness tolerance or null if one has not been set.
-
setSmoothnessTolerance
This will get the smoothness tolerance.- Parameters:
smoothness
- The new smoothness tolerance
-
getAutomaticStrokeAdjustment
public boolean getAutomaticStrokeAdjustment()This will get the automatic stroke adjustment flag.- Returns:
- The automatic stroke adjustment flag or null if one has not been set.
-
setAutomaticStrokeAdjustment
public void setAutomaticStrokeAdjustment(boolean sa) This will get the automatic stroke adjustment flag.- Parameters:
sa
- The new automatic stroke adjustment flag.
-
getStrokingAlphaConstant
This will get the stroking alpha constant.- Returns:
- The stroking alpha constant or null if one has not been set.
-
setStrokingAlphaConstant
This will get the stroking alpha constant.- Parameters:
alpha
- The new stroking alpha constant.
-
getNonStrokingAlphaConstant
This will get the non stroking alpha constant.- Returns:
- The non stroking alpha constant or null if one has not been set.
-
setNonStrokingAlphaConstant
This will get the non stroking alpha constant.- Parameters:
alpha
- The new non stroking alpha constant.
-
getAlphaSourceFlag
public boolean getAlphaSourceFlag()This will get the alpha source flag.- Returns:
- The alpha source flag.
-
setAlphaSourceFlag
public void setAlphaSourceFlag(boolean alpha) This will get the alpha source flag.- Parameters:
alpha
- The alpha source flag.
-
getTextKnockoutFlag
public boolean getTextKnockoutFlag()This will get the text knockout flag.- Returns:
- The text knockout flag.
-
setTextKnockoutFlag
public void setTextKnockoutFlag(boolean tk) This will get the text knockout flag.- Parameters:
tk
- The text knockout flag.
-