Package com.itextpdf.text.pdf.parser
Class GraphicsState
- java.lang.Object
-
- com.itextpdf.text.pdf.parser.GraphicsState
-
public class GraphicsState extends java.lang.Object
Keeps all the parameters of the graphics state.- Since:
- 2.1.4
-
-
Field Summary
Fields Modifier and Type Field Description (package private) float
characterSpacing
The current character spacing.(package private) PdfName
colorSpaceFill
The current color space for stroke.(package private) PdfName
colorSpaceStroke
The current color space for stroke.(package private) Matrix
ctm
The current transformation matrix.(package private) BaseColor
fillColor
The current fill color.(package private) CMapAwareDocumentFont
font
The active font.(package private) float
fontSize
The current font size.(package private) float
horizontalScaling
The current horizontal scaling(package private) boolean
knockout
The current knockout value.(package private) float
leading
The current leading.private int
lineCapStyle
The line cap style.private LineDashPattern
lineDashPattern
The line dash patternprivate int
lineJoinStyle
The line join style.private float
lineWidth
The line width for stroking operationsprivate float
miterLimit
The mitir limit value(package private) int
renderMode
The current render mode.(package private) float
rise
The current text rise(package private) BaseColor
strokeColor
The current stroke color.(package private) float
wordSpacing
The current word spacing.
-
Constructor Summary
Constructors Constructor Description GraphicsState()
Constructs a new Graphics State object with the default values.GraphicsState(GraphicsState source)
Copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float
getCharacterSpacing()
Getter for the character spacing.PdfName
getColorSpaceFill()
Gets the current color space for fill operationsPdfName
getColorSpaceStroke()
Gets the current color space for stroke operationsMatrix
getCtm()
Getter for the current transformation matrixBaseColor
getFillColor()
Gets the current fill colorCMapAwareDocumentFont
getFont()
Getter for the fontfloat
getFontSize()
Getter for the font sizefloat
getHorizontalScaling()
Getter for the horizontal scalingfloat
getLeading()
Getter for the leadingint
getLineCapStyle()
Getter for the line cap style.LineDashPattern
getLineDashPattern()
Getter for the line dash pattern.int
getLineJoinStyle()
Getter for the line join style.float
getLineWidth()
Getter for the line width.float
getMiterLimit()
Getter for the miter limit value.int
getRenderMode()
Getter for the render modefloat
getRise()
Getter for text riseBaseColor
getStrokeColor()
Gets the current stroke colorfloat
getWordSpacing()
Getter for the word spacingboolean
isKnockout()
Getter for knockoutvoid
setLineCapStyle(int lineCapStyle)
Setter for the line cap style.void
setLineDashPattern(LineDashPattern lineDashPattern)
Setter for the line dash pattern.void
setLineJoinStyle(int lineJoinStyle)
Setter for the line join style.void
setLineWidth(float lineWidth)
Setter for the line width.void
setMiterLimit(float miterLimit)
Setter for the miter limit value.
-
-
-
Field Detail
-
ctm
Matrix ctm
The current transformation matrix.
-
characterSpacing
float characterSpacing
The current character spacing.
-
wordSpacing
float wordSpacing
The current word spacing.
-
horizontalScaling
float horizontalScaling
The current horizontal scaling
-
leading
float leading
The current leading.
-
font
CMapAwareDocumentFont font
The active font.
-
fontSize
float fontSize
The current font size.
-
renderMode
int renderMode
The current render mode.
-
rise
float rise
The current text rise
-
knockout
boolean knockout
The current knockout value.
-
colorSpaceFill
PdfName colorSpaceFill
The current color space for stroke.
-
colorSpaceStroke
PdfName colorSpaceStroke
The current color space for stroke.
-
fillColor
BaseColor fillColor
The current fill color.
-
strokeColor
BaseColor strokeColor
The current stroke color.
-
lineWidth
private float lineWidth
The line width for stroking operations
-
lineCapStyle
private int lineCapStyle
The line cap style. For possible values seePdfContentByte
-
lineJoinStyle
private int lineJoinStyle
The line join style. For possible values seePdfContentByte
-
miterLimit
private float miterLimit
The mitir limit value
-
lineDashPattern
private LineDashPattern lineDashPattern
The line dash pattern
-
-
Constructor Detail
-
GraphicsState
public GraphicsState()
Constructs a new Graphics State object with the default values.
-
GraphicsState
public GraphicsState(GraphicsState source)
Copy constructor.- Parameters:
source
- another GraphicsState object
-
-
Method Detail
-
getCtm
public Matrix getCtm()
Getter for the current transformation matrix- Returns:
- the ctm
- Since:
- iText 5.0.1
-
getCharacterSpacing
public float getCharacterSpacing()
Getter for the character spacing.- Returns:
- the character spacing
- Since:
- iText 5.0.1
-
getWordSpacing
public float getWordSpacing()
Getter for the word spacing- Returns:
- the word spacing
- Since:
- iText 5.0.1
-
getHorizontalScaling
public float getHorizontalScaling()
Getter for the horizontal scaling- Returns:
- the horizontal scaling
- Since:
- iText 5.0.1
-
getLeading
public float getLeading()
Getter for the leading- Returns:
- the leading
- Since:
- iText 5.0.1
-
getFont
public CMapAwareDocumentFont getFont()
Getter for the font- Returns:
- the font
- Since:
- iText 5.0.1
-
getFontSize
public float getFontSize()
Getter for the font size- Returns:
- the font size
- Since:
- iText 5.0.1
-
getRenderMode
public int getRenderMode()
Getter for the render mode- Returns:
- the renderMode
- Since:
- iText 5.0.1
-
getRise
public float getRise()
Getter for text rise- Returns:
- the text rise
- Since:
- iText 5.0.1
-
isKnockout
public boolean isKnockout()
Getter for knockout- Returns:
- the knockout
- Since:
- iText 5.0.1
-
getColorSpaceFill
public PdfName getColorSpaceFill()
Gets the current color space for fill operations
-
getColorSpaceStroke
public PdfName getColorSpaceStroke()
Gets the current color space for stroke operations
-
getFillColor
public BaseColor getFillColor()
Gets the current fill color- Returns:
- a BaseColor
-
getStrokeColor
public BaseColor getStrokeColor()
Gets the current stroke color- Returns:
- a BaseColor
-
getLineWidth
public float getLineWidth()
Getter for the line width.- Returns:
- The line width
- Since:
- 5.5.6
-
setLineWidth
public void setLineWidth(float lineWidth)
Setter for the line width.- Parameters:
lineWidth
- New line width.- Since:
- 5.5.6
-
getLineCapStyle
public int getLineCapStyle()
Getter for the line cap style. For possible values seePdfContentByte
- Returns:
- The line cap style.
- Since:
- 5.5.6
-
setLineCapStyle
public void setLineCapStyle(int lineCapStyle)
Setter for the line cap style. For possible values seePdfContentByte
- Parameters:
lineCapStyle
- New line cap style.- Since:
- 5.5.6
-
getLineJoinStyle
public int getLineJoinStyle()
Getter for the line join style. For possible values seePdfContentByte
- Returns:
- The line join style.
- Since:
- 5.5.6
-
setLineJoinStyle
public void setLineJoinStyle(int lineJoinStyle)
Setter for the line join style. For possible values seePdfContentByte
- Parameters:
lineJoinStyle
- New line join style.- Since:
- 5.5.6
-
getMiterLimit
public float getMiterLimit()
Getter for the miter limit value.- Returns:
- The miter limit.
- Since:
- 5.5.6
-
setMiterLimit
public void setMiterLimit(float miterLimit)
Setter for the miter limit value.- Parameters:
miterLimit
- New miter limit.- Since:
- 5.5.6
-
getLineDashPattern
public LineDashPattern getLineDashPattern()
Getter for the line dash pattern.- Returns:
- The line dash pattern.
- Since:
- 5.5.6
-
setLineDashPattern
public void setLineDashPattern(LineDashPattern lineDashPattern)
Setter for the line dash pattern.- Parameters:
lineDashPattern
- New line dash pattern.- Since:
- 5.5.6
-
-