org.pdfbox.pdmodel.graphics

Class PDGraphicsState

Implemented Interfaces:
Cloneable

public class PDGraphicsState
extends java.lang.Object
implements Cloneable

This class will hold the current state of the graphics parameters when executing a content stream.
Version:
$Revision: 1.4 $
Author:
Ben Litchfield

Method Summary

Object
clone()
double
getAlphaConstants()
Get the value of the alpha constants property.
Matrix
getCurrentTransformationMatrix()
Get the value of the CTM.
double
getFlatness()
get the value of the flatness property.
int
getLineCap()
Get the value of the line cap.
PDLineDashPattern
getLineDashPattern()
This will get the current line dash pattern.
int
getLineJoin()
Get the value of the line join.
double
getLineWidth()
Get the value of the line width.
double
getMiterLimit()
Get the value of the miter limit.
PDColorSpaceInstance
getNonStrokingColorSpace()
This will get the nonstroking color space instance.
double
getOverprintMode()
get the value of the overprint mode property.
String
getRenderingIntent()
This will get the rendering intent.
double
getSmoothness()
get the value of the smoothness property.
PDColorSpaceInstance
getStrokingColorSpace()
This will get the current stroking colorspace.
PDTextState
getTextState()
This will get the graphics text state.
boolean
isAlphaSource()
get the value of the alpha source property.
boolean
isOverprint()
get the value of the overprint property.
boolean
isStrokeAdjustment()
Get the value of the stroke adjustment parameter.
void
setAlphaConstants(double value)
set the value of the alpha constants property.
void
setAlphaSource(boolean value)
set the value of the alpha source property.
void
setCurrentTransformationMatrix(Matrix value)
Set the value of the CTM.
void
setFlatness(double value)
set the value of the flatness property.
void
setLineCap(int value)
set the value of the line cap.
void
setLineDashPattern(PDLineDashPattern value)
This will set the current line dash pattern.
void
setLineJoin(int value)
Get the value of the line join.
void
setLineWidth(double value)
set the value of the line width.
void
setMiterLimit(double value)
set the value of the miter limit.
void
setNonStrokingColorSpace(PDColorSpaceInstance value)
This will set the non-stroking colorspace instance.
void
setOverprint(boolean value)
set the value of the overprint property.
void
setOverprintMode(double value)
set the value of the overprint mode property.
void
setRenderingIntent(String value)
This will set the rendering intent.
void
setSmoothness(double value)
set the value of the smoothness property.
void
setStrokeAdjustment(boolean value)
set the value of the stroke adjustment.
void
setStrokingColorSpace(PDColorSpaceInstance value)
This will set the current stroking colorspace.
void
setTextState(PDTextState value)
This will set the graphics text state.

Method Details

clone

public Object clone()

getAlphaConstants

public double getAlphaConstants()
Get the value of the alpha constants property.
Returns:
The value of the alpha constants parameter.

getCurrentTransformationMatrix

public Matrix getCurrentTransformationMatrix()
Get the value of the CTM.
Returns:
The current transformation matrix.

getFlatness

public double getFlatness()
get the value of the flatness property.
Returns:
The value of the flatness parameter.

getLineCap

public int getLineCap()
Get the value of the line cap.
Returns:
The current line cap.

getLineDashPattern

public PDLineDashPattern getLineDashPattern()
This will get the current line dash pattern.
Returns:
The line dash pattern.

getLineJoin

public int getLineJoin()
Get the value of the line join.
Returns:
The current line join value.

getLineWidth

public double getLineWidth()
Get the value of the line width.
Returns:
The current line width.

getMiterLimit

public double getMiterLimit()
Get the value of the miter limit.
Returns:
The current miter limit.

getNonStrokingColorSpace

public PDColorSpaceInstance getNonStrokingColorSpace()
This will get the nonstroking color space instance.
Returns:
The colorspace instance.

getOverprintMode

public double getOverprintMode()
get the value of the overprint mode property.
Returns:
The value of the overprint mode parameter.

getRenderingIntent

public String getRenderingIntent()
This will get the rendering intent.
Returns:
The rendering intent

getSmoothness

public double getSmoothness()
get the value of the smoothness property.
Returns:
The value of the smoothness parameter.

getStrokingColorSpace

public PDColorSpaceInstance getStrokingColorSpace()
This will get the current stroking colorspace.
Returns:
The current stroking colorspace.

getTextState

public PDTextState getTextState()
This will get the graphics text state.
Returns:
The graphics text state.

isAlphaSource

public boolean isAlphaSource()
get the value of the alpha source property.
Returns:
The value of the alpha source parameter.

isOverprint

public boolean isOverprint()
get the value of the overprint property.
Returns:
The value of the overprint parameter.

isStrokeAdjustment

public boolean isStrokeAdjustment()
Get the value of the stroke adjustment parameter.
Returns:
The current stroke adjustment.

setAlphaConstants

public void setAlphaConstants(double value)
set the value of the alpha constants property.
Parameters:
value - The value of the alpha constants parameter.

setAlphaSource

public void setAlphaSource(boolean value)
set the value of the alpha source property.
Parameters:
value - The value of the alpha source parameter.

setCurrentTransformationMatrix

public void setCurrentTransformationMatrix(Matrix value)
Set the value of the CTM.
Parameters:
value - The current transformation matrix.

setFlatness

public void setFlatness(double value)
set the value of the flatness property.
Parameters:
value - The value of the flatness parameter.

setLineCap

public void setLineCap(int value)
set the value of the line cap.
Parameters:
value - The current line cap.

setLineDashPattern

public void setLineDashPattern(PDLineDashPattern value)
This will set the current line dash pattern.
Parameters:
value - The new line dash pattern.

setLineJoin

public void setLineJoin(int value)
Get the value of the line join.
Parameters:
value - The current line join

setLineWidth

public void setLineWidth(double value)
set the value of the line width.
Parameters:
value - The current line width.

setMiterLimit

public void setMiterLimit(double value)
set the value of the miter limit.
Parameters:
value - The current miter limit.

setNonStrokingColorSpace

public void setNonStrokingColorSpace(PDColorSpaceInstance value)
This will set the non-stroking colorspace instance.
Parameters:
value - The non-stroking colorspace instance.

setOverprint

public void setOverprint(boolean value)
set the value of the overprint property.
Parameters:
value - The value of the overprint parameter.

setOverprintMode

public void setOverprintMode(double value)
set the value of the overprint mode property.
Parameters:
value - The value of the overprint mode parameter.

setRenderingIntent

public void setRenderingIntent(String value)
This will set the rendering intent.
Parameters:
value - The new rendering intent.

setSmoothness

public void setSmoothness(double value)
set the value of the smoothness property.
Parameters:
value - The value of the smoothness parameter.

setStrokeAdjustment

public void setStrokeAdjustment(boolean value)
set the value of the stroke adjustment.
Parameters:
value - The value of the stroke adjustment parameter.

setStrokingColorSpace

public void setStrokingColorSpace(PDColorSpaceInstance value)
This will set the current stroking colorspace.
Parameters:
value - The new stroking colorspace instance.

setTextState

public void setTextState(PDTextState value)
This will set the graphics text state.
Parameters:
value - The graphics text state.