pdftron.PDF
Class GState

java.lang.Object
  extended by pdftron.PDF.GState

public class GState
extends java.lang.Object

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.

Field Summary
static int e_absolute_colorimetric
          The Constant e_absolute_colorimetric.
static int e_alpha_is_shape
          The Constant e_alpha_is_shape.
static int e_auto_stoke_adjust
          The Constant e_auto_stoke_adjust.
static int e_bevel_join
          The Constant e_bevel_join.
static int e_BG_funct
          The Constant e_BG_funct.
static int e_bl_color
          The Constant e_bl_color.
static int e_bl_color_burn
          The Constant e_bl_color_burn.
static int e_bl_color_dodge
          The Constant e_bl_color_dodge.
static int e_bl_compatible
          The Constant e_bl_compatible.
static int e_bl_darken
          The Constant e_bl_darken.
static int e_bl_difference
          The Constant e_bl_difference.
static int e_bl_exclusion
          The Constant e_bl_exclusion.
static int e_bl_hard_light
          The Constant e_bl_hard_light.
static int e_bl_hue
          The Constant e_bl_hue.
static int e_bl_lighten
          The Constant e_bl_lighten.
static int e_bl_luminosity
          The Constant e_bl_luminosity.
static int e_bl_multiply
          The Constant e_bl_multiply.
static int e_bl_normal
          The Constant e_bl_normal.
static int e_bl_overlay
          The Constant e_bl_overlay.
static int e_bl_saturation
          The Constant e_bl_saturation.
static int e_bl_screen
          The Constant e_bl_screen.
static int e_bl_soft_light
          The Constant e_bl_soft_light.
static int e_blend_mode
          The Constant e_blend_mode.
static int e_butt_cap
          The Constant e_butt_cap.
static int e_char_spacing
          The Constant e_char_spacing.
static int e_clip_text
          The Constant e_clip_text.
static int e_dash_pattern
          The Constant e_dash_pattern.
static int e_fill_clip_text
          The Constant e_fill_clip_text.
static int e_fill_color
          The Constant e_fill_color.
static int e_fill_cs
          The Constant e_fill_cs.
static int e_fill_overprint
          The Constant e_fill_overprint.
static int e_fill_stroke_clip_text
          The Constant e_fill_stroke_clip_text.
static int e_fill_stroke_text
          The Constant e_fill_stroke_text.
static int e_fill_text
          The Constant e_fill_text.
static int e_flatness
          The Constant e_flatness.
static int e_font
          The Constant e_font.
static int e_font_size
          The Constant e_font_size.
static int e_halftone
          The Constant e_halftone.
static int e_horizontal_scale
          The Constant e_horizontal_scale.
static int e_invisible_text
          The Constant e_invisible_text.
static int e_leading
          The Constant e_leading.
static int e_line_cap
          The Constant e_line_cap.
static int e_line_join
          The Constant e_line_join.
static int e_line_width
          The Constant e_line_width.
static int e_miter_join
          The Constant e_miter_join.
static int e_miter_limit
          The Constant e_miter_limit.
static int e_null
          The Constant e_null.
static int e_opacity_fill
          The Constant e_opacity_fill.
static int e_opacity_stroke
          The Constant e_opacity_stroke.
static int e_overprint_mode
          The Constant e_overprint_mode.
static int e_perceptual
          The Constant e_perceptual.
static int e_relative_colorimetric
          The Constant e_relative_colorimetric.
static int e_rendering_intent
          The Constant e_rendering_intent.
static int e_round_cap
          The Constant e_round_cap.
static int e_round_join
          The Constant e_round_join.
static int e_saturation
          The Constant e_saturation.
static int e_smoothnes
          The Constant e_smoothnes.
static int e_soft_mask
          The Constant e_soft_mask.
static int e_square_cap
          The Constant e_square_cap.
static int e_stroke_clip_text
          The Constant e_stroke_clip_text.
static int e_stroke_color
          The Constant e_stroke_color.
static int e_stroke_cs
          The Constant e_stroke_cs.
static int e_stroke_overprint
          The Constant e_stroke_overprint.
static int e_stroke_text
          The Constant e_stroke_text.
static int e_text_knockout
          The Constant e_text_knockout.
static int e_text_pos_offset
          The Constant e_text_pos_offset.
static int e_text_render_mode
          The Constant e_text_render_mode.
static int e_text_rise
          The Constant e_text_rise.
static int e_transfer_funct
          The Constant e_transfer_funct.
static int e_transform
          The Constant e_transform.
static int e_UCR_funct
          The Constant e_UCR_funct.
static int e_word_spacing
          The Constant e_word_spacing.
 
Method Summary
 void concat(double a, double b, double c, double d, double h, double v)
          Concatenate the given matrix to the transformation matrix of this element.
 void concat(Matrix2D mtx)
          Concatenate the given matrix 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.
 PatternColor GetStrokePattern()
          Get the stroke pattern.
 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(ColorPt c)
          Set the color value/point used for filling operations.
 void setFillColor(PatternColor pattern)
          Set the fill color to the given tiling pattern.
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

e_transform

public static final int e_transform
The Constant e_transform.

See Also:
Constant Field Values

e_rendering_intent

public static final int e_rendering_intent
The Constant e_rendering_intent.

See Also:
Constant Field Values

e_stroke_cs

public static final int e_stroke_cs
The Constant e_stroke_cs.

See Also:
Constant Field Values

e_stroke_color

public static final int e_stroke_color
The Constant e_stroke_color.

See Also:
Constant Field Values

e_fill_cs

public static final int e_fill_cs
The Constant e_fill_cs.

See Also:
Constant Field Values

e_fill_color

public static final int e_fill_color
The Constant e_fill_color.

See Also:
Constant Field Values

e_line_width

public static final int e_line_width
The Constant e_line_width.

See Also:
Constant Field Values

e_line_cap

public static final int e_line_cap
The Constant e_line_cap.

See Also:
Constant Field Values

e_line_join

public static final int e_line_join
The Constant e_line_join.

See Also:
Constant Field Values

e_flatness

public static final int e_flatness
The Constant e_flatness.

See Also:
Constant Field Values

e_miter_limit

public static final int e_miter_limit
The Constant e_miter_limit.

See Also:
Constant Field Values

e_dash_pattern

public static final int e_dash_pattern
The Constant e_dash_pattern.

See Also:
Constant Field Values

e_char_spacing

public static final int e_char_spacing
The Constant e_char_spacing.

See Also:
Constant Field Values

e_word_spacing

public static final int e_word_spacing
The Constant e_word_spacing.

See Also:
Constant Field Values

e_horizontal_scale

public static final int e_horizontal_scale
The Constant e_horizontal_scale.

See Also:
Constant Field Values

e_leading

public static final int e_leading
The Constant e_leading.

See Also:
Constant Field Values

e_font

public static final int e_font
The Constant e_font.

See Also:
Constant Field Values

e_font_size

public static final int e_font_size
The Constant e_font_size.

See Also:
Constant Field Values

e_text_render_mode

public static final int e_text_render_mode
The Constant e_text_render_mode.

See Also:
Constant Field Values

e_text_rise

public static final int e_text_rise
The Constant e_text_rise.

See Also:
Constant Field Values

e_text_knockout

public static final int e_text_knockout
The Constant e_text_knockout.

See Also:
Constant Field Values

e_text_pos_offset

public static final int e_text_pos_offset
The Constant e_text_pos_offset.

See Also:
Constant Field Values

e_blend_mode

public static final int e_blend_mode
The Constant e_blend_mode.

See Also:
Constant Field Values

e_opacity_fill

public static final int e_opacity_fill
The Constant e_opacity_fill.

See Also:
Constant Field Values

e_opacity_stroke

public static final int e_opacity_stroke
The Constant e_opacity_stroke.

See Also:
Constant Field Values

e_alpha_is_shape

public static final int e_alpha_is_shape
The Constant e_alpha_is_shape.

See Also:
Constant Field Values

e_soft_mask

public static final int e_soft_mask
The Constant e_soft_mask.

See Also:
Constant Field Values

e_smoothnes

public static final int e_smoothnes
The Constant e_smoothnes.

See Also:
Constant Field Values

e_auto_stoke_adjust

public static final int e_auto_stoke_adjust
The Constant e_auto_stoke_adjust.

See Also:
Constant Field Values

e_stroke_overprint

public static final int e_stroke_overprint
The Constant e_stroke_overprint.

See Also:
Constant Field Values

e_fill_overprint

public static final int e_fill_overprint
The Constant e_fill_overprint.

See Also:
Constant Field Values

e_overprint_mode

public static final int e_overprint_mode
The Constant e_overprint_mode.

See Also:
Constant Field Values

e_transfer_funct

public static final int e_transfer_funct
The Constant e_transfer_funct.

See Also:
Constant Field Values

e_BG_funct

public static final int e_BG_funct
The Constant e_BG_funct.

See Also:
Constant Field Values

e_UCR_funct

public static final int e_UCR_funct
The Constant e_UCR_funct.

See Also:
Constant Field Values

e_halftone

public static final int e_halftone
The Constant e_halftone.

See Also:
Constant Field Values

e_null

public static final int e_null
The Constant e_null.

See Also:
Constant Field Values

e_butt_cap

public static final int e_butt_cap
The Constant e_butt_cap.

See Also:
Constant Field Values

e_round_cap

public static final int e_round_cap
The Constant e_round_cap.

See Also:
Constant Field Values

e_square_cap

public static final int e_square_cap
The Constant e_square_cap.

See Also:
Constant Field Values

e_miter_join

public static final int e_miter_join
The Constant e_miter_join.

See Also:
Constant Field Values

e_round_join

public static final int e_round_join
The Constant e_round_join.

See Also:
Constant Field Values

e_bevel_join

public static final int e_bevel_join
The Constant e_bevel_join.

See Also:
Constant Field Values

e_fill_text

public static final int e_fill_text
The Constant e_fill_text.

See Also:
Constant Field Values

e_stroke_text

public static final int e_stroke_text
The Constant e_stroke_text.

See Also:
Constant Field Values

e_fill_stroke_text

public static final int e_fill_stroke_text
The Constant e_fill_stroke_text.

See Also:
Constant Field Values

e_invisible_text

public static final int e_invisible_text
The Constant e_invisible_text.

See Also:
Constant Field Values

e_fill_clip_text

public static final int e_fill_clip_text
The Constant e_fill_clip_text.

See Also:
Constant Field Values

e_stroke_clip_text

public static final int e_stroke_clip_text
The Constant e_stroke_clip_text.

See Also:
Constant Field Values

e_fill_stroke_clip_text

public static final int e_fill_stroke_clip_text
The Constant e_fill_stroke_clip_text.

See Also:
Constant Field Values

e_clip_text

public static final int e_clip_text
The Constant e_clip_text.

See Also:
Constant Field Values

e_absolute_colorimetric

public static final int e_absolute_colorimetric
The Constant e_absolute_colorimetric.

See Also:
Constant Field Values

e_relative_colorimetric

public static final int e_relative_colorimetric
The Constant e_relative_colorimetric.

See Also:
Constant Field Values

e_saturation

public static final int e_saturation
The Constant e_saturation.

See Also:
Constant Field Values

e_perceptual

public static final int e_perceptual
The Constant e_perceptual.

See Also:
Constant Field Values

e_bl_compatible

public static final int e_bl_compatible
The Constant e_bl_compatible.

See Also:
Constant Field Values

e_bl_normal

public static final int e_bl_normal
The Constant e_bl_normal.

See Also:
Constant Field Values

e_bl_multiply

public static final int e_bl_multiply
The Constant e_bl_multiply.

See Also:
Constant Field Values

e_bl_screen

public static final int e_bl_screen
The Constant e_bl_screen.

See Also:
Constant Field Values

e_bl_difference

public static final int e_bl_difference
The Constant e_bl_difference.

See Also:
Constant Field Values

e_bl_darken

public static final int e_bl_darken
The Constant e_bl_darken.

See Also:
Constant Field Values

e_bl_lighten

public static final int e_bl_lighten
The Constant e_bl_lighten.

See Also:
Constant Field Values

e_bl_color_dodge

public static final int e_bl_color_dodge
The Constant e_bl_color_dodge.

See Also:
Constant Field Values

e_bl_color_burn

public static final int e_bl_color_burn
The Constant e_bl_color_burn.

See Also:
Constant Field Values

e_bl_exclusion

public static final int e_bl_exclusion
The Constant e_bl_exclusion.

See Also:
Constant Field Values

e_bl_hard_light

public static final int e_bl_hard_light
The Constant e_bl_hard_light.

See Also:
Constant Field Values

e_bl_overlay

public static final int e_bl_overlay
The Constant e_bl_overlay.

See Also:
Constant Field Values

e_bl_soft_light

public static final int e_bl_soft_light
The Constant e_bl_soft_light.

See Also:
Constant Field Values

e_bl_luminosity

public static final int e_bl_luminosity
The Constant e_bl_luminosity.

See Also:
Constant Field Values

e_bl_hue

public static final int e_bl_hue
The Constant e_bl_hue.

See Also:
Constant Field Values

e_bl_saturation

public static final int e_bl_saturation
The Constant e_bl_saturation.

See Also:
Constant Field Values

e_bl_color

public static final int e_bl_color
The Constant e_bl_color.

See Also:
Constant Field Values
Method Detail

getTransform

public Matrix2D getTransform()
                      throws PDFNetException
Get the transform.

Returns:
the transformation matrix for this element.
Throws:
PDFNetException
Note:
If you are looking for a matrix that maps coordinates to the initial user space see Element::GetCTM().

getStrokeColorSpace

public ColorSpace getStrokeColorSpace()
                               throws PDFNetException
Get the stroke color space.

Returns:
color space used for stroking
Throws:
PDFNetException

getFillColorSpace

public ColorSpace getFillColorSpace()
                             throws PDFNetException
Get the fill color space.

Returns:
color space used for filling
Throws:
PDFNetException

getStrokeColor

public ColorPt getStrokeColor()
                       throws PDFNetException
Get the stroke color.

Returns:
a color value/point represented in the current stroke color space
Throws:
PDFNetException

GetStrokePattern

public PatternColor GetStrokePattern()
                              throws PDFNetException
Get the stroke pattern.

Returns:
the SDF pattern object of currently selected PatternColorSpace used for stroking.
Throws:
PDFNetException

getFillColor

public ColorPt getFillColor()
                     throws PDFNetException
Get the fill color.

Returns:
a color value/point represented in the current fill color space
Throws:
PDFNetException

getFillPattern

public PatternColor getFillPattern()
                            throws PDFNetException
Get the fill pattern.

Returns:
the SDF pattern object of currently selected PatternColorSpace used for filling.
Throws:
PDFNetException

getFlatness

public double getFlatness()
                   throws PDFNetException
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.
Throws:
PDFNetException

getLineCap

public int getLineCap()
               throws PDFNetException
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.
Throws:
PDFNetException

getLineJoin

public int getLineJoin()
                throws PDFNetException
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.
Throws:
PDFNetException

getLineWidth

public double getLineWidth()
                    throws PDFNetException
Get the line width.

Returns:
the thickness of the line used to stroke a path.
Throws:
PDFNetException
Note:
A line width of 0 denotes the thinnest line that can be rendered at device resolution: 1 device pixel wide.

getMiterLimit

public double getMiterLimit()
                     throws PDFNetException
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.
Throws:
PDFNetException

getDashes

public double[] getDashes()
                   throws PDFNetException
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.
Throws:
PDFNetException

getPhase

public double getPhase()
                throws PDFNetException
Get the phase.

Returns:
the phase of the currently selected dash pattern. dash phase is expressed in user space units.
Throws:
PDFNetException

getCharSpacing

public double getCharSpacing()
                      throws PDFNetException
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.
Throws:
PDFNetException

getWordSpacing

public double getWordSpacing()
                      throws PDFNetException
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.
Throws:
PDFNetException

getHorizontalScale

public double getHorizontalScale()
                          throws PDFNetException
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.
Throws:
PDFNetException

getLeading

public double getLeading()
                  throws PDFNetException
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.
Throws:
PDFNetException

getFont

public Font getFont()
             throws PDFNetException
Get the font.

Returns:
currently selected font
Throws:
PDFNetException

getFontSize

public double getFontSize()
                   throws PDFNetException
Get the font size.

Returns:
the font size
Throws:
PDFNetException

getTextRenderMode

public int getTextRenderMode()
                      throws PDFNetException
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..
Throws:
PDFNetException

getTextRise

public double getTextRise()
                   throws PDFNetException
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
Throws:
PDFNetException

isTextKnockout

public boolean isTextKnockout()
                       throws PDFNetException
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.
Throws:
PDFNetException

getRenderingIntent

public int getRenderingIntent()
                       throws PDFNetException
Get the rendering intent.

Returns:
The color intent to be used for rendering the Element
Throws:
PDFNetException

getBlendMode

public int getBlendMode()
                 throws PDFNetException
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.
Throws:
PDFNetException

getFillOpacity

public double getFillOpacity()
                      throws PDFNetException
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.
Throws:
PDFNetException

getStrokeOpacity

public double getStrokeOpacity()
                        throws PDFNetException
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.
Throws:
PDFNetException

getAISFlag

public boolean getAISFlag()
                   throws PDFNetException
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).
Throws:
PDFNetException

getSoftMask

public Obj getSoftMask()
                throws PDFNetException
Get the soft mask.

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

getSoftMaskTransform

public Matrix2D getSoftMaskTransform()
                              throws PDFNetException
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.
Throws:
PDFNetException

getStrokeOverprint

public boolean getStrokeOverprint()
                           throws PDFNetException
Get the stroke overprint.

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

getFillOverprint

public boolean getFillOverprint()
                         throws PDFNetException
Get the fill overprint.

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

getOverprintMode

public int getOverprintMode()
                     throws PDFNetException
Get the overprint mode.

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

getAutoStrokeAdjust

public boolean getAutoStrokeAdjust()
                            throws PDFNetException
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.
Throws:
PDFNetException

getSmoothnessTolerance

public double getSmoothnessTolerance()
                              throws PDFNetException
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.
Throws:
PDFNetException

getTransferFunct

public Obj getTransferFunct()
                     throws PDFNetException
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.
Throws:
PDFNetException

getBlackGenFunct

public Obj getBlackGenFunct()
                     throws PDFNetException
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.
Throws:
PDFNetException

getUCRFunct

public Obj getUCRFunct()
                throws PDFNetException
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.
Throws:
PDFNetException

getHalftone

public Obj getHalftone()
                throws PDFNetException
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.
Throws:
PDFNetException

setTransform

public void setTransform(Matrix2D mtx)
                  throws PDFNetException
Set the transformation matrix associated with this element.

Parameters:
mtx - The new transformation for this text element.
Throws:
PDFNetException
Note:
in PDF associating a transformation matrix with an element ('cm' operator) will also affect all subsequent elements.

setTransform

public void setTransform(double a,
                         double b,
                         double c,
                         double d,
                         double h,
                         double v)
                  throws PDFNetException
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 - - vertical 'scaling' component of the new text matrix.
d - - 'rotation' component of the new text matrix.
h - - horizontal translation component of the new text matrix.
v - - vertical translation component of the new text matrix.
Throws:
PDFNetException

concat

public void concat(Matrix2D mtx)
            throws PDFNetException
Concatenate the given matrix to the transformation matrix of this element.

Parameters:
mtx - the mtx
Throws:
PDFNetException

concat

public void concat(double a,
                   double b,
                   double c,
                   double d,
                   double h,
                   double v)
            throws PDFNetException
Concatenate the given matrix to the transformation matrix of this element.

Parameters:
a - the matrix element in the first row, first column.
b - the matrix element in the first row, second column.
c - the matrix element in the second row, first column.
d - the matrix element in the second row, second column.
h - the matrix element in the third row, first column.
v - the matrix element in the third row, second column.
Throws:
PDFNetException

setStrokeColorSpace

public void setStrokeColorSpace(ColorSpace cs)
                         throws PDFNetException
Set the color space used for stroking operations.

Parameters:
cs - the new stroke color space
Throws:
PDFNetException

setFillColorSpace

public void setFillColorSpace(ColorSpace cs)
                       throws PDFNetException
Set the color space used for filling operations.

Parameters:
cs - the new fill color space
Throws:
PDFNetException

setStrokeColor

public void setStrokeColor(ColorPt c)
                    throws PDFNetException
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
Throws:
PDFNetException

setStrokeColor

public void setStrokeColor(PatternColor pattern)
                    throws PDFNetException
Set the stroke color to the given tiling pattern.

Parameters:
pattern - SDF pattern object.
Throws:
PDFNetException
Note:
The currently selected stroke color space must be Pattern color space.

setStrokeColor

public void setStrokeColor(PatternColor pattern,
                           ColorPt c)
                    throws PDFNetException
Set the stroke color to the given uncolored tiling pattern.

Parameters:
pattern - the pattern
c - is a color in the pattern’s underlying color space.
Throws:
PDFNetException
Note:
The currently selected stroke color space must be Pattern color space.

setFillColor

public void setFillColor(ColorPt c)
                  throws PDFNetException
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
Throws:
PDFNetException

setFillColor

public void setFillColor(PatternColor pattern)
                  throws PDFNetException
Set the fill color to the given tiling pattern.

Parameters:
pattern - SDF pattern object.
Throws:
PDFNetException
Note:
The currently selected fill color space must be Pattern color space.

setFillColor

public void setFillColor(PatternColor pattern,
                         ColorPt c)
                  throws PDFNetException
Set the fill color to the given uncolored tiling pattern.

Parameters:
pattern - the pattern
c - is a color in the pattern’s underlying color space.
Throws:
PDFNetException
Note:
The currently selected fill color space must be Pattern color space.

setFlatness

public void setFlatness(double flatness)
                 throws PDFNetException
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.
Throws:
PDFNetException

setLineCap

public void setLineCap(int cap)
                throws PDFNetException
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
Throws:
PDFNetException

setLineJoin

public void setLineJoin(int join)
                 throws PDFNetException
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
Throws:
PDFNetException

setLineWidth

public void setLineWidth(double width)
                  throws PDFNetException
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.
Throws:
PDFNetException

setMiterLimit

public void setMiterLimit(double miter_limit)
                   throws PDFNetException
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.
Throws:
PDFNetException

setDashPattern

public void setDashPattern(double[] dash_array,
                           double phase)
                    throws PDFNetException
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.

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.
Throws:
PDFNetException
Note:
The elements of both the dash array and the dash phase are expressed in user space units.

setCharSpacing

public void setCharSpacing(double char_spacing)
                    throws PDFNetException
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.
Throws:
PDFNetException

setWordSpacing

public void setWordSpacing(double word_spacing)
                    throws PDFNetException
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.
Throws:
PDFNetException

setHorizontalScale

public void setHorizontalScale(double hscale)
                        throws PDFNetException
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
Throws:
PDFNetException

setLeading

public void setLeading(double leading)
                throws PDFNetException
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
Throws:
PDFNetException

setFont

public void setFont(Font font,
                    double font_sz)
             throws PDFNetException
Set the font and font size used to draw text.

Parameters:
font - font to use
font_sz - font size
Throws:
PDFNetException

setTextRenderMode

public void setTextRenderMode(int rmode)
                       throws PDFNetException
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
Throws:
PDFNetException

setTextRise

public void setTextRise(double rise)
                 throws PDFNetException
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
Throws:
PDFNetException

setTextKnockout

public void setTextKnockout(boolean knockout)
                     throws PDFNetException
Mark the object as elementary for purposes of color compositing in the transparent imaging model.

Parameters:
knockout - the new text knockout
Throws:
PDFNetException

setRenderingIntent

public void setRenderingIntent(int intent)
                        throws PDFNetException
Set the color intent to be used for rendering the Element.

Parameters:
intent - the new rendering intent
Throws:
PDFNetException

setBlendMode

public void setBlendMode(int BM)
                  throws PDFNetException
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

setFillOpacity

public void setFillOpacity(double ca)
                    throws PDFNetException
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
Throws:
PDFNetException

setStrokeOpacity

public void setStrokeOpacity(double CA)
                      throws PDFNetException
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
Throws:
PDFNetException

setAISFlag

public void setAISFlag(boolean AIS)
                throws PDFNetException
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
Throws:
PDFNetException

setSoftMask

public void setSoftMask(Obj SM)
                 throws PDFNetException
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
Throws:
PDFNetException

setStrokeOverprint

public void setStrokeOverprint(boolean OP)
                        throws PDFNetException
Specifies if overprint is enabled for stroke operations. Corresponds to the /OP key within the ExtGState's dictionary.

Parameters:
OP - the new stroke overprint
Throws:
PDFNetException

setFillOverprint

public void setFillOverprint(boolean op)
                      throws PDFNetException
Specifies if overprint is enabled for fill operations. Corresponds to the /op key within the ExtGState's dictionary.

Parameters:
op - the new fill overprint
Throws:
PDFNetException

setOverprintMode

public void setOverprintMode(int OPM)
                      throws PDFNetException
Set the overprint mode. Corresponds to the /OPM key within the ExtGState's dictionary.

Parameters:
OPM - the new overprint mode
Throws:
PDFNetException

setAutoStrokeAdjust

public void setAutoStrokeAdjust(boolean SA)
                         throws PDFNetException
Specify whether to apply automatic stroke adjustment. Corresponds to the /SA key within the ExtGState's dictionary.

Parameters:
SA - the new auto stroke adjust
Throws:
PDFNetException

setSmoothnessTolerance

public void setSmoothnessTolerance(double SM)
                            throws PDFNetException
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
Throws:
PDFNetException

setBlackGenFunct

public void setBlackGenFunct(Obj BG)
                      throws PDFNetException
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
Throws:
PDFNetException

setUCRFunct

public void setUCRFunct(Obj UCR)
                 throws PDFNetException
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
Throws:
PDFNetException

setTransferFunct

public void setTransferFunct(Obj TR)
                      throws PDFNetException
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
Throws:
PDFNetException

setHalftone

public void setHalftone(Obj HT)
                 throws PDFNetException
Set the halftone.

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


© 2002-2011 PDFTron Systems Inc.