com.pdftools.expa
Class GraphicsState

java.lang.Object
  extended by com.pdftools.NativeLibrary
      extended by com.pdftools.expa.ExpaInitialize
          extended by com.pdftools.expa.GraphicsState

public class GraphicsState
extends ExpaInitialize


Nested Class Summary
 
Nested classes/interfaces inherited from class com.pdftools.expa.ExpaInitialize
ExpaInitialize.CONTENTOBJECT, ExpaInitialize.ORIENTATION, ExpaInitialize.Rectangle, ExpaInitialize.TransformMatrix
 
Nested classes/interfaces inherited from class com.pdftools.NativeLibrary
NativeLibrary.COLORCONVERSION, NativeLibrary.COLORSPACE, NativeLibrary.COMPRESSION, NativeLibrary.DITHERINGMODE, NativeLibrary.ERRORCODE, NativeLibrary.FONTTYPE, NativeLibrary.PERMISSION, NativeLibrary.RENDEREROPTION, NativeLibrary.RENDERINGMODE, NativeLibrary.ROTATEMODE, NativeLibrary.STRIPTYPE
 
Field Summary
 
Fields inherited from class com.pdftools.NativeLibrary
VERSION
 
Constructor Summary
GraphicsState()
           
 
Method Summary
 float getCharSpacing()
          get current space between two characters.
 ExpaInitialize.TransformMatrix getCTM()
          get current transform matrix.
 float[] getDashArray()
          get the dash array elements.
 float getDashPhase()
          get the dash phase of a line dash pattern.
 int getFillColorCMYK()
          get the CMYK color quad for filling operations.
 int getFillColorRGB()
          get the RGB color triple for filling operations.
 ColorSpace getFillColorSpace()
          get current color space that is used for filling operations.
 Font getFont()
          get the font information
 float getFontSize()
          get current font size for text strings.
 float getHorizontalScaling()
          get current horizontal scaling factor that describes the amount of horizontal stretching of a text string.
 float getLeading()
          get current leading (line spacing) of a text string.
 int getLineCap()
          get line cap style.
 int getLineJoin()
          get line join styles.
 float getLineWidth()
          get line width.
 float getMiterLimit()
          get the miter limit.
 int getStrokeColorCMYK()
          get the CMYK color quad for stroking operations.
 int getStrokeColorRGB()
          get the RGB color triple for stroking operations.
 ColorSpace getStrokeColorSpace()
          get current color space that is used for stroking operations.
 int getTextKnockout()
          get the text knockout flag.
 int getTextRenderingMode()
          get a value that indicates whether the text should be stroked, filled, used as a clip path or some combination of the three.
 float getTextRise()
          get the information on by which amount the base line of the text is moved up or down.
 float getWordSpacing()
          get current space between two words.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphicsState

public GraphicsState()
Method Detail

getFont

public Font getFont()
get the font information

Returns:
the font information The font information is valid for the current content extraction state. Reading the next object might invalidate this object.

getCTM

public ExpaInitialize.TransformMatrix getCTM()
get current transform matrix.

Returns:
an interface to the current transform matrix. The transform describes the transformation of the graphic object’s coordinates from user units to page units including the effect of the page rotate attribute if requested.

getStrokeColorSpace

public ColorSpace getStrokeColorSpace()
get current color space that is used for stroking operations.

Returns:
an interface to the current color space that is used for stroking operations. The color space is used to interpret color values of the StrokeColor property.

getFillColorSpace

public ColorSpace getFillColorSpace()
get current color space that is used for filling operations.

Returns:
an interface to the current color space that is used for filling operations. The color space is used to interpret color values of the FillColor property.

getStrokeColorRGB

public int getStrokeColorRGB()
get the RGB color triple for stroking operations.

Returns:
the RGB color triple for stroking operations. The color value is obtained by converting the color values of the StrokeColor property by means the StrokeColorSpace. The RGB triples are encoded using the following formula: Triple = ((R * 256) + G) * 256 + B.

getFillColorRGB

public int getFillColorRGB()
get the RGB color triple for filling operations.

Returns:
the RGB color triple for filling operations. The color value is obtained by converting the color values of the FillColor property by means the FillColor-Space. The RGB triples are encoded using the following formula: Triple = ((R * 256) + G) * 256 + B

getStrokeColorCMYK

public int getStrokeColorCMYK()
get the CMYK color quad for stroking operations.

Returns:
the CMYK color quad for stroking operations. The color value is obtained by converting the color values of the StrokeColor property by means the StrokeColorSpace. The CMYK quads are encoded using the following formula: Quad = (((C * 256) + M) * 256 + Y) * 256 + K.

getFillColorCMYK

public int getFillColorCMYK()
get the CMYK color quad for filling operations.

Returns:
the CMYK color quad for filling operations. The color value is obtained by converting the color values of the FillColor property by means the FillColorSpace. The CMYK quads are encoded using the following formula: Quad = (((C * 256) + M) * 256 + Y) * 256 + K

getCharSpacing

public float getCharSpacing()
get current space between two characters.

Returns:
the current space between two characters of a text string as a single precision real number in text units.

getWordSpacing

public float getWordSpacing()
get current space between two words.

Returns:
the current space between two words of a text string as a single precision real number in text units.

getHorizontalScaling

public float getHorizontalScaling()
get current horizontal scaling factor that describes the amount of horizontal stretching of a text string.

Returns:
the current horizontal scaling factor that describes the amount of horizontal stretching of a text string. A value of greater than 1.0 stretches the string whereas a value of less than 1.0 lets the string appear as condensed.

getLeading

public float getLeading()
get current leading (line spacing) of a text string.

Returns:
the current leading (line spacing) of a text string as a single precision number in text units.

getFontSize

public float getFontSize()
get current font size for text strings.

Returns:
the current font size for text strings as a single precision real number in text units.

getTextRenderingMode

public int getTextRenderingMode()
get a value that indicates whether the text should be stroked, filled, used as a clip path or some combination of the three.

Returns:
a value that indicates whether the text should be stroked, filled, used as a clip path or some combination of the three. 0: Fill text. 1: Stroke text. 2: Fill, then stroke text. 3: Neither fill nor stroke text (invisible). 4. Fill text and add path for clipping. 5: Stroke text and add path for clipping. 6: Fill, then stroke text and add path for clipping. 7: Add path for clipping.

getTextRise

public float getTextRise()
get the information on by which amount the base line of the text is moved up or down.

Returns:
a single precision real number in unscaled text units that indicates by which amount the base line of the text is moved up or down. It is most commonly used to display subscripts and superscripts.

getTextKnockout

public int getTextKnockout()
get the text knockout flag.

Returns:
the text knockout flag. This boolean flag determines what text elements are considered elementary objects for purposes of color compositing in the transparent imaging model

getLineWidth

public float getLineWidth()
get line width.

Returns:
a single precision real number in user units.

getLineCap

public int getLineCap()
get line cap style.

Returns:
the line cap style. The line cap style specifies the shape to be used at the end of open sub-paths and dashes when they are stroked. 0: Butt cap 1: Round cap 2: Projecting square cap

getLineJoin

public int getLineJoin()
get line join styles.

Returns:
the line join styles. The line join styles specifies the shape to be used at the corners of paths that are stroked. 0: Miter join 1: Round join 2: Bevel join

getMiterLimit

public float getMiterLimit()
get the miter limit.

Returns:
the miter limit. The miter limit imposes a maximum on the ratio of the miter length to the line width, which can be fairly large when two line segments meet at a sharp angle. When the limit is exceeded, the join is converted from a miter to a bevel.

getDashPhase

public float getDashPhase()
get the dash phase of a line dash pattern.

Returns:
the dash phase of a line dash pattern. The dash phase is the offset of the pattern and can be larger as the pattern itself

getDashArray

public float[] getDashArray()
get the dash array elements.

Returns:
the dash array elements.