Foxit PDF SDK
|
Public Member Functions | |
int | GetCharCount () |
Get character count in current text object. More... | |
float | GetCharHeightByIndex (int index) |
Get the height of a character specified by index in current text object. More... | |
PointF | GetCharPos (int index) |
Get the position of a character specified by index in current text object. More... | |
float | GetCharWidthByIndex (int index) |
Get the width of a character specified by index in current text object. More... | |
string | GetText () |
Get text string. More... | |
TextState | GetTextState (PDFPage page) |
Get text state information. More... | |
void | SetText (string text) |
Set text string. More... | |
void | SetTextState (PDFPage page, TextState text_state, bool is_italic, int weight) |
Set text state information. More... | |
![]() | |
bool | AddClipPath (Path path, FillMode fill_mode) |
Add a path for clipping. More... | |
bool | AddClipTextObject (TextObject textobject) |
Add text object for clipping. More... | |
bool | ClearClips () |
Clear all clips. More... | |
GraphicsObject | Clone () |
Clone a new graphics object. More... | |
GraphicsObject | Clone (GraphicsObjects src_graphicsobjects, GraphicsObjects dest_graphicsobjects) |
Clone a new graphics object. More... | |
bool | Equal (GraphicsObject other) |
Check if input object is equal to current object. More... | |
GraphicsObject.BlendMode | GetBlendMode () |
Get the blend mode for transparent imaging model. More... | |
Path | GetClipPath (int index) |
Get a path clip by index. More... | |
int | GetClipPathCount () |
Get the count of path clip. More... | |
FillMode | GetClipPathFillMode (int index) |
Get the fill mode of a path clip by index. More... | |
RectF | GetClipRect () |
Get clip rectangle. More... | |
TextObject | GetClipTextObject (int index) |
Get the text object of a text clip by index. More... | |
int | GetClipTextObjectCount () |
Get the count of text clip. More... | |
ColorState | GetColorState () |
Get color state. More... | |
uint | GetFillColor () |
Get the fill color. More... | |
float | GetFillOpacity () |
Get the opacity value for painting operations other than stroking. More... | |
FormXObject | GetFormXObject () |
Get the form XObject graphics object if current graphics object represents a form XObject object. More... | |
GraphState | GetGraphState () |
Get graph state. More... | |
ImageObject | GetImageObject () |
Get the image graphics object if current graphics object represents an image object. More... | |
LayerNodeArray | GetLayers (LayerTree layer_tree) |
Get all the layers which are associated with current graphics object. More... | |
MarkedContent | GetMarkedContent () |
Get marked content object. More... | |
Matrix2D | GetMatrix () |
Get matrix. More... | |
PathObject | GetPathObject () |
Get the path graphics object if current graphics object represents a path object. More... | |
RectF | GetRect () |
Get the rectangle of current graphics object. More... | |
ShadingObject | GetShadingObject () |
Get the shading graphics object if current graphics object represents a shading object. More... | |
uint | GetStrokeColor () |
Get the stroke color. More... | |
float | GetStrokeOpacity () |
Get opacity value for stroke painting operations for paths and glyph outlines. More... | |
TextObject | GetTextObject () |
Get the text graphics object if current graphics object represents a text object. More... | |
GraphicsObject.Type | GetType () |
Get the type of current graphics object. More... | |
bool | HasTransparency () |
Check whether current graphics object has transparency or not. More... | |
void | Release () |
Release a cloned or newly created PDF graphics object which has not been inserted into any PDF page or other object. More... | |
bool | RemoveClipPath (int index) |
Remove a path clip by index. More... | |
bool | RemoveClipTextObject (int index) |
Remove a text clip by index for clipping. More... | |
void | Rotate (int angle) |
Rotate current graphics object from current state with specified angle degree in clockwise. More... | |
void | SetBlendMode (GraphicsObject.BlendMode blend_mode) |
Set the blend mode for transparent imaging model. More... | |
void | SetClipRect (RectF clip_rect) |
Set clip rectangle. More... | |
void | SetColorState (ColorState color_state) |
Set color state. More... | |
void | SetFillColor (uint color) |
Set the fill color. More... | |
void | SetFillOpacity (float opacity) |
Set the opacity value for painting operations other than stroking. More... | |
void | SetGraphState (GraphState graph_state) |
Set graph state. More... | |
void | SetMatrix (Matrix2D matrix) |
Set matrix. More... | |
void | SetStrokeColor (uint color) |
Set the stroke color. More... | |
void | SetStrokeOpacity (float opacity) |
Set opacity value for stroke painting operations for paths and glyph outlines. More... | |
bool | Transform (Matrix2D matrix, bool need_transform_clippath) |
Transform current graphics object. More... | |
Static Public Member Functions | |
static TextObject | Create () |
Create a new text graphics object. More... | |
Additional Inherited Members | |
![]() | |
enum | BlendMode { BlendMode.e_BlendNormal = 0, BlendMode.e_BlendMultiply = 1, BlendMode.e_BlendScreen = 2, BlendMode.e_BlendOverlay = 3, BlendMode.e_BlendDarken = 4, BlendMode.e_BlendLighten = 5, BlendMode.e_BlendColorDodge = 6, BlendMode.e_BlendColorBurn = 7, BlendMode.e_BlendHardlight = 8, BlendMode.e_BlendSoftlight = 9, BlendMode.e_BlendDifference = 10, BlendMode.e_BlendExclusion = 11, BlendMode.e_BlendHue = 21, BlendMode.e_BlendSaturation = 22, BlendMode.e_BlendColor = 23, BlendMode.e_BlendLuminosity = 24 } |
Enumeration for render blend mode. More... | |
enum | Type { Type.e_TypeAll = 0, Type.e_TypeText = 1, Type.e_TypePath = 2, Type.e_TypeImage = 3, Type.e_TypeShading = 4, Type.e_TypeFormXObject = 5 } |
Enumeration for PDF graphics object type. More... | |
Text graphics object is a kind of PDF graphics object, so class TextObject is derived from class GraphicsObject . It offers functions to get/set text graphics object's data.
To create a new text graphics object, please use function TextObject.Create and then use setting functions to set information to the new text graphics object.
|
inlinestatic |
Create a new text graphics object.
The newly created text graphics object does not have any data yet. Then, setting functions can be called to set data to the new text graphics object. If the newly created text graphics object will not inserted to any page or other objects, please remember to call function GraphicsObject.Release to release it when no use.
|
inline |
Get character count in current text object.
|
inline |
Get the height of a character specified by index in current text object.
[in] | index | The index of character whose position is to be retrieved. Valid range: from 0 to (count-1). count is returned by function TextObject.GetCharCount . |
|
inline |
Get the position of a character specified by index in current text object.
[in] | index | The index of character whose position is to be retrieved. Valid range: from 0 to (count-1). count is returned by function TextObject.GetCharCount . |
|
inline |
Get the width of a character specified by index in current text object.
[in] | index | The index of character whose position is to be retrieved. Valid range: from 0 to (count-1). count is returned by function TextObject.GetCharCount . |
|
inline |
Get text string.
Get text state information.
[in] | page | A valid PDF page.Please ensure that current graphics object just belongs to this page. |
|
inline |
Set text string.
[in] | text | New text string. |
|
inline |
Set text state information.
[in] | page | A valid PDF page.Please ensure that current graphics object just belongs to this page. |
[in] | text_state | New text state information. |
[in] | is_italic | true means the text of current graphics object is italic, while false means not. |
[in] | weight | Original font weight. If the value is larger than 500, that means to use bold. |