Package com.itextpdf.text.pdf.parser
Class GraphicsState
java.lang.Object
com.itextpdf.text.pdf.parser.GraphicsState
Keeps all the parameters of the graphics state.
- Since:
- 2.1.4
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) floatThe current character spacing.(package private) PdfNameThe current color space for stroke.(package private) PdfNameThe current color space for stroke.(package private) MatrixThe current transformation matrix.(package private) BaseColorThe current fill color.(package private) CMapAwareDocumentFontThe active font.(package private) floatThe current font size.(package private) floatThe current horizontal scaling(package private) booleanThe current knockout value.(package private) floatThe current leading.private intThe line cap style.private LineDashPatternThe line dash patternprivate intThe line join style.private floatThe line width for stroking operationsprivate floatThe mitir limit value(package private) intThe current render mode.(package private) floatThe current text rise(package private) BaseColorThe current stroke color.(package private) floatThe current word spacing. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new Graphics State object with the default values.GraphicsState(GraphicsState source) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionfloatGetter for the character spacing.Gets the current color space for fill operationsGets the current color space for stroke operationsgetCtm()Getter for the current transformation matrixGets the current fill colorgetFont()Getter for the fontfloatGetter for the font sizefloatGetter for the horizontal scalingfloatGetter for the leadingintGetter for the line cap style.Getter for the line dash pattern.intGetter for the line join style.floatGetter for the line width.floatGetter for the miter limit value.intGetter for the render modefloatgetRise()Getter for text riseGets the current stroke colorfloatGetter for the word spacingbooleanGetter for knockoutvoidsetLineCapStyle(int lineCapStyle) Setter for the line cap style.voidsetLineDashPattern(LineDashPattern lineDashPattern) Setter for the line dash pattern.voidsetLineJoinStyle(int lineJoinStyle) Setter for the line join style.voidsetLineWidth(float lineWidth) Setter for the line width.voidsetMiterLimit(float miterLimit) Setter for the miter limit value.
-
Field Details
-
ctm
Matrix ctmThe current transformation matrix. -
characterSpacing
float characterSpacingThe current character spacing. -
wordSpacing
float wordSpacingThe current word spacing. -
horizontalScaling
float horizontalScalingThe current horizontal scaling -
leading
float leadingThe current leading. -
font
The active font. -
fontSize
float fontSizeThe current font size. -
renderMode
int renderModeThe current render mode. -
rise
float riseThe current text rise -
knockout
boolean knockoutThe current knockout value. -
colorSpaceFill
PdfName colorSpaceFillThe current color space for stroke. -
colorSpaceStroke
PdfName colorSpaceStrokeThe current color space for stroke. -
fillColor
BaseColor fillColorThe current fill color. -
strokeColor
BaseColor strokeColorThe current stroke color. -
lineWidth
private float lineWidthThe line width for stroking operations -
lineCapStyle
private int lineCapStyleThe line cap style. For possible values seePdfContentByte -
lineJoinStyle
private int lineJoinStyleThe line join style. For possible values seePdfContentByte -
miterLimit
private float miterLimitThe mitir limit value -
lineDashPattern
The line dash pattern
-
-
Constructor Details
-
GraphicsState
public GraphicsState()Constructs a new Graphics State object with the default values. -
GraphicsState
Copy constructor.- Parameters:
source- another GraphicsState object
-
-
Method Details
-
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
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
Gets the current color space for fill operations -
getColorSpaceStroke
Gets the current color space for stroke operations -
getFillColor
Gets the current fill color- Returns:
- a 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
Getter for the line dash pattern.- Returns:
- The line dash pattern.
- Since:
- 5.5.6
-
setLineDashPattern
Setter for the line dash pattern.- Parameters:
lineDashPattern- New line dash pattern.- Since:
- 5.5.6
-