public class

GState

extends Object
java.lang.Object
   ↳ com.pdftron.pdf.GState

Class Overview

GState is a class that keeps track of a number of style attributes used to visually define graphical Elements. Each PDF::Element has an associated GState that can be used to query or set various graphics properties.

Note: current clipping path is not tracked in the graphics state for efficiency reasons. In most cases tracking of the current clipping path is best left to the client.

Summary

Constants
int e_BG_funct The Constant e_BG_funct.
int e_UCR_funct The Constant e_UCR_funct.
int e_absolute_colorimetric The Constant e_absolute_colorimetric.
int e_alpha_is_shape The Constant e_alpha_is_shape.
int e_auto_stoke_adjust The Constant e_auto_stoke_adjust.
int e_bevel_join The Constant e_bevel_join.
int e_bl_color The Constant e_bl_color.
int e_bl_color_burn The Constant e_bl_color_burn.
int e_bl_color_dodge The Constant e_bl_color_dodge.
int e_bl_compatible The Constant e_bl_compatible.
int e_bl_darken The Constant e_bl_darken.
int e_bl_difference The Constant e_bl_difference.
int e_bl_exclusion The Constant e_bl_exclusion.
int e_bl_hard_light The Constant e_bl_hard_light.
int e_bl_hue The Constant e_bl_hue.
int e_bl_lighten The Constant e_bl_lighten.
int e_bl_luminosity The Constant e_bl_luminosity.
int e_bl_multiply The Constant e_bl_multiply.
int e_bl_normal The Constant e_bl_normal.
int e_bl_overlay The Constant e_bl_overlay.
int e_bl_saturation The Constant e_bl_saturation.
int e_bl_screen The Constant e_bl_screen.
int e_bl_soft_light The Constant e_bl_soft_light.
int e_blend_mode The Constant e_blend_mode.
int e_butt_cap The Constant e_butt_cap.
int e_char_spacing The Constant e_char_spacing.
int e_clip_text The Constant e_clip_text.
int e_dash_pattern The Constant e_dash_pattern.
int e_fill_clip_text The Constant e_fill_clip_text.
int e_fill_color The Constant e_fill_color.
int e_fill_cs The Constant e_fill_cs.
int e_fill_overprint The Constant e_fill_overprint.
int e_fill_stroke_clip_text The Constant e_fill_stroke_clip_text.
int e_fill_stroke_text The Constant e_fill_stroke_text.
int e_fill_text The Constant e_fill_text.
int e_flatness The Constant e_flatness.
int e_font The Constant e_font.
int e_font_size The Constant e_font_size.
int e_halftone The Constant e_halftone.
int e_horizontal_scale The Constant e_horizontal_scale.
int e_invisible_text The Constant e_invisible_text.
int e_leading The Constant e_leading.
int e_line_cap The Constant e_line_cap.
int e_line_join The Constant e_line_join.
int e_line_width The Constant e_line_width.
int e_miter_join The Constant e_miter_join.
int e_miter_limit The Constant e_miter_limit.
int e_null The Constant e_null.
int e_opacity_fill The Constant e_opacity_fill.
int e_opacity_stroke The Constant e_opacity_stroke.
int e_overprint_mode The Constant e_overprint_mode.
int e_perceptual The Constant e_perceptual.
int e_relative_colorimetric The Constant e_relative_colorimetric.
int e_rendering_intent The Constant e_rendering_intent.
int e_round_cap The Constant e_round_cap.
int e_round_join The Constant e_round_join.
int e_saturation The Constant e_saturation.
int e_smoothnes The Constant e_smoothnes.
int e_soft_mask The Constant e_soft_mask.
int e_square_cap The Constant e_square_cap.
int e_stroke_clip_text The Constant e_stroke_clip_text.
int e_stroke_color The Constant e_stroke_color.
int e_stroke_cs The Constant e_stroke_cs.
int e_stroke_overprint The Constant e_stroke_overprint.
int e_stroke_text The Constant e_stroke_text.
int e_text_knockout The Constant e_text_knockout.
int e_text_pos_offset The Constant e_text_pos_offset.
int e_text_render_mode The Constant e_text_render_mode.
int e_text_rise The Constant e_text_rise.
int e_transfer_funct The Constant e_transfer_funct.
int e_transform The Constant e_transform.
int e_word_spacing The Constant e_word_spacing.
Public Methods
PatternColor GetStrokePattern()
Get the stroke pattern.
void concat(Matrix2D mtx)
Concatenate the given matrix to the transformation matrix of this element.
void concat(double a, double b, double c, double d, double h, double v)
Concatenate the given matrix expressed in its values to the transformation matrix of this element.
boolean getAISFlag()
Get the alpha source flag.
boolean getAutoStrokeAdjust()
Get the auto stroke adjust.
Obj getBlackGenFunct()
Get the black generation function
int getBlendMode()
Get the blend mode.
double getCharSpacing()
Get the char spacing.
double[] getDashes()
Get the dashes.
ColorPt getFillColor()
Get the fill color.
ColorSpace getFillColorSpace()
Get the fill color space.
double getFillOpacity()
Get the fill opacity.
boolean getFillOverprint()
Get the fill overprint.
PatternColor getFillPattern()
Get the fill pattern.
double getFlatness()
Get the flatness.
Font getFont()
Get the font.
double getFontSize()
Get the font size.
Obj getHalftone()
Get the halftone.
double getHorizontalScale()
Get the horizontal scale.
double getLeading()
Get the leading parameter.
int getLineCap()
Get the line cap.
int getLineJoin()
Get the line join.
double getLineWidth()
Get the line width.
double getMiterLimit()
Get the miter limit.
int getOverprintMode()
Get the overprint mode.
double getPhase()
Get the phase.
int getRenderingIntent()
Get the rendering intent.
double getSmoothnessTolerance()
Get the smoothness tolerance.
Obj getSoftMask()
Get the soft mask.
Matrix2D getSoftMaskTransform()
Get the soft mask transform.
ColorPt getStrokeColor()
Get the stroke color.
ColorSpace getStrokeColorSpace()
Get the stroke color space.
double getStrokeOpacity()
Get the stroke opacity.
boolean getStrokeOverprint()
Get the stroke overprint.
int getTextRenderMode()
Get the text render mode.
double getTextRise()
Get the text rise.
Obj getTransferFunct()
Get the transfer funct.
Matrix2D getTransform()
Get the transform.
Obj getUCRFunct()
Get the undercolor-removal function
double getWordSpacing()
Get the word spacing.
boolean isTextKnockout()
Checks if is text knockout.
void setAISFlag(boolean AIS)
Specifies if the alpha is to be interpreted as a shape or opacity mask.
void setAutoStrokeAdjust(boolean SA)
Specify whether to apply automatic stroke adjustment.
void setBlackGenFunct(Obj BG)
Set black-generation function used during conversion between DeviceRGB and DeviceCMYK.
void setBlendMode(int BM)
Set the current blend mode to be used in the transparent imaging model.
void setCharSpacing(double char_spacing)
Set character spacing.
void setDashPattern(double[] dash_array, double phase)
Set the dash pattern used to stroke paths.
void setFillColor(PatternColor pattern)
Set the fill color to the given tiling pattern.
void setFillColor(ColorPt c)
Set the color value/point used for filling operations.
void setFillColor(PatternColor pattern, ColorPt c)
Set the fill color to the given uncolored tiling pattern.
void setFillColorSpace(ColorSpace cs)
Set the color space used for filling operations.
void setFillOpacity(double ca)
Set the opacity value for painting operations other than stroking.
void setFillOverprint(boolean op)
Specifies if overprint is enabled for fill operations.
void setFlatness(double flatness)
Set the value of flatness tolerance.
void setFont(Font font, double font_sz)
Set the font and font size used to draw text.
void setHalftone(Obj HT)
Set the halftone.
void setHorizontalScale(double hscale)
Set horizontal scale.
void setLeading(double leading)
Set the leading parameter.
void setLineCap(int cap)
Set LineCap style property.
void setLineJoin(int join)
Set LineJoin style property.
void setLineWidth(double width)
Set the thickness of the line used to stroke a path.
void setMiterLimit(double miter_limit)
Set miter limit.
void setOverprintMode(int OPM)
Set the overprint mode.
void setRenderingIntent(int intent)
Set the color intent to be used for rendering the Element.
void setSmoothnessTolerance(double SM)
Set the smoothness tolerance used to control the quality of smooth shading.
void setSoftMask(Obj SM)
Set the soft mask of the extended graphics state.
void setStrokeColor(ColorPt c)
Set the color value/point used for stroking operations.
void setStrokeColor(PatternColor pattern)
Set the stroke color to the given tiling pattern.
void setStrokeColor(PatternColor pattern, ColorPt c)
Set the stroke color to the given uncolored tiling pattern.
void setStrokeColorSpace(ColorSpace cs)
Set the color space used for stroking operations.
void setStrokeOpacity(double CA)
Set opacity value for stroke painting operations for paths and glyph outlines.
void setStrokeOverprint(boolean OP)
Specifies if overprint is enabled for stroke operations.
void setTextKnockout(boolean knockout)
Mark the object as elementary for purposes of color compositing in the transparent imaging model.
void setTextRenderMode(int rmode)
Set text rendering mode.
void setTextRise(double rise)
Set text rise.
void setTransferFunct(Obj TR)
Set transfer function used during color conversion process.
void setTransform(double a, double b, double c, double d, double h, double v)
Set the transformation matrix for this element.
void setTransform(Matrix2D mtx)
Set the transformation matrix associated with this element.
void setUCRFunct(Obj UCR)
Set undercolor-removal function used during conversion between DeviceRGB and DeviceCMYK.
void setWordSpacing(double word_spacing)
Set word spacing.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int e_BG_funct

The Constant e_BG_funct.

Constant Value: 33 (0x00000021)

public static final int e_UCR_funct

The Constant e_UCR_funct.

Constant Value: 34 (0x00000022)

public static final int e_absolute_colorimetric

The Constant e_absolute_colorimetric.

Constant Value: 0 (0x00000000)

public static final int e_alpha_is_shape

The Constant e_alpha_is_shape.

Constant Value: 25 (0x00000019)

public static final int e_auto_stoke_adjust

The Constant e_auto_stoke_adjust.

Constant Value: 28 (0x0000001c)

public static final int e_bevel_join

The Constant e_bevel_join.

Constant Value: 2 (0x00000002)

public static final int e_bl_color

The Constant e_bl_color.

Constant Value: 16 (0x00000010)

public static final int e_bl_color_burn

The Constant e_bl_color_burn.

Constant Value: 8 (0x00000008)

public static final int e_bl_color_dodge

The Constant e_bl_color_dodge.

Constant Value: 7 (0x00000007)

public static final int e_bl_compatible

The Constant e_bl_compatible.

Constant Value: 0 (0x00000000)

public static final int e_bl_darken

The Constant e_bl_darken.

Constant Value: 5 (0x00000005)

public static final int e_bl_difference

The Constant e_bl_difference.

Constant Value: 4 (0x00000004)

public static final int e_bl_exclusion

The Constant e_bl_exclusion.

Constant Value: 9 (0x00000009)

public static final int e_bl_hard_light

The Constant e_bl_hard_light.

Constant Value: 10 (0x0000000a)

public static final int e_bl_hue

The Constant e_bl_hue.

Constant Value: 14 (0x0000000e)

public static final int e_bl_lighten

The Constant e_bl_lighten.

Constant Value: 6 (0x00000006)

public static final int e_bl_luminosity

The Constant e_bl_luminosity.

Constant Value: 13 (0x0000000d)

public static final int e_bl_multiply

The Constant e_bl_multiply.

Constant Value: 2 (0x00000002)

public static final int e_bl_normal

The Constant e_bl_normal.

Constant Value: 1 (0x00000001)

public static final int e_bl_overlay

The Constant e_bl_overlay.

Constant Value: 11 (0x0000000b)

public static final int e_bl_saturation

The Constant e_bl_saturation.

Constant Value: 15 (0x0000000f)

public static final int e_bl_screen

The Constant e_bl_screen.

Constant Value: 3 (0x00000003)

public static final int e_bl_soft_light

The Constant e_bl_soft_light.

Constant Value: 12 (0x0000000c)

public static final int e_blend_mode

The Constant e_blend_mode.

Constant Value: 22 (0x00000016)

public static final int e_butt_cap

The Constant e_butt_cap.

Constant Value: 0 (0x00000000)

public static final int e_char_spacing

The Constant e_char_spacing.

Constant Value: 12 (0x0000000c)

public static final int e_clip_text

The Constant e_clip_text.

Constant Value: 7 (0x00000007)

public static final int e_dash_pattern

The Constant e_dash_pattern.

Constant Value: 11 (0x0000000b)

public static final int e_fill_clip_text

The Constant e_fill_clip_text.

Constant Value: 4 (0x00000004)

public static final int e_fill_color

The Constant e_fill_color.

Constant Value: 5 (0x00000005)

public static final int e_fill_cs

The Constant e_fill_cs.

Constant Value: 4 (0x00000004)

public static final int e_fill_overprint

The Constant e_fill_overprint.

Constant Value: 30 (0x0000001e)

public static final int e_fill_stroke_clip_text

The Constant e_fill_stroke_clip_text.

Constant Value: 6 (0x00000006)

public static final int e_fill_stroke_text

The Constant e_fill_stroke_text.

Constant Value: 2 (0x00000002)

public static final int e_fill_text

The Constant e_fill_text.

Constant Value: 0 (0x00000000)

public static final int e_flatness

The Constant e_flatness.

Constant Value: 9 (0x00000009)

public static final int e_font

The Constant e_font.

Constant Value: 16 (0x00000010)

public static final int e_font_size

The Constant e_font_size.

Constant Value: 17 (0x00000011)

public static final int e_halftone

The Constant e_halftone.

Constant Value: 35 (0x00000023)

public static final int e_horizontal_scale

The Constant e_horizontal_scale.

Constant Value: 14 (0x0000000e)

public static final int e_invisible_text

The Constant e_invisible_text.

Constant Value: 3 (0x00000003)

public static final int e_leading

The Constant e_leading.

Constant Value: 15 (0x0000000f)

public static final int e_line_cap

The Constant e_line_cap.

Constant Value: 7 (0x00000007)

public static final int e_line_join

The Constant e_line_join.

Constant Value: 8 (0x00000008)

public static final int e_line_width

The Constant e_line_width.

Constant Value: 6 (0x00000006)

public static final int e_miter_join

The Constant e_miter_join.

Constant Value: 0 (0x00000000)

public static final int e_miter_limit

The Constant e_miter_limit.

Constant Value: 10 (0x0000000a)

public static final int e_null

The Constant e_null.

Constant Value: 36 (0x00000024)

public static final int e_opacity_fill

The Constant e_opacity_fill.

Constant Value: 23 (0x00000017)

public static final int e_opacity_stroke

The Constant e_opacity_stroke.

Constant Value: 24 (0x00000018)

public static final int e_overprint_mode

The Constant e_overprint_mode.

Constant Value: 31 (0x0000001f)

public static final int e_perceptual

The Constant e_perceptual.

Constant Value: 3 (0x00000003)

public static final int e_relative_colorimetric

The Constant e_relative_colorimetric.

Constant Value: 1 (0x00000001)

public static final int e_rendering_intent

The Constant e_rendering_intent.

Constant Value: 1 (0x00000001)

public static final int e_round_cap

The Constant e_round_cap.

Constant Value: 1 (0x00000001)

public static final int e_round_join

The Constant e_round_join.

Constant Value: 1 (0x00000001)

public static final int e_saturation

The Constant e_saturation.

Constant Value: 2 (0x00000002)

public static final int e_smoothnes

The Constant e_smoothnes.

Constant Value: 27 (0x0000001b)

public static final int e_soft_mask

The Constant e_soft_mask.

Constant Value: 26 (0x0000001a)

public static final int e_square_cap

The Constant e_square_cap.

Constant Value: 2 (0x00000002)

public static final int e_stroke_clip_text

The Constant e_stroke_clip_text.

Constant Value: 5 (0x00000005)

public static final int e_stroke_color

The Constant e_stroke_color.

Constant Value: 3 (0x00000003)

public static final int e_stroke_cs

The Constant e_stroke_cs.

Constant Value: 2 (0x00000002)

public static final int e_stroke_overprint

The Constant e_stroke_overprint.

Constant Value: 29 (0x0000001d)

public static final int e_stroke_text

The Constant e_stroke_text.

Constant Value: 1 (0x00000001)

public static final int e_text_knockout

The Constant e_text_knockout.

Constant Value: 20 (0x00000014)

public static final int e_text_pos_offset

The Constant e_text_pos_offset.

Constant Value: 21 (0x00000015)

public static final int e_text_render_mode

The Constant e_text_render_mode.

Constant Value: 18 (0x00000012)

public static final int e_text_rise

The Constant e_text_rise.

Constant Value: 19 (0x00000013)

public static final int e_transfer_funct

The Constant e_transfer_funct.

Constant Value: 32 (0x00000020)

public static final int e_transform

The Constant e_transform.

Constant Value: 0 (0x00000000)

public static final int e_word_spacing

The Constant e_word_spacing.

Constant Value: 13 (0x0000000d)

Public Methods

public PatternColor GetStrokePattern ()

Get the stroke pattern.

Returns
  • the SDF pattern object of currently selected PatternColorSpace used for stroking.

public void concat (Matrix2D mtx)

Concatenate the given matrix to the transformation matrix of this element.

Parameters
mtx the mtx

public void concat (double a, double b, double c, double d, double h, double v)

Concatenate the given matrix expressed in its values to the transformation matrix of this element.

Parameters
a - horizontal 'scaling' component of the new text matrix.
b - 'rotation' component of the new text matrix.
c - 'rotation' component of the new text matrix.
d - vertical 'scaling' component of the new text matrix.
h - horizontal translation component of the new text matrix.
v - vertical translation component of the new text matrix.

public boolean getAISFlag ()

Get the alpha source flag.

Returns
  • the alpha source flag ('alpha is shape'), specifying whether the current soft mask and alpha constant are to be interpreted as shape values (true) or opacity values (false).

public boolean getAutoStrokeAdjust ()

Get the auto stroke adjust.

Returns
  • a flag specifying whether stroke adjustment is enabled in the graphics state. Corresponds to the /SA key within the ExtGState's dictionary.

public Obj getBlackGenFunct ()

Get the black generation function

Returns
  • currently selected black-generation function (NULL by default) used during conversion between DeviceRGB and DeviceCMYK. Corresponds to the /BG key within the ExtGState's dictionary.

public int getBlendMode ()

Get the blend mode.

Returns
  • the current blend mode to be used in the transparent imaging model. Corresponds to the /BM key within the ExtGState's dictionary.

public double getCharSpacing ()

Get the char spacing.

Returns
  • currently selected character spacing. The character spacing parameter is a number specified in unscaled text space units. When the glyph for each character in the string is rendered, the character spacing is added to the horizontal or vertical component of the glyph's displacement, depending on the writing mode. See Section 5.2.1 in PDF Reference Manual for details.

public double[] getDashes ()

Get the dashes.

Returns
  • The method fills the vector with an array of numbers representing the dash pattern The line dash pattern controls the pattern of dashes and gaps used to stroke paths. It is specified by a dash array and a dash phase. The dash array's elements are numbers that specify the lengths of alternating dashes and gaps; the dash phase specifies the distance into the dash pattern at which to start the dash. The elements of both the dash array and the dash phase are expressed in user space units.

public ColorPt getFillColor ()

Get the fill color.

Returns
  • a color value/point represented in the current fill color space

public ColorSpace getFillColorSpace ()

Get the fill color space.

Returns
  • color space used for filling

public double getFillOpacity ()

Get the fill opacity.

Returns
  • the opacity value for painting operations other than stroking. Returns the value of the /ca key in the ExtGState dictionary. If the value is not found, the default value of 1 is returned.

public boolean getFillOverprint ()

Get the fill overprint.

Returns
  • whether overprint is enabled for fill painting operations. Corresponds to the /op key within the ExtGState's dictionary.

public PatternColor getFillPattern ()

Get the fill pattern.

Returns
  • the SDF pattern object of currently selected PatternColorSpace used for filling.

public double getFlatness ()

Get the flatness.

Returns
  • current value of flatness tolerance Flatness is a number in the range 0 to 100; a value of 0 specifies the output device's default flatness tolerance. The flatness tolerance controls the maximum permitted distance in device pixels between the mathematically correct path and an approximation constructed from straight line segments.

public Font getFont ()

Get the font.

Returns
  • currently selected font

public double getFontSize ()

Get the font size.

Returns
  • the font size

public Obj getHalftone ()

Get the halftone.

Returns
  • currently selected halftone dictionary or stream (NULL by default). Corresponds to the /HT key within the ExtGState's dictionary. Halftoning is a process by which continuous-tone colors are approximated on an output device that can achieve only a limited number of discrete colors.

public double getHorizontalScale ()

Get the horizontal scale.

Returns
  • currently selected horizontal scale The horizontal scaling parameter adjusts the width of glyphs by stretching or compressing them in the horizontal direction. Its value is specified as a percentage of the normal width of the glyphs, with 100 being the normal width. The scaling always applies to the horizontal coordinate in text space, independently of the writing mode. See Section 5.2.3 in PDF Reference Manual for details.

public double getLeading ()

Get the leading parameter.

Returns
  • currently selected leading parameter The leading parameter is measured in unscaled text space units. It specifies the vertical distance between the baselines of adjacent lines of text. See Section 5.2.4 in PDF Reference Manual for details.

public int getLineCap ()

Get the line cap.

Returns
  • currently selected LineCap style The line cap style specifies the shape to be used at the ends of open subpaths (and dashes, if any) when they are stroked.

public int getLineJoin ()

Get the line join.

Returns
  • currently selected LineJoin style The line join style specifies the shape to be used at the corners of paths that are stroked.

public double getLineWidth ()

Get the line width.

Note: A line width of 0 denotes the thinnest line that can be rendered at device resolution: 1 device pixel wide.

Returns
  • the thickness of the line used to stroke a path.

public double getMiterLimit ()

Get the miter limit.

Returns
  • current value of miter limit. The miter limit imposes a maximum on the ratio of the miter length to the line width. When the limit is exceeded, the join is converted from a miter to a bevel.

public int getOverprintMode ()

Get the overprint mode.

Returns
  • the overprint mode used by this graphics state. Corresponds to the /OPM key within the ExtGState's dictionary.

public double getPhase ()

Get the phase.

Returns
  • the phase of the currently selected dash pattern. dash phase is expressed in user space units.

public int getRenderingIntent ()

Get the rendering intent.

Returns
  • The color intent to be used for rendering the Element

public double getSmoothnessTolerance ()

Get the smoothness tolerance.

Returns
  • the smoothness tolerance used to control the quality of smooth shading. Corresponds to the /SM key within the ExtGState's dictionary. The allowable error (or tolerance) is expressed as a fraction of the range of the color component, from 0.0 to 1.0.

public Obj getSoftMask ()

Get the soft mask.

Returns
  • Associated soft mask. NULL if the soft mask is not selected or SDF dictionary representing the soft mask otherwise.

public Matrix2D getSoftMaskTransform ()

Get the soft mask transform.

Returns
  • The soft mask transform. This is the transformation matrix at the moment the soft mask is established in the graphics state with the gs operator. This information is only relevant when applying the soft mask that may be specified in the graphics state to the current element.

public ColorPt getStrokeColor ()

Get the stroke color.

Returns
  • a color value/point represented in the current stroke color space

public ColorSpace getStrokeColorSpace ()

Get the stroke color space.

Returns
  • color space used for stroking

public double getStrokeOpacity ()

Get the stroke opacity.

Returns
  • opacity value for stroke painting operations for paths and glyph outlines. Returns the value of the /CA key in the ExtGState dictionary. If the value is not found, the default value of 1 is returned.

public boolean getStrokeOverprint ()

Get the stroke overprint.

Returns
  • whether overprint is enabled for stroke painting operations. Corresponds to the /OP key within the ExtGState's dictionary.

public int getTextRenderMode ()

Get the text render mode.

Returns
  • current text rendering mode. The text rendering mode determines whether showing text causes glyph outlines to be stroked, filled, used as a clipping boundary, or some combination of the three. See Section 5.2.5 in PDF Reference Manual for details..

public double getTextRise ()

Get the text rise.

Returns
  • current value of text rise Text rise specifies the distance, in unscaled text space units, to move the baseline up or down from its default location. Positive values of text rise move the baseline up

public Obj getTransferFunct ()

Get the transfer funct.

Returns
  • currently selected transfer function (NULL by default) used during color conversion process. A transfer function adjusts the values of color components to compensate for nonlinear response in an output device and in the human eye. Corresponds to the /TR key within the ExtGState's dictionary.

public Matrix2D getTransform ()

Get the transform.

Note: If you are looking for a matrix that maps coordinates to the initial user space see Element::GetCTM().

Returns
  • the transformation matrix for this element.

public Obj getUCRFunct ()

Get the undercolor-removal function

Returns
  • currently selected undercolor-removal function (NULL by default) used during conversion between DeviceRGB and DeviceCMYK. Corresponds to the /UCR key within the ExtGState's dictionary.

public double getWordSpacing ()

Get the word spacing.

Returns
  • currently selected word spacing Word spacing works the same way as character spacing, but applies only to the space character (char code 32). See Section 5.2.2 in PDF Reference Manual for details.

public boolean isTextKnockout ()

Checks if is text knockout.

Returns
  • a boolean flag that determines the text element is considered elementary objects for purposes of color compositing in the transparent imaging model.

public void setAISFlag (boolean AIS)

Specifies if the alpha is to be interpreted as a shape or opacity mask. The alpha source flag ('alpha is shape'), specifies whether the current soft mask and alpha constant are to be interpreted as shape values (true) or opacity values (false).

Parameters
AIS the new AIS flag

public void setAutoStrokeAdjust (boolean SA)

Specify whether to apply automatic stroke adjustment. Corresponds to the /SA key within the ExtGState's dictionary.

Parameters
SA the new auto stroke adjust

public void setBlackGenFunct (Obj BG)

Set black-generation function used during conversion between DeviceRGB and DeviceCMYK. Corresponds to the /BG key within the ExtGState's dictionary.

Parameters
BG - SDF/Cos black-generation function or name

public void setBlendMode (int BM)

Set the current blend mode to be used in the transparent imaging model. Corresponds to the /BM key within the ExtGState's dictionary.

Parameters
BM - New blending mode type.
Throws
PDFNetException gs.this.setBlendMode(e_bl_lighten);

public void setCharSpacing (double char_spacing)

Set character spacing.

Parameters
char_spacing a number specified in unscaled text space units. When the glyph for each character in the string is rendered, the character spacing is added to the horizontal or vertical component of the glyph's displacement, depending on the writing mode. See Section 5.2.1 in PDF Reference Manual for details.

public void setDashPattern (double[] dash_array, double phase)

Set the dash pattern used to stroke paths. The line dash pattern controls the pattern of dashes and gaps used to stroke paths. It is specified by a dash array and a dash phase.

Note: The elements of both the dash array and the dash phase are expressed in user space units.

Parameters
dash_array an array of numbers that specify the lengths of alternating dashes and gaps
phase dash phase specifies the distance into the dash pattern at which to start the dash.

public void setFillColor (PatternColor pattern)

Set the fill color to the given tiling pattern.

Note: The currently selected fill color space must be Pattern color space.

Parameters
pattern SDF pattern object.

public void setFillColor (ColorPt c)

Set the color value/point used for filling operations. The color value must be represented in the currently selected color space used for filling.

Parameters
c the new fill color

public void setFillColor (PatternColor pattern, ColorPt c)

Set the fill color to the given uncolored tiling pattern.

Note: The currently selected fill color space must be Pattern color space.

Parameters
pattern the pattern
c is a color in the pattern's underlying color space.

public void setFillColorSpace (ColorSpace cs)

Set the color space used for filling operations.

Parameters
cs the new fill color space

public void setFillOpacity (double ca)

Set the opacity value for painting operations other than stroking. Corresponds to the value of the /ca key in the ExtGState dictionary.

Parameters
ca the new fill opacity

public void setFillOverprint (boolean op)

Specifies if overprint is enabled for fill operations. Corresponds to the /op key within the ExtGState's dictionary.

Parameters
op the new fill overprint

public void setFlatness (double flatness)

Set the value of flatness tolerance.

Parameters
flatness is a number in the range 0 to 100; a value of 0 specifies the output device's default flatness tolerance. The flatness tolerance controls the maximum permitted distance in device pixels between the mathematically correct path and an approximation constructed from straight line segments.

public void setFont (Font font, double font_sz)

Set the font and font size used to draw text.

Parameters
font font to use
font_sz font size

public void setHalftone (Obj HT)

Set the halftone.

Parameters
HT - SDF/Cos halftone dictionary, stream, or name

public void setHorizontalScale (double hscale)

Set horizontal scale. The horizontal scaling parameter adjusts the width of glyphs by stretching or compressing them in the horizontal direction. Its value is specified as a percentage of the normal width of the glyphs, with 100 being the normal width. The scaling always applies to the horizontal coordinate in text space, independently of the writing mode. See Section 5.2.3 in PDF Reference Manual for details.

Parameters
hscale the new horizontal scale

public void setLeading (double leading)

Set the leading parameter. The leading parameter is measured in unscaled text space units. It specifies the vertical distance between the baselines of adjacent lines of text. See Section 5.2.4 in PDF Reference Manual for details.

Parameters
leading the new leading

public void setLineCap (int cap)

Set LineCap style property. The line cap style specifies the shape to be used at the ends of open subpaths (and dashes, if any) when they are stroked.

Parameters
cap the new line cap

public void setLineJoin (int join)

Set LineJoin style property. The line join style specifies the shape to be used at the corners of paths that are stroked.

Parameters
join the new line join

public void setLineWidth (double width)

Set the thickness of the line used to stroke a path.

Parameters
width a non-negative number expressed in user space units. A line width of 0 denotes the thinnest line that can be rendered at device resolution: 1 device pixel wide.

public void setMiterLimit (double miter_limit)

Set miter limit.

Parameters
miter_limit A number that imposes a maximum on the ratio of the miter length to the line width. When the limit is exceeded, the join is converted from a miter to a bevel.

public void setOverprintMode (int OPM)

Set the overprint mode. Corresponds to the /OPM key within the ExtGState's dictionary.

Parameters
OPM the new overprint mode

public void setRenderingIntent (int intent)

Set the color intent to be used for rendering the Element.

Parameters
intent the new rendering intent

public void setSmoothnessTolerance (double SM)

Set the smoothness tolerance used to control the quality of smooth shading. Corresponds to the /SM key within the ExtGState's dictionary.

Parameters
SM the new smoothness tolerance

public void setSoftMask (Obj SM)

Set the soft mask of the extended graphics state. Corresponds to the /SMask key within the ExtGState's dictionary.

Parameters
SM the new soft mask

public void setStrokeColor (ColorPt c)

Set the color value/point used for stroking operations. The color value must be represented in the currently selected color space used for stroking.

Parameters
c the new stroke color

public void setStrokeColor (PatternColor pattern)

Set the stroke color to the given tiling pattern.

Note: The currently selected stroke color space must be Pattern color space.

Parameters
pattern SDF pattern object.

public void setStrokeColor (PatternColor pattern, ColorPt c)

Set the stroke color to the given uncolored tiling pattern.

Note: The currently selected stroke color space must be Pattern color space.

Parameters
pattern the pattern
c is a color in the pattern's underlying color space.

public void setStrokeColorSpace (ColorSpace cs)

Set the color space used for stroking operations.

Parameters
cs the new stroke color space

public void setStrokeOpacity (double CA)

Set opacity value for stroke painting operations for paths and glyph outlines. Corresponds to the value of the /CA key in the ExtGState dictionary.

Parameters
CA the new stroke opacity

public void setStrokeOverprint (boolean OP)

Specifies if overprint is enabled for stroke operations. Corresponds to the /OP key within the ExtGState's dictionary.

Parameters
OP the new stroke overprint

public void setTextKnockout (boolean knockout)

Mark the object as elementary for purposes of color compositing in the transparent imaging model.

Parameters
knockout the new text knockout

public void setTextRenderMode (int rmode)

Set text rendering mode. The text rendering mode determines whether showing text causes glyph outlines to be stroked, filled, used as a clipping boundary, or some combination of the three. See Section 5.2.5 in PDF Reference Manual for details..

Parameters
rmode the new text render mode

public void setTextRise (double rise)

Set text rise. Text rise specifies the distance, in unscaled text space units, to move the baseline up or down from its default location. Positive values of text rise move the baseline up

Parameters
rise the new text rise

public void setTransferFunct (Obj TR)

Set transfer function used during color conversion process. A transfer function adjusts the values of color components to compensate for nonlinear response in an output device and in the human eye. Corresponds to the /TR key within the ExtGState's dictionary.

Parameters
TR - SDF/Cos transfer function, array, or name

public void setTransform (double a, double b, double c, double d, double h, double v)

Set the transformation matrix for this element. This method accepts text transformation matrix components directly. A transformation matrix in PDF is specified by six numbers, usually in the form of an array containing six elements. In its most general form, this array is denoted [a b c d h v]; it can represent any linear transformation from one coordinate system to another. For more information about PDF matrices please refer to section 4.2.2 'Common Transformations' in PDF Reference Manual, and to documentation for pdftron::Common::Matrix2D class.

Parameters
a - horizontal 'scaling' component of the new text matrix.
b - 'rotation' component of the new text matrix.
c - 'rotation' component of the new text matrix.
d - vertical 'scaling' component of the new text matrix.
h - horizontal translation component of the new text matrix.
v - vertical translation component of the new text matrix.

public void setTransform (Matrix2D mtx)

Set the transformation matrix associated with this element.

Note: in PDF associating a transformation matrix with an element ('cm' operator) will also affect all subsequent elements.

Parameters
mtx The new transformation for this text element.

public void setUCRFunct (Obj UCR)

Set undercolor-removal function used during conversion between DeviceRGB and DeviceCMYK. Corresponds to the /UCR key within the ExtGState's dictionary.

Parameters
UCR - SDF/Cos undercolor-removal function or name

public void setWordSpacing (double word_spacing)

Set word spacing.

Parameters
word_spacing - a number specified in unscaled text space units. Word spacing works the same way as character spacing, but applies only to the space character (char code 32). See Section 5.2.2 in PDF Reference Manual for details.