All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pdftron::PDF::GState Class Reference

#include <GState.h>

Public Types

enum  GStateAttribute {
  e_transform = 0, e_rendering_intent, e_stroke_cs, e_stroke_color,
  e_fill_cs, e_fill_color, e_line_width, e_line_cap,
  e_line_join, e_flatness, e_miter_limit, e_dash_pattern,
  e_char_spacing, e_word_spacing, e_horizontal_scale, e_leading,
  e_font, e_font_size, e_text_render_mode, e_text_rise,
  e_text_knockout, e_text_pos_offset, e_blend_mode, e_opacity_fill,
  e_opacity_stroke, e_alpha_is_shape, e_soft_mask, e_smoothnes,
  e_auto_stoke_adjust, e_stroke_overprint, e_fill_overprint, e_overprint_mode,
  e_transfer_funct, e_BG_funct, e_UCR_funct, e_halftone,
  e_null
}
 
enum  LineCap { e_butt_cap = 0, e_round_cap, e_square_cap }
 
enum  LineJoin { e_miter_join = 0, e_round_join, e_bevel_join }
 
enum  TextRenderingMode {
  e_fill_text = 0, e_stroke_text, e_fill_stroke_text, e_invisible_text,
  e_fill_clip_text, e_stroke_clip_text, e_fill_stroke_clip_text, e_clip_text
}
 
enum  RenderingIntent { e_absolute_colorimetric, e_relative_colorimetric, e_saturation, e_perceptual }
 
enum  BlendMode {
  e_bl_compatible = 0, e_bl_normal, e_bl_multiply, e_bl_screen,
  e_bl_difference, e_bl_darken, e_bl_lighten, e_bl_color_dodge,
  e_bl_color_burn, e_bl_exclusion, e_bl_hard_light, e_bl_overlay,
  e_bl_soft_light, e_bl_luminosity, e_bl_hue, e_bl_saturation,
  e_bl_color
}
 

Public Member Functions

 GState ()
 
 GState (const GState &c)
 
GStateoperator= (const GState &c)
 
Common::Matrix2D GetTransform ()
 
ColorSpace GetStrokeColorSpace ()
 
ColorSpace GetFillColorSpace ()
 
ColorPt GetStrokeColor ()
 
PatternColor GetStrokePattern ()
 
ColorPt GetFillColor ()
 
PatternColor GetFillPattern ()
 
double GetFlatness () const
 
LineCap GetLineCap () const
 
LineJoin GetLineJoin () const
 
double GetLineWidth () const
 
double GetMiterLimit () const
 
std::vector< double > GetDashes () const
 
void GetDashes (std::vector< double > &dashes) const
 
double GetPhase () const
 
double GetCharSpacing () const
 
double GetWordSpacing () const
 
double GetHorizontalScale () const
 
double GetLeading () const
 
Font GetFont () const
 
double GetFontSize () const
 
TextRenderingMode GetTextRenderMode () const
 
double GetTextRise () const
 
bool IsTextKnockout () const
 
RenderingIntent GetRenderingIntent () const
 
BlendMode GetBlendMode ()
 
double GetFillOpacity () const
 
double GetStrokeOpacity () const
 
bool GetAISFlag () const
 
SDF::Obj GetSoftMask ()
 
Common::Matrix2D GetSoftMaskTransform ()
 
bool GetStrokeOverprint () const
 
bool GetFillOverprint () const
 
int GetOverprintMode () const
 
bool GetAutoStrokeAdjust () const
 
double GetSmoothnessTolerance () const
 
SDF::Obj GetTransferFunct ()
 
SDF::Obj GetBlackGenFunct ()
 
SDF::Obj GetUCRFunct ()
 
SDF::Obj GetHalftone ()
 
void SetTransform (const Common::Matrix2D &mtx)
 
void SetTransform (double a, double b, double c, double d, double h, double v)
 
void Concat (const Common::Matrix2D &mtx)
 
void Concat (double a, double b, double c, double d, double h, double v)
 
void SetStrokeColorSpace (ColorSpace cs)
 
void SetFillColorSpace (ColorSpace cs)
 
void SetStrokeColor (const ColorPt &c)
 
void SetStrokeColor (PatternColor pattern)
 
void SetStrokeColor (PatternColor pattern, const ColorPt &c)
 
void SetFillColor (const ColorPt &c)
 
void SetFillColor (PatternColor pattern)
 
void SetFillColor (PatternColor pattern, const ColorPt &c)
 
void SetFlatness (double flatness)
 
void SetLineCap (LineCap cap)
 
void SetLineJoin (LineJoin join)
 
void SetLineWidth (double width)
 
void SetMiterLimit (double miter_limit)
 
void SetDashPattern (const std::vector< double > &dash_array, double phase)
 
void SetCharSpacing (double char_spacing)
 
void SetWordSpacing (double word_spacing)
 
void SetHorizontalScale (double hscale)
 
void SetLeading (double leading)
 
void SetFont (Font font, double font_sz)
 
void SetTextRenderMode (TextRenderingMode rmode)
 
void SetTextRise (double rise)
 
void SetTextKnockout (bool knockout)
 
void SetRenderingIntent (RenderingIntent intent)
 
void SetBlendMode (BlendMode BM)
 
void SetFillOpacity (double ca)
 
void SetStrokeOpacity (double ca)
 
void SetAISFlag (bool AIS)
 
void SetSoftMask (SDF::Obj SM)
 
void SetStrokeOverprint (bool OP)
 
void SetFillOverprint (bool op)
 
void SetOverprintMode (int OPM)
 
void SetAutoStrokeAdjust (bool SA)
 
void SetSmoothnessTolerance (double SM)
 
void SetBlackGenFunct (SDF::Obj BG)
 
void SetUCRFunct (SDF::Obj UCR)
 
void SetTransferFunct (SDF::Obj TR)
 
void SetHalftone (SDF::Obj HT)
 

Static Public Member Functions

static RenderingIntent GetRenderingIntentType (const char *name)
 

Detailed Description

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.

Definition at line 26 of file GState.h.

Member Enumeration Documentation

Enumerator
e_bl_compatible 
e_bl_normal 
e_bl_multiply 
e_bl_screen 
e_bl_difference 
e_bl_darken 
e_bl_lighten 
e_bl_color_dodge 
e_bl_color_burn 
e_bl_exclusion 
e_bl_hard_light 
e_bl_overlay 
e_bl_soft_light 
e_bl_luminosity 
e_bl_hue 
e_bl_saturation 
e_bl_color 

Definition at line 314 of file GState.h.

Enumerator
e_transform 
e_rendering_intent 
e_stroke_cs 
e_stroke_color 
e_fill_cs 
e_fill_color 
e_line_width 
e_line_cap 
e_line_join 
e_flatness 
e_miter_limit 
e_dash_pattern 
e_char_spacing 
e_word_spacing 
e_horizontal_scale 
e_leading 
e_font 
e_font_size 
e_text_render_mode 
e_text_rise 
e_text_knockout 
e_text_pos_offset 
e_blend_mode 
e_opacity_fill 
e_opacity_stroke 
e_alpha_is_shape 
e_soft_mask 
e_smoothnes 
e_auto_stoke_adjust 
e_stroke_overprint 
e_fill_overprint 
e_overprint_mode 
e_transfer_funct 
e_BG_funct 
e_UCR_funct 
e_halftone 
e_null 

Definition at line 35 of file GState.h.

Enumerator
e_butt_cap 
e_round_cap 
e_square_cap 

Definition at line 137 of file GState.h.

Enumerator
e_miter_join 
e_round_join 
e_bevel_join 

Definition at line 153 of file GState.h.

Enumerator
e_absolute_colorimetric 
e_relative_colorimetric 
e_saturation 
e_perceptual 

Definition at line 290 of file GState.h.

Enumerator
e_fill_text 
e_stroke_text 
e_fill_stroke_text 
e_invisible_text 
e_fill_clip_text 
e_stroke_clip_text 
e_fill_stroke_clip_text 
e_clip_text 

Definition at line 253 of file GState.h.

Constructor & Destructor Documentation

pdftron::PDF::GState::GState ( )
pdftron::PDF::GState::GState ( const GState c)

Member Function Documentation

void pdftron::PDF::GState::Concat ( const Common::Matrix2D mtx)

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

Parameters
mtxMatrix2D object to concatenate the current matrix with.
void pdftron::PDF::GState::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.
bool pdftron::PDF::GState::GetAISFlag ( ) const
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).
bool pdftron::PDF::GState::GetAutoStrokeAdjust ( ) const
Returns
a flag specifying whether stroke adjustment is enabled in the graphics state. Corresponds to the /SA key within the ExtGState's dictionary.
SDF::Obj pdftron::PDF::GState::GetBlackGenFunct ( )
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.
BlendMode pdftron::PDF::GState::GetBlendMode ( )
Returns
the current blend mode to be used in the transparent imaging model. Corresponds to the /BM key within the ExtGState's dictionary.
double pdftron::PDF::GState::GetCharSpacing ( ) const
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.

std::vector<double> pdftron::PDF::GState::GetDashes ( ) const
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.

void pdftron::PDF::GState::GetDashes ( std::vector< double > &  dashes) const
ColorPt pdftron::PDF::GState::GetFillColor ( )
Returns
a color value/point represented in the current fill color space
ColorSpace pdftron::PDF::GState::GetFillColorSpace ( )
Returns
color space used for filling
double pdftron::PDF::GState::GetFillOpacity ( ) const
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.
bool pdftron::PDF::GState::GetFillOverprint ( ) const
Returns
whether overprint is enabled for fill painting operations. Corresponds to the /op key within the ExtGState's dictionary.
PatternColor pdftron::PDF::GState::GetFillPattern ( )
Returns
the pattern color of currently selected pattern color space used for filling.
double pdftron::PDF::GState::GetFlatness ( ) const
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.

Font pdftron::PDF::GState::GetFont ( ) const
Returns
currently selected font
double pdftron::PDF::GState::GetFontSize ( ) const
Returns
the font size
SDF::Obj pdftron::PDF::GState::GetHalftone ( )
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.
double pdftron::PDF::GState::GetHorizontalScale ( ) const
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.

double pdftron::PDF::GState::GetLeading ( ) const
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.

LineCap pdftron::PDF::GState::GetLineCap ( ) const
Returns
currently selected LineCap style

The line cap style specifies the shape to be used at the ends of open sub-paths (and dashes, if any) when they are stroked.

LineJoin pdftron::PDF::GState::GetLineJoin ( ) const
Returns
currently selected LineJoin style

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

double pdftron::PDF::GState::GetLineWidth ( ) const
Returns
the thickness of the line used to stroke a path.
Note
A line width of 0 denotes the thinnest line that can be rendered at device resolution: 1 device pixel wide.
double pdftron::PDF::GState::GetMiterLimit ( ) const
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.

int pdftron::PDF::GState::GetOverprintMode ( ) const
Returns
the overprint mode used by this graphics state. Corresponds to the /OPM key within the ExtGState's dictionary.
double pdftron::PDF::GState::GetPhase ( ) const
Returns
the phase of the currently selected dash pattern. dash phase is expressed in user space units.
RenderingIntent pdftron::PDF::GState::GetRenderingIntent ( ) const
Returns
The color intent to be used for rendering the Element
static RenderingIntent pdftron::PDF::GState::GetRenderingIntentType ( const char *  name)
static

A utility function that maps a string representing a rendering intent to RenderingIntent type.

Parameters
namestring that represents the rendering intent to get.
Returns
The color rendering intent type matching the specified string
double pdftron::PDF::GState::GetSmoothnessTolerance ( ) const
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.
SDF::Obj pdftron::PDF::GState::GetSoftMask ( )
Returns
Associated soft mask. NULL if the soft mask is not selected or SDF dictionary representing the soft mask otherwise.
Common::Matrix2D pdftron::PDF::GState::GetSoftMaskTransform ( )
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.
ColorPt pdftron::PDF::GState::GetStrokeColor ( )
Returns
a color value/point represented in the current stroke color space
ColorSpace pdftron::PDF::GState::GetStrokeColorSpace ( )
Returns
color space used for stroking
double pdftron::PDF::GState::GetStrokeOpacity ( ) const
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.
bool pdftron::PDF::GState::GetStrokeOverprint ( ) const
Returns
whether overprint is enabled for stroke painting operations. Corresponds to the /OP key within the ExtGState's dictionary.
PatternColor pdftron::PDF::GState::GetStrokePattern ( )
Returns
the SDF pattern object of currently selected PatternColorSpace used for stroking.
TextRenderingMode pdftron::PDF::GState::GetTextRenderMode ( ) const
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..

double pdftron::PDF::GState::GetTextRise ( ) const
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

SDF::Obj pdftron::PDF::GState::GetTransferFunct ( )
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.
Common::Matrix2D pdftron::PDF::GState::GetTransform ( )
Returns
the transformation matrix for this element.
Note
If you are looking for a matrix that maps coordinates to the initial user space see Element::GetCTM().
SDF::Obj pdftron::PDF::GState::GetUCRFunct ( )
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.
double pdftron::PDF::GState::GetWordSpacing ( ) const
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.

bool pdftron::PDF::GState::IsTextKnockout ( ) const
Returns
a boolean flag that determines the text element is considered elementary objects for purposes of color compositing in the transparent imaging model.
GState& pdftron::PDF::GState::operator= ( const GState c)
void pdftron::PDF::GState::SetAISFlag ( bool  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
AIStrue for interpretation as shape values or false for opacity values
void pdftron::PDF::GState::SetAutoStrokeAdjust ( bool  SA)

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

Parameters
SAif true automatic stroke adjustment will be applied.
void pdftron::PDF::GState::SetBlackGenFunct ( SDF::Obj  BG)

Sets 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
void pdftron::PDF::GState::SetBlendMode ( BlendMode  BM)

Sets 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.
* // C#
* gs.SetBlendMode(GState.BlendMode.e_lighten);
*
* // C++
* gs->SetBlendMode(GState::e_lighten);
*
void pdftron::PDF::GState::SetCharSpacing ( double  char_spacing)

Sets character spacing.

Parameters
char_spacinga 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.
void pdftron::PDF::GState::SetDashPattern ( const std::vector< double > &  dash_array,
double  phase 
)

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

Parameters
dash_arraythe numbers that specify the lengths of alternating dashes and gaps.
phasespecifies the distance into the dash pattern at which to start the dash.
void pdftron::PDF::GState::SetFillColor ( const ColorPt c)

Sets the color value/point used for filling operations.

Parameters
cthe color used for filling operations The color value must be represented in the currently selected color space used for filling.
void pdftron::PDF::GState::SetFillColor ( PatternColor  pattern)

Set the fill color to the given tiling pattern.

Parameters
patternNew pattern color.
Note
The currently selected fill color space must be Pattern color space.
void pdftron::PDF::GState::SetFillColor ( PatternColor  pattern,
const ColorPt c 
)

Set the fill color to the given uncolored tiling pattern.

Parameters
patternPatternColor (PatternType = 1 and PaintType = 2) object.
cis a color in the pattern's underlying color space.
Note
The currently selected fill color space must be Pattern color space.
void pdftron::PDF::GState::SetFillColorSpace ( ColorSpace  cs)

Sets the color space used for filling operations

Parameters
csColorSpace object to use for filling operations
void pdftron::PDF::GState::SetFillOpacity ( double  ca)

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

Parameters
cavalue to set fill opacity to
void pdftron::PDF::GState::SetFillOverprint ( bool  op)

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

Parameters
optrue to enable overprint for fill, false to disable.
void pdftron::PDF::GState::SetFlatness ( double  flatness)

Sets the value of flatness tolerance.

Parameters
flatnessis 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.

void pdftron::PDF::GState::SetFont ( Font  font,
double  font_sz 
)

Sets the font and font size used to draw text.

Parameters
fontFont to draw the text with
font_szsize of the font to draw the text with
void pdftron::PDF::GState::SetHalftone ( SDF::Obj  HT)

Sets 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.

Parameters
HT- SDF/Cos halftone dictionary, stream, or name
void pdftron::PDF::GState::SetHorizontalScale ( double  hscale)

Sets 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
hscalevalue to set horizontal scale to.
void pdftron::PDF::GState::SetLeading ( double  leading)

Sets 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
leadingnumber representing vertical distance between lines of text
void pdftron::PDF::GState::SetLineCap ( LineCap  cap)

Sets 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.

void pdftron::PDF::GState::SetLineJoin ( LineJoin  join)

Sets LineJoin style property.

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

void pdftron::PDF::GState::SetLineWidth ( double  width)

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

Parameters
widtha 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.
void pdftron::PDF::GState::SetMiterLimit ( double  miter_limit)

Sets miter limit.

Parameters
miter_limitA 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.
void pdftron::PDF::GState::SetOverprintMode ( int  OPM)

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

Parameters
OPMoverprint mode.
void pdftron::PDF::GState::SetRenderingIntent ( RenderingIntent  intent)

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

void pdftron::PDF::GState::SetSmoothnessTolerance ( double  SM)

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

void pdftron::PDF::GState::SetSoftMask ( SDF::Obj  SM)

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

Parameters
SM- SDF/Cos black-generation function or name
void pdftron::PDF::GState::SetStrokeColor ( const ColorPt c)

Sets the color value/point used for stroking operations.

Parameters
cis the color used for stroking operations
Note
The color value must be represented in the currently selected color space used for stroking.
void pdftron::PDF::GState::SetStrokeColor ( PatternColor  pattern)

Set the stroke color to the given tiling pattern.

Parameters
patternSDF pattern object.
Note
The currently selected stroke color space must be Pattern color space.
void pdftron::PDF::GState::SetStrokeColor ( PatternColor  pattern,
const ColorPt c 
)

Set the stroke color to the given uncolored tiling pattern.

Parameters
patternpattern (PatternType = 1 and PaintType = 2) object.
cis a color in the pattern's underlying color space.
Note
The currently selected stroke color space must be Pattern color space.
void pdftron::PDF::GState::SetStrokeColorSpace ( ColorSpace  cs)

Sets the color space used for stroking operations

Parameters
csColorSpace object to use for stroking operations
void pdftron::PDF::GState::SetStrokeOpacity ( double  ca)

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

Parameters
cavalue to set stroke opacity to
void pdftron::PDF::GState::SetStrokeOverprint ( bool  OP)

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

Parameters
OPtrue to enable overprint for stroke, false to disable.
void pdftron::PDF::GState::SetTextKnockout ( bool  knockout)

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

Parameters
knockoutWhether an object is elementary or not.
void pdftron::PDF::GState::SetTextRenderMode ( TextRenderingMode  rmode)

Sets 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..

void pdftron::PDF::GState::SetTextRise ( double  rise)

Sets 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
risedistance to move baseline up. Negative values move baseline down.
void pdftron::PDF::GState::SetTransferFunct ( SDF::Obj  TR)

Sets 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
void pdftron::PDF::GState::SetTransform ( const Common::Matrix2D mtx)

Set the transformation matrix associated with this element.

Parameters
mtxThe new transformation for this text element.
Note
in PDF associating a transformation matrix with an element ('cm' operator) will also affect all subsequent elements.
void pdftron::PDF::GState::SetTransform ( double  a,
double  b,
double  c,
double  d,
double  h,
double  v 
)

Set the transformation matrix associated with this element.

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.
void pdftron::PDF::GState::SetUCRFunct ( SDF::Obj  UCR)

Sets 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
void pdftron::PDF::GState::SetWordSpacing ( double  word_spacing)

Sets 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.

The documentation for this class was generated from the following file: