Public Types | |
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... | |
Public Member Functions | |
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.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... | |
uint | GetFillColor () |
Get the fill color. More... | |
FormXObject | GetFormXObject () |
Get the form XObject object if current graphics object represents a form XObject object. More... | |
GraphState | GetGraphState () |
Get graph state. More... | |
ImageObject | GetImageObject () |
Get the image 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 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 object if current graphics object represents a shading object. More... | |
uint | GetStrokeColor () |
Get the stroke color. More... | |
TextObject | GetTextObject () |
Get the text 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 | SetBlendMode (GraphicsObject.BlendMode blend_mode) |
Set the blend mode for transparent imaging model. More... | |
void | SetClipRect (RectF clip_rect) |
Set clip rectangle. More... | |
void | SetFillColor (uint color) |
Set the fill color. 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... | |
bool | Transform (Matrix2D matrix, bool need_transform_clippath) |
Transform current graphics object. More... | |
Content of a PDF page usually consists of a sequence of graphics objects. Each graphics object contains its state information, data and instructions for rendering.
Class GraphicsObject is the base class for all types of PDF graphics objects. It offers the base functions to get/set graphics object's common properties. For concrete graphics object types, please refer to derived classes.
To get or insert/remove a graphics object, please refer to class GraphicsObjects.
If any change is done to a PDF graphics object, please remember to call function GraphicsObjects::GenerateContent for GraphicsObjects object (to which current graphics object belongs). Please refer to comment of function GraphicsObjects::GenerateContent for more details.
|
strong |
Enumeration for render blend mode.
Values of this enumeration should be used alone.
|
strong |
Enumeration for PDF graphics object type.
Values of this enumeration should be used alone.
Add a path for clipping.
path | Path data to be added to current graphics object. |
fill_mode | Fill mode for the input path. Please refer to e_FillModeXXX values and it should be one of these values. |
|
inline |
Add text object for clipping.
textobject | Text object to be added for clipping. |
|
inline |
Clear all clips.
|
inline |
Clone a new graphics object.
Newly cloned graphics object is related to the same page with current graphics object by default. Newly cloned graphics object can only be used inside the PDF file which contains current graphics object.
|
inline |
Get the blend mode for transparent imaging model.
|
inline |
Get a path clip by index.
index | Path clip index. Valid range: from 0 to (count-1). count is returned by function GraphicsObject::GetClipPath. |
|
inline |
Get the count of path clip.
|
inline |
Get the fill mode of a path clip by index.
index | Path clip index. Valid range: from 0 to (count-1). count is returned by function GraphicsObject::GetClipPath. |
|
inline |
Get clip rectangle.
|
inline |
Get the text object of a text clip by index.
index | Text clip index. Valid range: from 0 to (count-1). count is returned by function GraphicsObject::GetClipTextObjectCount. |
|
inline |
Get the count of text clip.
|
inline |
Get the fill color.
Text graphics object, path graphics object, and form XObject graphics object can have this property.
|
inline |
Get the form XObject object if current graphics object represents a form XObject object.
|
inline |
Get graph state.
Form XObjet graphics object, path graphics object and text graphics object can have this property.
|
inline |
Get the image object if current graphics object represents an image object.
|
inline |
Get all the layers which are associated with current graphics object.
layer_tree | A valid layer tree. All the layer nodes in this layer tree will be enumerated\ in order to find which are associated with current graphics object. |
|
inline |
Get marked content object.
|
inline |
Get matrix.
|
inline |
Get the path object if current graphics object represents a path object.
|
inline |
Get the rectangle of current graphics object.
|
inline |
Get the shading object if current graphics object represents a shading object.
|
inline |
Get the stroke color.
Text graphics object, path graphics object, and form XObject graphics object can have this property.
|
inline |
Get the text object if current graphics object represents a text object.
|
inline |
Get the type of current graphics object.
|
inline |
Check whether current graphics object has transparency or not.
|
inline |
Release a cloned or newly created PDF graphics object which has not been inserted into any PDF page or other object.
|
inline |
Remove a path clip by index.
index | Path clip index. Valid range: from 0 to (count-1). count is returned by function GraphicsObject::GetClipPath. |
|
inline |
Remove a text clip by index for clipping.
index | Text clip index. Valid range: from 0 to (count-1). count is returned by function GraphicsObject::GetClipTextObjectCount. |
|
inline |
Set the blend mode for transparent imaging model.
blend_mode | New blend mode. Please refer to e_BlendXXX values and it should be one of these values. |
|
inline |
Set clip rectangle.
New clip rectangle will be set with fill mode e_FillModeWinding by default.
clip_rect | New clip rectangle. |
|
inline |
Set the fill color.
Text graphics object, path graphics object, and form XObject graphics object can have this property. If try to set fill color for rest unsupported types, e_ErrUnsupported will be thrown.
color | New color value, in format 0xAARRGGBB. |
|
inline |
Set graph state.
Form XObjet graphics object, path graphics object and text graphics object can have this property. If try to set graph state to rest unsupported types, exception e_ErrUnsupported will be thrown.
graph_state | New graph state. |
|
inline |
Set matrix.
matrix | New matrix value. |
|
inline |
Set the stroke color.
Text graphics object, path graphics object, and form XObject graphics object can have this property. If current graphics object is a text graphics object and the text mode is e_ModeFill, the stroke color will not have effect on the text graphics object.
If try to set stroke color for rest unsupported types, exception e_ErrUnsupported will be thrown.
color | New color value, in format 0xAARRGGBB. |
|
inline |
Transform current graphics object.
matrix | Transform matrix. |
need_transform_clippath | true means to transform clip path with current graphics object. false means to transform current graphics object only. |